Override Layout Builder off-canvas panel size for all instances of it opening to be appropriate for the navigation and other content rendered inside of it.
Motivation
Layout Builder Edit Panel too narrow when editing a pattern
Expected behavior
In general, if the sidebar try includes the form for editing a pattern (JsonEditor), it should be opened to a wider width (900px). Otherwise, the width should remain unchanged and open to the default width (300px).
There are several instances where you see the off-canvas panel:
- adding a section to a layout (300px)
- configuring a section (300px)
- selecting a pattern/block to add (300px)
- adding a non-Patternkit block (300px)
- configuring a non-Patternkit block (300px)
- adding a Patternkit block (900px)
- configuring a Patternkit block (900px)
- removing a block (300px)
- moving a block (300px)
Comments
Comment #2
sluceroComment #3
sluceroComment #4
bladwin commentedRight now, only the following Block Admin options are available to be easily overridden without preprocessing multiple $links arrays:
Comment #5
sluceroComment #6
sluceroI'm adding this to the Beta 7 release plan to include the patch attached above.
Comment #7
sluceroFor now I'm actually removing this from the Beta 7 release out of concern for an inconsistent user experience that may be confusing. As it works now, the edit form for blocks is greatly improved since the off-canvas tray is made wider by default, but the flow for adding a new block still uses the narrow tray for the form. I worry the inconsistency of this experience will be confusing to editors.
When used with the patch from #2951547: Modify Layout Builder's use of the off-canvas tray to improve UX of larger block forms, the experience is more consistent since the add form becomes wider as well.
Until that issue is resolved and merged in, we may need to explore an alternative solution where the remaining links could be altered and the experience would be more uniformly improved.
Comment #8
sluceroComment #10
sluceroThe new MR I've uploaded alters links for adding and editing Patternkit blocks within Layout Builder. When selecting a Patternkit pattern from the add block list or clicking the "Configure" contextual link on a block within Layout Builder, the edit form within the off-canvas tray should display at a 900 pixel width instead of the default 300. The same links for other blocks should not be affected.
Filtering down to only affect Patternkit blocks for the edit links is still a work in progress.
Comment #11
sluceroThis is now ready for review and testing.
Comment #13
sluceroI've updated the summary and clarified the expected behaviors:
Comment #14
minsharm commentedI have tested it and result looks good to me on both D10 and D11.
Comment #15
sluceroComment #16
sluceroTested and ready to merge into 9.1.2 release.
Comment #18
sluceroMerged for inclusion in the 9.1.2 release.