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

Open all accordion'd content in InlineForm by default, allow arbitrarily close any number of them #4178

Merged
merged 10 commits into from
May 11, 2023

Conversation

sneridagh
Copy link
Member

@sneridagh sneridagh commented Dec 23, 2022

UPDATED 09/03/2023:

Issue: The state (collapsed/open) of the fieldset accordions in the InlineForm/BlockDataForm is not being preserved.
This is a UX problem when the user is editing content and finds out that the state of the settings UI is not the same as he just left before focusing in another block.

Another "problem" is that the accordions start closed by default. This could be problematic because to my experience some users oversee that the fieldset could be "opened" when they first access the block settings.

I quote "problem" because could be that someone could prefer it to be otherwise.

This PR is fixing both issues by using jotai library to save the state for each block. We are adding a new library here, but I think given the power that it provides, it's worth to test it. It only adds 2k (!) to the build.

This is a breaking change, but we have the ability to put it under a configuration setting to control the default behavior, then we could backport it to 16.

I leave the Volto Team meeting the final decision.

@netlify
Copy link

netlify bot commented Dec 23, 2022

Deploy Preview for volto ready!

Name Link
🔨 Latest commit 1913e02
🔍 Latest deploy log https://app.netlify.com/sites/volto/deploys/645cc05104e1360008080b13
😎 Deploy Preview https://deploy-preview-4178--volto.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sneridagh sneridagh requested a review from a team December 23, 2022 09:33
@cypress
Copy link

cypress bot commented Dec 23, 2022

Passing run #5097 ↗︎

0 493 20 0 Flakiness 0

Details:

Add opt-out (all closed by default) setting option, add documentation.
Project: Volto Commit: 1913e02a20
Status: Passed Duration: 16:55 💡
Started: May 11, 2023 10:19 AM Ended: May 11, 2023 10:36 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@sneridagh
Copy link
Member Author

@plone/volto-team okay, could be that some Cypress tests break... I'd be ok if we decide it to mark it as breaking and go for 17.

@sneridagh
Copy link
Member Author

Volto Team decission:

  • Make the behavior configurable, as opt-in.

@sneridagh sneridagh added this to the 16.x.x milestone Jan 17, 2023
@sneridagh sneridagh removed this from the 16.x.x milestone Mar 9, 2023
@sneridagh sneridagh merged commit fa6f895 into master May 11, 2023
@sneridagh sneridagh deleted the preventClosedItemsInAccordionInlineForm branch May 11, 2023 10:38
sneridagh added a commit to ninanoleto/volto that referenced this pull request May 20, 2023
* master: (29 commits)
  Remove max_line_length from .editorconfig (plone#4776)
  Fix bug showing logs at the browsers when richtext widget is use (plone#4780)
  Show expired and future content in contents view (plone#4764)
  Fix reducing expanders loaded in a subrequest (plone#4761)
  Update release notes for 16.20.5 and 16.20.6 (plone#4759)
  Release 17.0.0-alpha.7
  Try to sort out volto's use of language codes (plone#4741)
  Improve .npmignore to not include not needed files/folders (plone#4746)
  Release 17.0.0-alpha.6
  Control panel list SSR (plone#3749)
  Open all accordion'd content in InlineForm by default, allow arbitrarily close any number of them (plone#4178)
  Upgrade to Plone 6.0.4 (plone#4743)
  fix: unresponsive add page (plone#4507)
  Apply suggestion from browser for password field (plone#4524)
  (fix):Object.normaliseMail: Cannot read properties of null (plone#4558)
  Fix link in Volto, remove from linkcheck ignore in Documentation v6.0 (plone#4742)
  added documentation regarding the static middleware plone#4518 (plone#4736)
  Closes issue plone#4567 (plone#4570)
  Fix whitespace in locales created by the generator (plone#4737)
  Tidy up from synch with 16.x.x (plone#4728)
  ...
sneridagh added a commit that referenced this pull request May 20, 2023
* master: (29 commits)
  Remove max_line_length from .editorconfig (#4776)
  Fix bug showing logs at the browsers when richtext widget is use (#4780)
  Show expired and future content in contents view (#4764)
  Fix reducing expanders loaded in a subrequest (#4761)
  Update release notes for 16.20.5 and 16.20.6 (#4759)
  Release 17.0.0-alpha.7
  Try to sort out volto's use of language codes (#4741)
  Improve .npmignore to not include not needed files/folders (#4746)
  Release 17.0.0-alpha.6
  Control panel list SSR (#3749)
  Open all accordion'd content in InlineForm by default, allow arbitrarily close any number of them (#4178)
  Upgrade to Plone 6.0.4 (#4743)
  fix: unresponsive add page (#4507)
  Apply suggestion from browser for password field (#4524)
  (fix):Object.normaliseMail: Cannot read properties of null (#4558)
  Fix link in Volto, remove from linkcheck ignore in Documentation v6.0 (#4742)
  added documentation regarding the static middleware #4518 (#4736)
  Closes issue #4567 (#4570)
  Fix whitespace in locales created by the generator (#4737)
  Tidy up from synch with 16.x.x (#4728)
  ...
sneridagh added a commit to ninanoleto/volto that referenced this pull request May 20, 2023
* typescript-support-in-core: (29 commits)
  Remove max_line_length from .editorconfig (plone#4776)
  Fix bug showing logs at the browsers when richtext widget is use (plone#4780)
  Show expired and future content in contents view (plone#4764)
  Fix reducing expanders loaded in a subrequest (plone#4761)
  Update release notes for 16.20.5 and 16.20.6 (plone#4759)
  Release 17.0.0-alpha.7
  Try to sort out volto's use of language codes (plone#4741)
  Improve .npmignore to not include not needed files/folders (plone#4746)
  Release 17.0.0-alpha.6
  Control panel list SSR (plone#3749)
  Open all accordion'd content in InlineForm by default, allow arbitrarily close any number of them (plone#4178)
  Upgrade to Plone 6.0.4 (plone#4743)
  fix: unresponsive add page (plone#4507)
  Apply suggestion from browser for password field (plone#4524)
  (fix):Object.normaliseMail: Cannot read properties of null (plone#4558)
  Fix link in Volto, remove from linkcheck ignore in Documentation v6.0 (plone#4742)
  added documentation regarding the static middleware plone#4518 (plone#4736)
  Closes issue plone#4567 (plone#4570)
  Fix whitespace in locales created by the generator (plone#4737)
  Tidy up from synch with 16.x.x (plone#4728)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants