collective / volto-hydra

A volto addon to let you edit content in realtime when you have many frontends written in any framework
2 stars 4 forks source link

I can manage/navigate subblocks only in the sidebar (remove sidebar tabs and "layout") #152

Open djay opened 2 months ago

djay commented 2 months ago

Problem

Need a way to get to the settings of blocks, esp the parent in cases where it's either hard to click on teh parent or frontend block selection is not implemented.

We need something that works well on mobile (vertical is better than horizontal) and is not confusing for the user to work out what they are looking at container-wise, and how to get to the settings they want. Jumping between block layout, and settings or various blocks can be confusing.

Existing container blocks potentially are

All of these would benefit from a consistent containment UI

Proposed solution

All container blocks settings in a single sidebar using sticky scroll

The idea is an extension of the existing concept in Volto where you can manage subitems in the settings like the slider block or accordion or formblock and the mockup in quanta where both the subblock and the top level block settings combined. (see images in the context below)

This idea is extended further to include all parent containers including the page itself which is also logically a container but not indent them but once opened to are kept at the same level.

A similar idea to vscode sticky scroll is used in vscode and will allow the user to understand the containment hierarchy and how to get to their settings. Including the Page as the most top container means there is a clear way to get to them when replacing the tabs and the settings button in the toolbar can act as a simple sidebar toggle.

image

Context

The quanta design doesn't really deal with containers. The closest it comes is this table block and the mockup in quanta where both the subblock and the top level block settings combined image

The proposed idea is kind of an extension of the existing concept in Volto where you can manage subitems in the settings like the slider block or accordion or formblock image

djay commented 2 months ago

Not sure this is the right place for it but this is an idea that tries to solve a few different things.

The idea follows on from quanta design for tables, where cell settings are part of table settings but I've generalised it.

Here are some mockups

image image

TODO:

djay commented 2 months ago

I did a mockup of including the page settings as the top most pinned accordion. It is a container. It also means the settings in the toolbar can be just a toggle to open or close the sidebar (https://github.com/plone/volto/pull/3912)

image

Settings on the toolbar would open with the sidebar scrolled to the top showing the page settings. Clicking a block would include the block and its parents on the sidebar (skipping any with no settings like Row). If the selected block is a container you can manage it's sub-blccks or select one. And if you want to go to the page settings then you just scroll up (or you can unselect the table) I've also put in a block menu so you can delete, cut copy blocks etc. That lets you move blocks out of containers.