Skip to content
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

Merged
merged 8 commits into from Jan 26, 2021
Merged

[Breaking] Removing id from form field wrapper #2102

merged 8 commits into from Jan 26, 2021

Conversation

iFlameing
Copy link
Member

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

@tisto
Copy link
Sponsor Member

tisto commented Jan 5, 2021

Either the wrapper should have a unique ID or the field, not both.

@tisto tisto added this to Ready for review in Volto Team via automation Jan 5, 2021
@tisto tisto self-requested a review January 6, 2021 08:12
Volto Team automation moved this from Ready for review to Review in progress Jan 6, 2021
Copy link
Sponsor Member

@tisto tisto left a 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.

@tisto
Copy link
Sponsor Member

tisto commented Jan 7, 2021

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.

@sneridagh sneridagh changed the title Removing id from form field wrapper [Breaking] Removing id from form field wrapper Jan 9, 2021
@sneridagh
Copy link
Member

@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.

@sneridagh sneridagh added this to the 11.x.x milestone Jan 9, 2021
@sneridagh
Copy link
Member

@iFlameing please can you write docs about this breaking change? docs/source/upgrade-guide/index/md

@iFlameing
Copy link
Member Author

@sneridagh yes!

iFlameing and others added 5 commits January 21, 2021 21:54
* 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
@sneridagh sneridagh requested a review from tisto January 26, 2021 09:18

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.
Copy link
Sponsor Member

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.

@tisto tisto self-requested a review January 26, 2021 09:30
Copy link
Sponsor Member

@tisto tisto left a 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!

Volto Team automation moved this from Review in progress to Reviewer approved Jan 26, 2021
@sneridagh sneridagh merged commit 5233453 into master Jan 26, 2021
Volto Team automation moved this from Reviewer approved to Done Jan 26, 2021
@sneridagh sneridagh deleted the remove-id branch January 26, 2021 09:37
sneridagh added a commit that referenced this pull request Jan 26, 2021
* 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
sneridagh added a commit that referenced this pull request Jan 26, 2021
* 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
  ...
sneridagh added a commit that referenced this pull request Jan 26, 2021
* 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
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Volto Team
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants