Skip to content
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

[Page List] Locking and customization UI updates #47506

Closed
MaggieCabrera opened this issue Jan 27, 2023 · 9 comments
Closed

[Page List] Locking and customization UI updates #47506

MaggieCabrera opened this issue Jan 27, 2023 · 9 comments
Labels
[Block] Navigation Affects the Navigation Block [Block] Page List Affects the Page List Block Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended

Comments

@MaggieCabrera
Copy link
Contributor

MaggieCabrera commented Jan 27, 2023

There are a couple of issues with the Page list block within the Navigation Block list view as it stands today regarding the icons and interactions related to them:

Screenshot 2023-01-27 at 16 08 49

  • The lock icons

Currently all page list elements have a lock icon. This is very busy, making the inspector list view quite cramped. @mtias suggested the solution of template locking the Page List using contentOnly and only showing the lock icon in the page list parent block. The problem is that this mode right now hides all children in the list view and only offers a flattened list of content blocks on the inspector.

Screenshot 2023-01-27 at 16 11 05

  • The edit icons

Currently only the Page list parent has an edit icon and that's our way to access the "Customize" button that turns the page list into a list of links. If we were to use contentOnly for this block, we could consider triggering the transformation into links when someone tries to edit the content of the page list, but we'd have to consider how that interaction would happen.

Screenshot 2023-01-27 at 16 34 30 | Screenshot 2023-01-27 at 16 46 56

@richtabor
Copy link
Member

Here's an issue I wrote up for the lock icons specifically: #47268

@MaggieCabrera
Copy link
Contributor Author

I was discussing this further with @scruffian and I think what makes sense here is:

  • Remove the lock: all from the children of the page list and instead make the page list be contentOnly instead
  • Stop hiding the children from contentOnly locked blocks from the list view
  • Have a different way of visually expressing that the block and children are in contentOnly mode.

@MaggieCabrera
Copy link
Contributor Author

I was discussing this further with @scruffian and I think what makes sense here is:

* Remove the lock: all from the children of the page list and instead make the page list be contentOnly instead

* Stop hiding the children from contentOnly locked blocks from the list view

* Have a different way of visually expressing that the block and children are in contentOnly mode.

I'd like to get a heads up on this before getting too deep into the code, besides I need design direction for the last bit @mtias @richtabor @jasmussen @SaxonF

@getdave getdave added the Needs Design Feedback Needs general design feedback. label Jan 31, 2023
@SaxonF
Copy link
Contributor

SaxonF commented Feb 2, 2023

we could consider triggering the transformation into links when someone tries to edit the content of the page list, but we'd have to consider how that interaction would happen

This was originally the intention and I think its captured here.

Have a different way of visually expressing that the block and children are in contentOnly mode.

This is a tricky one... I'm inclined to just leave it visually as is (no lock) for now and work towards being able to convert a page list item into a custom link which then of course would convert the parent page list block. This fits in with the above pattern of being able to transition from a page list to a list of custom links seamlessly.

@jasmussen
Copy link
Contributor

The mini locks are noisy, so it makes sense to me to show it on the parent.

@MaggieCabrera
Copy link
Contributor Author

The mini locks are noisy, so it makes sense to me to show it on the parent.

yeah, what @richtabor is suggesting in #47268 but right now, only the children are actually locked, not the parent. I was thinking how to do this and I wonder if a CSS solution would be best to at least hide the icons from the children? We would have to introduce multiple exceptions for this block to hide the locks for the children and show them for the parent

@scruffian
Copy link
Contributor

We would have to introduce multiple exceptions for this block to hide the locks for the children and show them for the parent

I think it would be better if we can avoid this.

@scruffian
Copy link
Contributor

On further consideration, I don't think contentOnly is model here - Blocks that are contentOnly locked allow users to edit the content, but not the structure of the blocks. In the Page List, all child blocks are completely locked - they cannot be removed, or moved, or edited in any way. This is the same situation as when a block and all it's children are locked, a bit like this:

Screenshot 2023-02-02 at 10 09 56

Screenshot 2023-02-02 at 10 09 49

The navigation block also has an "edit" lock:
Screenshot 2023-02-02 at 10 14 40

The problem with this is also that it prevents the items showing in the list view.

I think we need to look at this situation holistically, rather than doing something specific for the Page List blocks.

One option is to create a new type of lock - "child" lock? This would allow a block to lock all its children, but the block itself would remain editable. This is probably useful for other blocks, not just the Page List. The behaviour would be something like this:

  1. When locking a block users have the option to apply the lock to:
  • that block only
  • that block and all it's children
  • the children only
  1. The third would apply the selected locks to all the children of the block but the block itself would remain unlocked
  2. The block with locked children would absorb the lock icons for all the children, perhaps with a slightly different visual display (multiple locked icons?) to make it clear that the lock is applied to the children
  3. The block would continue to display all the children even though they are locked but they would be visually disabled (maybe a slight grey color?)

To be honest this solution seems quite complex, and I'm not sure that's any better than the current situation with the stacked icons on the Page List block.

@annezazu annezazu moved this from ❓ Triage to 🗣️ In discussion, needs decision in WordPress 6.2 Editor Tasks Feb 6, 2023
@ndiego ndiego moved this from 🗣️ In discussion, needs decision to 🦵 Punted to 6.3 in WordPress 6.2 Editor Tasks Feb 23, 2023
@draganescu draganescu changed the title [Page List] Locking and customization [Page List] Locking and customization UI updates Mar 6, 2023
@scruffian
Copy link
Contributor

I think we can close this based on the work done in #48723

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Block] Page List Affects the Page List Block Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

No branches or pull requests

6 participants