You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Navigation Block: Reconsider placeholder state #23207
When adding a Navigation block to a document, you see the block's placeholder state.
There's a number of things that this UI is trying to do, including:
Create a new, empty menu.
Create a new menu using a sites existing Pages.
Choose a previously created menu to populate a new menu.
I think the dropdown UI is a little complicated, and the current copy is awkward to read. There's an issue to update the copy, but it's kind of stalled; The UI is difficult to explain.
Looking at the Image block for inspiration I wound up with something like this:
This feels a little easier to understand, but it is still a rather large representation of a real websites navigation. Lets take a look at it in the context Full Site Editing, where you would be adding a Navigation block to a page template:
After digging through more of the previous Issues and PRs around this subject, I tried rethinking things a little bit; What if we default to adding an empty menu (1 above), with shortcuts for adding existing Pages or Menu's (2 and 3 above):
An alternative to this is to default to a menu containing all top-level Pages, with a somewhat hidden option to remove all Link blocks within the menu:
I like where you landed Shaun. Your first iterations that followed the Image block still left some confusion around how the "Add existing menu" option would work. I believe that's why a dropdown was proposed.
The further iterations to just add all top-level pages automatically remind me of some very early concepts that were explored. When seeing this block added to a template, I agree that this direction fits better in the allotted space than showing a large placeholder screen.
The last iteration also works better than the option to "Add all page" because it just focuses on top-level pages and not on ALL pages. If I were to add all pages, I'd assume sub-pages would also be added automatically. This could get a little daunting.
While it's somewhat hidden, the "Remove all links" option is vital and I'm glad that's being considered.
I'm still left wondering about existing menus though. If I've got an existing menu for my Footer already built, how would I select it from the block in regards to your last iteration?
An alternative to this is to default to a menu containing all top-level Pages, with a somewhat hidden option to remove all Link blocks within the menu:
The more I think about this idea, the more it makes sense to me in a majority of situations. What if I go to add a menu to my header and I just insert it, maybe arrange the links a little, and that's it?! I think it would feel like I inserted a menu and not a container for a DIY menu.
There are pitfalls:
It isn't the most straightforward to move or remove current links. I think this is the biggest blocker to an "Add all links by default" method.
What happens on sites with hundreds of pages? Perhaps we could detect this and default to an empty state with a warning letting the user decide if they want to spawn a huge menu?
Shaun, an idea that I heard Matías float, could the quick inserter absorb some of this functionality? I don't have a full mental picture of how it might work, but if the quick inserter is limited to the allowed child blocks, could it also hold options to insert a full menu? I imagine Riads new inserter might accommodate it potentially #22789
@jasmussen there is an open topic to start developing a Pages block that would track the pages structure.
This Pages block doesn't solve all issues immediately (say a site with a hundred pages) but it could alleviate some of the burden of the Navigation block. Also filtering and customizing this Pages block is easier in a stand along fashion, without the other options of a Navigation.
If we go wild we could have a block for "Legacy menu" :) - I don't think this is a great idea, but thought I'd mention it to maybe spark some other idea. This delegation to more particular blocks could make the Navigation block more useable and easier to grasp.
What if we default to adding an empty menu (1 above), with shortcuts for adding existing Pages or Menu's (2 and 3 above):
I love this idea! It's much more flexible than defaulting to top-level pages, because if we want to create a completely different menu, we don't have to delete all our pages first. Having it empty and the options to add stuff a click away seems ideal.
I wonder if it would make sense to have the ability to add and combine multiple existing menus too.
could the quick inserter absorb some of this functionality? I don't have a full mental picture of how it might work, but if the quick inserter is limited to the allowed child blocks, could it also hold options to insert a full menu?
As a wireframe and concept, this feels like it checks the boxes of allowing you to quickly add a specific menu, without having a giant setup state full of dropdowns and boxes and cogs, yet it still uses existing UI — the inserter and the plus button.
Question: once you've inserted an existing menu, or "all pages" — the behavior of the plus changes, doesn't it? I guess this is why you're using the big white appender button in the empty state, and presumably the black plus button would take over when no longer empty?
The only downside I see to this approach, is that in its empty state, it still doesn't look like a "navigation menu" — it's just a white blob. Smaller and with a plus, but still. This is no worse than what we have today, and solves a lot of problems, but it speaks to a larger issue we should keep thinking about: how can we improve the setup states to look more like the end results.
@shaunandrews@jasmussen we also seem to have this issue #20853 on the same topic. Should we close that and track here? If so just making sure we're updated with the discussion there :)
I like the concept of the "All Pages"/"Pages" block and being able to convert it to Navigation Link blocks. It reminds me of something I have in my Table of Contents block PR, where the Table of Contents can be transformed into a List block if you want to customize the order/links, though this comes at the cost of losing the auto-add-headings-to-the-list functionality.
In an attempt to make the Navigation screen project board contain only issues that are needed to ship the new Navigation screen, I removed this issue from the board and created #23953 which is smaller in scope.
Removing the big "Navigation" label from the placeholder... would that be an accessibility regression?
I don't think so. The block type is already announced as you enter the block. In the case of the Image block, you hear "Block: Image, group" when you focus the block. If I hit tab I jump straight to the Upload button.
I'd expect for this to be a similar case on this block: "Block: Navigation, group", if I then hit tab I'd hear: "Add all pages, button"
There's also a great deal of usability to consider, insofar as the compact placeholder state actually looks even a smidgeon like the final result. That definitely conveys the purpose of the block setup state in a way a big white slab doesn't.
Love it, Shaun, and in fact the social links placeholder state was inspired by your mockups right in this thread. Definitely agree this is worth trying.
perhaps inheriting some colors from the theme
We can use currentColor and opacity and it should work.
Activity
mapk commentedon Jun 16, 2020
I like where you landed Shaun. Your first iterations that followed the Image block still left some confusion around how the "Add existing menu" option would work. I believe that's why a dropdown was proposed.
The further iterations to just add all top-level pages automatically remind me of some very early concepts that were explored. When seeing this block added to a template, I agree that this direction fits better in the allotted space than showing a large placeholder screen.
The last iteration also works better than the option to "Add all page" because it just focuses on top-level pages and not on ALL pages. If I were to add all pages, I'd assume sub-pages would also be added automatically. This could get a little daunting.
While it's somewhat hidden, the "Remove all links" option is vital and I'm glad that's being considered.
I'm still left wondering about existing menus though. If I've got an existing menu for my Footer already built, how would I select it from the block in regards to your last iteration?
MichaelArestad commentedon Jun 16, 2020
The more I think about this idea, the more it makes sense to me in a majority of situations. What if I go to add a menu to my header and I just insert it, maybe arrange the links a little, and that's it?! I think it would feel like I inserted a menu and not a container for a DIY menu.
There are pitfalls:
jasmussen commentedon Jun 16, 2020
Shaun, an idea that I heard Matías float, could the quick inserter absorb some of this functionality? I don't have a full mental picture of how it might work, but if the quick inserter is limited to the allowed child blocks, could it also hold options to insert a full menu? I imagine Riads new inserter might accommodate it potentially #22789
draganescu commentedon Jun 17, 2020
@jasmussen there is an open topic to start developing a Pages block that would track the pages structure.
This Pages block doesn't solve all issues immediately (say a site with a hundred pages) but it could alleviate some of the burden of the Navigation block. Also filtering and customizing this Pages block is easier in a stand along fashion, without the other options of a Navigation.
If we go wild we could have a block for "Legacy menu" :) - I don't think this is a great idea, but thought I'd mention it to maybe spark some other idea. This delegation to more particular blocks could make the Navigation block more useable and easier to grasp.
cc @shaunandrews
tellthemachines commentedon Jun 19, 2020
I love this idea! It's much more flexible than defaulting to top-level pages, because if we want to create a completely different menu, we don't have to delete all our pages first. Having it empty and the options to add stuff a click away seems ideal.
I wonder if it would make sense to have the ability to add and combine multiple existing menus too.
shaunandrews commentedon Jun 19, 2020
Maybe something like this, @jasmussen
jasmussen commentedon Jun 19, 2020
That just might work! Could add the basic "all pages" there too.
shaunandrews commentedon Jun 19, 2020
jasmussen commentedon Jun 22, 2020
As a wireframe and concept, this feels like it checks the boxes of allowing you to quickly add a specific menu, without having a giant setup state full of dropdowns and boxes and cogs, yet it still uses existing UI — the inserter and the plus button.
Question: once you've inserted an existing menu, or "all pages" — the behavior of the plus changes, doesn't it? I guess this is why you're using the big white appender button in the empty state, and presumably the black plus button would take over when no longer empty?
The only downside I see to this approach, is that in its empty state, it still doesn't look like a "navigation menu" — it's just a white blob. Smaller and with a plus, but still. This is no worse than what we have today, and solves a lot of problems, but it speaks to a larger issue we should keep thinking about: how can we improve the setup states to look more like the end results.
Nice work, Shaun!
draganescu commentedon Jun 24, 2020
@shaunandrews @jasmussen we also seem to have this issue #20853 on the same topic. Should we close that and track here? If so just making sure we're updated with the discussion there :)
jasmussen commentedon Jun 24, 2020
They do seem to tackle the same problem, yes, but we need to port the good stuff from this ticket to the other then ;)
draganescu commentedon Jun 24, 2020
I would close that other one.
6 remaining items
ZebulanStanphill commentedon Jul 3, 2020
I like the concept of the "All Pages"/"Pages" block and being able to convert it to Navigation Link blocks. It reminds me of something I have in my Table of Contents block PR, where the Table of Contents can be transformed into a List block if you want to customize the order/links, though this comes at the cost of losing the auto-add-headings-to-the-list functionality.
shaunandrews commentedon Jul 3, 2020
Some more discussion around the proposed Pages block over in #23689.
noisysocks commentedon Jul 15, 2020
In an attempt to make the Navigation screen project board contain only issues that are needed to ship the new Navigation screen, I removed this issue from the board and created #23953 which is smaller in scope.
shaunandrews commentedon Aug 26, 2020
To circle back to this one, I still think an "All Pages" (or more general Page Listing) block makes sense to be inserted by default.
Seeing as we don't have that block right now, we should update the current placeholder so its not so large.
ZebulanStanphill commentedon Aug 26, 2020
Removing the big "Navigation" label from the placeholder... would that be an accessibility regression?
shaunandrews commentedon Aug 26, 2020
How so? There's still the block toolbar (not shown in my screenshot) and the block would still identify itself as a Navigation block.
enriquesanchez commentedon Aug 26, 2020
I don't think so. The block type is already announced as you enter the block. In the case of the Image block, you hear "Block: Image, group" when you focus the block. If I hit
tabI jump straight to the Upload button.I'd expect for this to be a similar case on this block: "Block: Navigation, group", if I then hit
tabI'd hear: "Add all pages, button"jasmussen commentedon Aug 27, 2020
There's also a great deal of usability to consider, insofar as the compact placeholder state actually looks even a smidgeon like the final result. That definitely conveys the purpose of the block setup state in a way a big white slab doesn't.
shaunandrews commentedon Nov 16, 2020
@mkaz is looking at this over in #26947
--
I really dig what @jasmussen proposed for the Social Links block: #26953 (comment)
I tried something similar for the Navigation block and think it might be worth trying it out:
Here's how that could look within a template, perhaps inheriting some colors from the theme:
jasmussen commentedon Nov 17, 2020
Love it, Shaun, and in fact the social links placeholder state was inspired by your mockups right in this thread. Definitely agree this is worth trying.
We can use
currentColorandopacityand it should work.jasmussen commentedon Nov 23, 2020
I'm making progress on this in #27018 (comment).