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.
Problem/Motivation
The list of enabled styles seems to be pretty random and also changes, that results in unreadable diffs when risks of undoing/reverting changes as well as merge conflicts.
Proposed resolution
Sort the list of paragraph types alphabetically before saving.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#7 | 3034897-sorted-styles-7-5-interdiff.txt | 985 bytes | mbovan |
#7 | 3034897-sorted-styles-7.patch | 1.59 KB | mbovan |
| |||
#5 | 3034897-sorted-styles-5.patch | 646 bytes | mbovan |
|
Comments
Comment #2
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedUpdated the issue summary and tagged it for Drupal Mountain Camp.
Comment #3
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedUpdated the proposed resolution.
Comment #4
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedAssigned to myself for Drupal Mountain Camp demo.
Comment #5
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedSorted the list of styles.
Comment #6
BerdirLooks good, now we just need a test.
Comment #7
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedAdding a test as well.
I couldn't easily provide a failing test-only patch...
Comment #8
BerdirNot sure if the test is really testing this, I think we'd likely need to manually change the order and then checking that resaving the form updates it.
The fancy option would be a config save event subscriber that reorders there, then it would always happen, but seems a bit overkill. This is good enough for me.