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

Menu Item placeholder: Show page label in setup state #33091

Closed
jasmussen opened this issue Jun 30, 2021 · 2 comments
Closed

Menu Item placeholder: Show page label in setup state #33091

jasmussen opened this issue Jun 30, 2021 · 2 comments
Labels
[Block] Navigation Link Affects the Navigation Link Block [Block] Navigation Affects the Navigation Block

Comments

@jasmussen
Copy link
Contributor

What problem does this address?

This is a sub-task oriented part of #32373. As discussed in that ticket, we need for the Navigation block to be able to accommodate a diverse range of opinionated patterns such as this one:

Pattern

One part of that could be to indicate missing information through an underline, like so:

Setup states   appenders

That missing information could be:

  1. The label
  2. The URL
  3. Both

What is your proposed solution?

#32512 adds a wavy underline to menu items that have neither a URL nor a label. That checks off item 3 and 1 on the above list.

Item 2 still need addressing — that's the case where the label has already been configured, but the URL is still missing. In the following example markup, the first navigation link is missing both URL and label. The second navigation link is only missing the URL, but has "Services" pre-set as its label.

<!-- wp:navigation {"orientation":"horizontal"} -->
<!-- wp:navigation-link {"type":"page","kind":"post-type"} /-->
<!-- wp:navigation-link {"label":"Services","type":"page","kind":"post-type"} /-->
<!-- /wp:navigation -->

By allowing the label to be pre-set, this would allow pattern authors to create a wide range of highly useful block patterns where all you have to do is click an item and point at the URL:

Setup states   appenders

In the above mockup, the URL dialog is also redesigned to surface both label and URL. This is ticketed separately in #30170,

@jasmussen jasmussen added [Block] Navigation Affects the Navigation Block [Block] Post Navigation Link Affects the Post Navigation Link Block labels Jun 30, 2021
@jasmussen
Copy link
Contributor Author

Worth clarifying that this issue is dependant on #32512 landing first. I think the wavy underline is worth trying — it's easy to tweak the thickness and shape of it, and if we ultimately find it not working, the same spot in the CSS can be used to show some other indicator, like a box, a dot, or anything else.

@jasmussen
Copy link
Contributor Author

Per conversation in #35094 there were concerns both with link behavior and the obviousness of patterns where the label is pre-set, so perhaps this is not the best path forward after all. As an exploration, this took it to the extreme, and now having tried it in a branch, we can pull back a little. I'll update the tracking issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Link Affects the Navigation Link Block [Block] Navigation Affects the Navigation Block
Projects
None yet
Development

No branches or pull requests

2 participants