-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List View: Explore Alternatives to TreeGrid #32294
Comments
When I think of the List View, I think of it as a compressed, abstract representation of the content of your page. Like a layers palette in Figma, this can give a handy overview of what you're looking at, and its hierarchy. Because of that, I also think it will be reasonable to intuit a few behaviors work similarly in the List View as they do for blocks in the canvas. Dragging and dropping an bock in the list view to reorder items in the canvas: I imagine the block type indicator would show a drag handle when hovering the item. We'd also need an ellipsis menu where you could choose a "Move to" option for a keyboard interface: The chevron for expanding/collapsing container blocks. There's also already HTML anchor indication in the list view: I'm still finessing the margins and paddings. So that's quite a few tools to show, even if most of the time they are contextually hidden. |
Just to document it, another option explored for adding functionality to List View was a separate toolbar (inspired by Photoshop's layer's panel, which has a toolbar at the bottom) - #21372 Some were in favour of exploring that more, others weren't. It definitely makes more sense in the persistent list view panel. The idea would allow for simplifying the markup to a TreeView. The main thing it'd change is how blocks are selected—List View wouldn't be able to transfer focus to a block on selection as otherwise it'd be really difficult to use the toolbar. A separate toolbar or block settings menu button could be used to jump to a block though. |
We've also discussed adding actions which are block dependent. For example in #29148 (comment) @jameskoster describes an Edit template part button that only appears on Template Part blocks. |
I spent today learning about the options here and playing with a few different approaches.
|
The List View component is used in several places, and is currently backed by a Tree Grid implementation. A Tree Grid allows for multiple focusable items in a row, but the tradeoff is that the markup and implementation is more complex, making it more difficult to maintain and add features for.
Before we get too far in List View Improvements, there was some interest in revisiting if our current approach is more complex than it needs to be.
Some prior discussion mentions the possibility of using a TreeView or a simple List instead.
List View - Features/Requirements?
What types of tasks/flows do we plan on having List View facilitate? One key flow might be helping navigate block structure and complexity, so being able to drag and drop might be one feature. Does this mean that we also need mover controls as a requirement? Do we still plan on allowing folks to perform actions, like inserting/deleting a block?
Favoring one implementation over another is going to depend on if that approach will meet our overall needs.
Folks are also welcome to edit the summary with additional context, if I missed anything.
cc @shaunandrews @jasmussen @talldan @priethor
The text was updated successfully, but these errors were encountered: