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
[Breaking] Removing id from form field wrapper #2102
Conversation
Either the wrapper should have a unique ID or the field, not both. |
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.
@iFlameing seems you need to amend a Cypress test. I am actually wondering why we only have to amend one Cypress test. Seems we do not have a good forms test coverage.
Note: we remove the id from the wrapper. We have to make sure the fieldset is in the ID of the input field itself to avoid collisions when using the same form fields in different fieldsets. |
@plone/volto-team Timo and I think that the PR might be potentially breaking since someone might rely on the ids for their acceptance tests, so I marked it as breaking and schedule it for the next major. |
@iFlameing please can you write docs about this breaking change? docs/source/upgrade-guide/index/md |
@sneridagh yes! |
* master: Back to development Release 10.10.0 Prepare for release Adding classname in TextWidget and objectBrowserBody so that we can t… (#2148) Fix breadcrumbs for folder contents in multilingual sites (#2147) Add support for nav_title in breadcrumbs and navigation (#2145) Critical css (#2136) Remove git add . from releasers Clean mess from tar gz tests
|
||
We have removed the id from the FormFieldWrapper because it is coincide with the label id if we don't provide the fieldset. | ||
If you have cypress test which depends on this id then just remove the id from the test and if test fails then just | ||
add `.react-select-container` instead of your id. |
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.
@iFlameing maybe we can show an example diff here or at least point to this PR, so people can check what actually changed.
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.
I'd add a link to this PR in the upgrade guide. Apart from this the PR looks good!
* master: Upgrade to React 13.14.0 (#2156) Include reference to PR and slightly amend docs [Breaking] Removing id from form field wrapper (#2102) Amend documentation [Breaking] Listing default view (#2043) Upgrade react-select (#2153) Better handling of a condition in the new breadcrumbs (#2151) Upgradesongenerator (#2150) Sorry, pushed to master unadvertently = Revert "Upgrade react-select" Upgrade react-select
* master: (57 commits) Remove any trace from the nav_title, since it will be integrated in p.restapi responses (#2155) Upgrade to React 13.14.0 (#2156) Include reference to PR and slightly amend docs [Breaking] Removing id from form field wrapper (#2102) Amend documentation [Breaking] Listing default view (#2043) Upgrade react-select (#2153) Better handling of a condition in the new breadcrumbs (#2151) Upgradesongenerator (#2150) Sorry, pushed to master unadvertently = Revert "Upgrade react-select" Upgrade react-select Back to development Release 10.10.0 Prepare for release Adding classname in TextWidget and objectBrowserBody so that we can t… (#2148) Fix breadcrumbs for folder contents in multilingual sites (#2147) Add support for nav_title in breadcrumbs and navigation (#2145) Critical css (#2136) Remove git add . from releasers Clean mess from tar gz tests ...
* master: (38 commits) Remove any trace from the nav_title, since it will be integrated in p.restapi responses (#2155) Upgrade to React 13.14.0 (#2156) Include reference to PR and slightly amend docs [Breaking] Removing id from form field wrapper (#2102) Amend documentation [Breaking] Listing default view (#2043) Upgrade react-select (#2153) Better handling of a condition in the new breadcrumbs (#2151) Upgradesongenerator (#2150) Sorry, pushed to master unadvertently = Revert "Upgrade react-select" Upgrade react-select Back to development Release 10.10.0 Prepare for release Adding classname in TextWidget and objectBrowserBody so that we can t… (#2148) Fix breadcrumbs for folder contents in multilingual sites (#2147) Add support for nav_title in breadcrumbs and navigation (#2145) Critical css (#2136) Remove git add . from releasers Clean mess from tar gz tests ...
I think that we don't need this or we have to change the "field" to something like "wrapper" so that if someone doesn't pass the fieldset we are assigning two ids with the same value. The Form.Field and label you can see by visiting these two links
https://github.com/plone/volto/blob/master/src/components/manage/Widgets/FormFieldWrapper.jsx#L106
https://github.com/plone/volto/blob/master/src/components/manage/Widgets/FormFieldWrapper.jsx#L113