Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I tested some functionality in paragraphs and found some edge case when you have paragraphs with required fields empty and you press "Collapse all". Then "Collapse all" changes state to "Edit all" even if everything is still expanded.
I have attached gif with an example.
Comment | File | Size | Author |
---|---|---|---|
para_collapse_all.gif | 318.7 KB | mtodor |
Comments
Comment #2
miro_dietikerYeah party... ;-)
That's strange. The idea was that a failing validation basically consistencly force expands the Paragraph widget / child. So instead of just displaying the widget / child expanded even if it has "collapsed" state, the validation should set that state back to edit.
It seems that's a bug in validation result affects state consistency.
Comment #3
miro_dietikerAaaaand sorry to mention, but tests will be a requirement for these problems. :-)
Comment #4
miro_dietikerConnecting issues..
Comment #5
BerdirThe reason it behaves like this is because of the auto-uncollapse feature that we currently have that automatically uncollapses paragraphs with validation errors.
The all button doesn't update because we used to build that first. Now we build it last which fixes other problems and also this, now the button knows that they are still uncollapsed.
But we identified the closed-paragraph-validation-feature as a huge performance problem in #2935134: [meta] Improve performance of paragraphs widget and are basically removing it there. Instead, we fixed validation of the collapse button so you instead now get a validation message that tells you *why* you're not allowed to collapse :)
Closing as duplicate.