Problem/Motivation
Since #3617547: Make pattern presets buildable, presets are hard to reach from the builder.
Proposed resolution
The Instances panel lists presets in their own Presets tab, next to Displays, open first while building a preset.
They are listed under their group, the preset being built first in its group.
A help icon says what a preset is.
The View more cap is removed.
Publishing a preset says the displays already using it do not change.
Saving a preset links to the presets list, in a new tab.
The add form says the content is built in the next step.
Group and Enabled get a description.
PatternPreset declared an admin_permission that does not exist, now fixed.
Remaining tasks
Review. The presets list part moved to #3631292: Filter, sort and page the presets list.
API changes
New optional description on #[DisplayBuildable], new optional group on DisplayReference, new active prop on the tabs component.
| Comment | File | Size | Author |
|---|
Issue fork display_builder-3624934
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mogtofu33 commentedComment #4
mogtofu33 commentedComment #5
mogtofu33 commentedComment #6
mogtofu33 commentedUpdated with a split instances and some common with the instances list to rationalize the filters.
Instances panel
Presets list
weightis removed, with a post update. The library lists presets by group, then by label.Instances list
FilteredListBuilderTraitandListFilterFormBase. The name filter matches the label or the ID, whatever the case.Fixed on the way
PatternPresetdeclaredadmin_permission: 'administer Pattern preset', a permission that does not exist, so entity edit and delete access only passed for users with every permission.--sl-color-primary-700.API and data changes
#[DisplayBuildable]: new optionaldescription.DisplayReference: new optionalgroup.display_builder.pattern_preset.*:weightremoved. Change record to publish on merge: "Pattern presets no longer have a weight". The Bootstrap recipe drops it too.Comment #7
mogtofu33 commentedRebased, will try to simplify and perhaps split to simplify review.
Comment #8
mogtofu33 commentedI moved the presets list part to #3631292: Filter, sort and page the presets list, so each MR can be reviewed on its own.
This one keeps the Instances panel: a Presets tab next to Displays, presets listed under their group, the messages after publishing and saving a preset, and help texts on the add form.
It also fixes the
admin_permissionofPatternPreset, which named a permission that does not exist. The two MRs merge in either order.Comment #9
mogtofu33 commentedComment #10
mogtofu33 commentedComment #11
pdureau commentedPresets tab
I am not sure about having a preset list here and allowing the creation of a preset from here:

It looks busy and confusing to me, to have:
So I would humbly recommend to skip this tab and call the "Instance" panel "Display" instead:

However, this is not a necessarily a RTBC blocker because:
Other changes
Comment #13
mogtofu33 commentedComment #15
pdureau commentedHas been shipped in beta9
Comment #16
pdureau commented