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.


Figma prototype


Figma design

User interface changes

Command icon 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

lauriii created an issue. See original summary.

jessebaker’s picture

StatusFileSize
new76.32 KB
new69.68 KB

In 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

dalemoore’s picture

StatusFileSize
new49.15 KB

Very 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:

Screenshot of WordPress Block Editor's List View

lauriii’s picture

Assigned: lauriii » Unassigned
Issue summary: View changes
StatusFileSize
new229.92 KB
new575.07 KB

Attaching designs for this.

gauravvvv’s picture

Assigned: Unassigned » gauravvvv

Gauravvvv changed the visibility of the branch 3458503-Improve-page to hidden.

gauravvvv’s picture

Status: Active » Needs review
gauravvvv’s picture

Assigned: gauravvvv » Unassigned
wim leers’s picture

Assigned: Unassigned » jessebaker
Parent issue: » #3450592: [META] Front-end Kanban issue tracker

@lauriii I think you meant to surface this at https://contribkanban.com/board/experience_builder? 😅 Adding parent issue to make it so!

hooroomoo changed the visibility of the branch 3458503-page-hie to hidden.

hooroomoo changed the visibility of the branch 3458503-page-hie to hidden.

hooroomoo changed the visibility of the branch 3458503-page-hie to hidden.

hooroomoo changed the visibility of the branch 3458503-page-hie to active.

wim leers’s picture

wim leers’s picture

Title: [PP-1] Improve the page hierarchy display » Improve the page hierarchy display
Status: Postponed » Active
lauriii’s picture

Assigned: jessebaker » hooroomoo

hooroomoo changed the visibility of the branch 3458503-page-hie to hidden.

hooroomoo’s picture

Yeah I think you can close them. Both of them were also made before the new layers menu.

hooroomoo’s picture

Fixed 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

hooroomoo’s picture

Issue summary: View changes
StatusFileSize
new1.27 MB

hooroomoo’s picture

Implementation done, will try my hand at adding drag and drop tests next using cypress-real-events library....

wim leers’s picture

Status: Active » Needs work
Issue tags: +Needs tests

#28: 🥳

(Reflecting that in the issue metadata 👍)

hooroomoo’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
hooroomoo’s picture

hooroomoo’s picture

Assigned: hooroomoo » Unassigned
lauriii’s picture

From 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 🚢

wim leers’s picture

Assigned: Unassigned » balintbrews

Manually tested.

The screenshot in #27 is still accurate 👍

Detailed observations, none of which need to be addressed here, only in follow-ups:

  1. the slot names are machine names, not human-readable names
  2. clicking on a slot name doesn't do anything — I'd expect the entire slot to be outlined?
  3. the slot names are bold: why do we want to make them visually stand out compared to components? Especially due to the above point, I'd expect them to have less visual prominence.
  4. clicking the slot name doesn't do the same as clicking the disclosure triangle

@balintbrews is awake long before the US, so asking him to review this first 😊

wim leers’s picture

Issue summary: View changes
Issue tags: +Usability

Adding #27 to issue summary and simplifying.

hooroomoo’s picture

Issue summary: View changes
StatusFileSize
new1.27 MB

#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

wim leers’s picture

Assigned: balintbrews » bnjmnm
hooroomoo’s picture

jessebaker’s picture

Assigned: bnjmnm » Unassigned
Status: Needs review » Fixed
wim leers’s picture

That 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.)

kristen pol’s picture

Wow! This is great 😍 Works so well!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.