-
Notifications
You must be signed in to change notification settings - Fork 27
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
[#5039] Fix email registration errors #5098
base: master
Are you sure you want to change the base?
Conversation
216c18b
to
3ebd8a0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5098 +/- ##
==========================================
- Coverage 96.74% 96.73% -0.02%
==========================================
Files 771 774 +3
Lines 26636 26657 +21
Branches 3467 3468 +1
==========================================
+ Hits 25770 25787 +17
- Misses 605 608 +3
- Partials 261 262 +1 ☔ View full report in Codecov by Sentry. |
3ebd8a0
to
791b5d8
Compare
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.
Works as expected :). As you already pointed out, though, might be nice if there is a solution which will work for all option forms, not only this plugin.
src/openforms/js/components/admin/form_design/registrations/email/EmailOptionsFormFields.js
Show resolved
Hide resolved
return ( | ||
<ValidationErrorsProvider errors={relevantErrors}> | ||
{nonFieldErrors && ( | ||
<> | ||
{nonFieldErrors.map(([_, message], index) => ( |
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.
index
doesn't seem to be used. Is there a reason you included it?
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.
No, I had included this because I thought I would use it for the key, I can remove it.
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.
you still need to provide a key
though.
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.
How do you mean?We do not use anywhere a key for the ErrorMessage
component that's why I didn't. I thought that this is needed for lists.
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.
whenever you array.map(foo => <component />)
, the component must get the key
. See https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key
Closes #5039
Changes
nonField
errors for a combination of fields and these were not shown on the frontend. Fixed these by showing them on the top of the modal.Checklist
Check off the items that are completed or not relevant.
Impact on features
Release management
I have updated the translations assets (you do NOT need to provide translations)
./bin/makemessages_js.sh
./bin/compilemessages_js.sh
Dockerfile/scripts
./bin
folderCommit hygiene