-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add comment to course reset #379
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #379 +/- ##
==========================================
+ Coverage 88.34% 88.35% +0.01%
==========================================
Files 164 164
Lines 3448 3462 +14
Branches 850 856 +6
==========================================
+ Hits 3046 3059 +13
- Misses 398 399 +1
Partials 4 4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of suggestions otherwise looks good to me 👍🏻
src/users/CourseReset.jsx
Outdated
@@ -17,8 +17,20 @@ function CourseReset({ username, intl }) { | |||
const [courseResetData, setCourseResetData] = useState([]); | |||
const [error, setError] = useState(''); | |||
const [isOpen, open, close] = useToggle(false); | |||
const [comment, setComment] = useState(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const [comment, setComment] = useState(); | |
const [comment, setComment] = useState(''); |
src/users/CourseReset.jsx
Outdated
const handleCommentChange = (e) => { | ||
const text = e.target.value; | ||
setComment(text); | ||
if (text.length > 255) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice if we store this 255 in a variable
MAX_COMMENT_LENGTH = 255
so we can use this in comment message error too
Summary
This PR allows for comment to be added when resetting a learner's course
See: https://2u-internal.atlassian.net/browse/AU-1935