Overview
The page hierarchy view works currently similarly to the main preview but without styles and content. This is similar to how Layout Builder approaches the non-visual preview. A more common approach in the industry is to show the hierarchial preview as layers, similar to what design tools like Photoshop and Figma have been doing for years.
Proposed resolution
Implement the page hiearchy as layers.
User interface changes

| Comment | File | Size | Author |
|---|---|---|---|
| #36 | improve-layers2.gif | 1.27 MB | hooroomoo |
| #27 | improve-layers.gif | 1.27 MB | hooroomoo |
| #4 | layers_tab.png | 575.07 KB | lauriii |
| #4 | layers_breakdown.png | 229.92 KB | lauriii |
| #3 | wordpress-block-editor.png | 49.15 KB | dalemoore |
Issue fork experience_builder-3458503
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 #2
jessebaker commentedIn the absence of a design, here are a couple of screenshots of competing UI's that could serve as inspiration for how this might look
Comment #3
dalemoore commentedVery much in favor of this! It makes not only seeing the site hierarchy much easier and quicker, but you can also drag and drop the components in the view in a much more user-friendly manner. It doesn't work that way in Figma though unless you have auto-layout turned on.
Here's WordPress' implementation:
Comment #4
lauriiiAttaching designs for this.
Comment #5
gauravvvv commentedComment #9
gauravvvv commentedComment #10
gauravvvv commentedComment #11
wim leers@lauriii I think you meant to surface this at https://contribkanban.com/board/experience_builder? 😅 Adding parent issue to make it so!
Comment #12
lauriiiThis is blocked on being able to test this with nested components, which would be enabled by:
There's also #3462074: Option to change the (SVG) icon for components on the page hierarchy display which is a soft-blocker.
Comment #17
wim leers#3460586: Provide an "Address formatter" text format that supports Twig without Wysiwyg is in.
#3446722: Introduce an example set of representative SDC components; transition from "component list" to "component tree" is almost done.
Comment #18
wim leersComment #19
lauriiiComment #22
wim leersShould I close https://git.drupalcode.org/project/experience_builder/-/merge_requests/80 + https://git.drupalcode.org/project/experience_builder/-/merge_requests/91 now that @hooroomoo started https://git.drupalcode.org/project/experience_builder/-/merge_requests/176?
Comment #23
hooroomooYeah I think you can close them. Both of them were also made before the new layers menu.
Comment #26
hooroomooFixed the hover/select issue where hovering over a parent or child did not apply styling to the individual item. Next will look at fixing the Sortable functionality
Comment #27
hooroomooComment #28
hooroomooImplementation done, will try my hand at adding drag and drop tests next using cypress-real-events library....
Comment #29
wim leers#28: 🥳
(Reflecting that in the issue metadata 👍)
Comment #30
hooroomooComment #31
hooroomooSee MR description
Comment #32
hooroomooComment #33
lauriiiFrom design perspective, there's some improvements we still need to make – for example the layers feel a bit chunky and I'm not sure if bold is the best way to indicate slots. However, this takes the layers panel so much closer to what it should be that I'd argue that we should just ship this and work on the improvements in smaller follow-up issues 🚢
Comment #34
wim leersManually tested.
The screenshot in #27 is still accurate 👍
Detailed observations, none of which need to be addressed here, only in follow-ups:
@balintbrews is awake long before the US, so asking him to review this first 😊
Comment #35
wim leersAdding #27 to issue summary and simplifying.
Comment #36
hooroomoo#33, #34 Yup improvements in follow-ups is good.
Just pushed low hanging fruit minor styling change so it looks less chunky and added a @todo in the tests to replace the cy.waits linking to #3470490: Unnecessary wait() use in e2e tests can cause failures and misleading fail output
Updated the gif in the IS to the updated one

Comment #37
wim leersComment #38
hooroomooComment #40
jessebaker commentedComment #41
wim leersThat means #3470594: Refine dragging behavior and design in Layers menu is now unblocked 👍
(And I'm hopeful that #3470625-5: Dragging sections in the Layers sidebar throws error can now be tested & closed.)
Comment #42
kristen polWow! This is great 😍 Works so well!