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 behavior plugins seem to be unordered on paragraph type edit form.
Proposed resolution
Order them.
User interface changes
Ordered behavior plugins on paragraph type edit page.
Comment | File | Size | Author |
---|---|---|---|
#15 | interdiff-2854354-12-15.txt | 2.3 KB | pivica |
#15 | order_behavior_plugins-2854354-15.patch | 3.71 KB | pivica |
|
Comments
Comment #2
miro_dietikerComment #3
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedOrdered alphabetically
Comment #5
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedOrdered alphabetically in paragraphs.
Maybe we can also make an order function for the enabled plugins to show first, then all the others (alphabetically by default)?
Comment #7
johnchqueNot sure if would be better to sort them when getting all the plugins. So we can just use them already sorted.
Comment #8
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedFixed tests.
(#5) Still can make an order function for the enabled plugins to show first, then all the others (alphabetically by default)
@yongt9412, you mean in the BehaviorManager?
Comment #9
Primsi CreditAttribution: Primsi at MD Systems GmbH for MD Systems GmbH commentedIMHO moving the enabled plugins on top would make the list "unpredictable" for the user. Especially if we have a lot of them, that list would change per type. This means that it would be harder for the user to scan through.
Comment #10
toncic CreditAttribution: toncic at MD Systems GmbH commentedI think proposal from #5 is OK. You have behaviors in some order and when you enable one, that one is moving on the top and all other stayed on the same position.
Comment #11
miro_dietikerNeeds a reroll.
Comment #12
pivica CreditAttribution: pivica at MD Systems GmbH commentedPatch rerolled.
Not fully sure about this because we are ordering plugins currently by array key. It's more consistent now but still a bit weird. If the main goal of this issue is to order plugins alphabetically so users can more easily visually locate a plugin when there is a lot of plugins then maybe we should order plugins by their label and not id?
Screenshot before and after a patch:
It's better but still a bit weird because plugins ids and labels can be different.
Comment #14
miro_dietikerYeah totally, if we order it, it should be by plugin label.
Comment #15
pivica CreditAttribution: pivica at MD Systems GmbH commentedFixed tests and changed sorting by plugin label.
Comment #17
miro_dietikerThat's interestingly funny... I thought we change the sequence in the admin UI, then we coincidentally also change the sequence for plugin processing and class output...
It seems the sequence is persisted.... on settings save and that is used for plugin execution sequence.
So that's a follow-up to define a more technical plugin order.
Created #2931763: Guarantee Behavior Plugin execution sequence