Gutenberg: Navigation Block: Improve initial state.

Created on 6 Nov 2019  路  14Comments  路  Source: WordPress/gutenberg

Right now adding a navigation block loads all top level pages. We should instead use the placeholder patterns to allow users to choose whether they want to start with existing pages, import an existing menu, or start from scratch.

@melchoyce created this mockups some time ago to address this need:

Some older mockups around the placeholder:

image

image

image


I see two separate tasks here:

  • [ ] Add placeholder component with initial options for load existing top-level pages (current behaviour) and start from scratch (empty menu).
  • [ ] Add ability to import an existing menu (if one exists).
Needs Copy Review [Block] Navigation [Status] In Progress [Type] Task

Most helpful comment

So as things stand for MVP it looks like we're going to ship with this implementation. We can then iterate towards:

  • Shaun's designs.
  • Adding Menus

...in follow up PRs.

All 14 comments

I totally agree there should be a better placeholder. I will assign this to myself and work on some mockups today.

Happy to wrangle the dev on this one once we have a design.

Just noting:

  • that "existing menu" may require adding a new REST API endpoint to allow us to access Menus.
  • the Link UI doesn't currently support "Categories". Therefore creating a menu with these in could be a problem in terms of editing.

I have been going backwards and forwards on this a bit tonight. I have settled I think on a potential direction which either works or can serve as idea fuel for an iteration tomorrow.

If we can link to existing menus here is my suggestion:

navigation-placeholder

I didn't add a skip as for me the 'skip' is to create a blank page. I actually don't like the 'fill it out with all pages' option, but maybe that could be the default if people prefer there. Maybe it's an option though to 'add all pages'.

The second is perhaps the easiest to do in version one if accessing menus isn't easy:

Frame 5

@getdave I think the second option above is what we need at this stage right?

I would agree @draganescu.

It would be good it @mtias could confirm he's happy to skip the Menu piece for now, we can split that into a separate Issue.

Thanks for the design and thinking @karmatosed 馃憤

I'll take this one unless anyone objects.

It would be good it @mtias could confirm he's happy to skip the Menu piece for now, we can split that into a separate Issue.

Yes, happy with that.

I have some feedback on the design.

  • The button text seems a bit too long and repetitive ("Create..."), can we simplify?
  • It should also be possible to fit the two buttons in a row with terser actions.

Frame 6

This is a suggestion but we can have a copy review also. I choose a button and menu as really don't like when we have 2 buttons, but if that's something people want it can change.

Maybe the first one could say "All Top Pages" or similar.

I feel like I want the button and link to say "Create page menu" and "Create empty menu" for parity and clarity.

Even better, maybe, would be something like "Create page menu" and "Create custom menu," with updated text above that says something like "Create a menu that includes all of your site's current pages, or build a custom menu with a mix of links."

(Which also makes me just want two buttons, to show that these are two different but equal options, but I'm not a designer :) )

I've created this PR with a reasonable approximation of the design. Feel free to leave further feedback there for me to action.

@mtias I have a technical query that I could do with some assistance on if possible.

I remember Matt saying we're getting away from calling this a "menu". Should this be something we reflect in this work? "Menu" does feel nice in context to how the wording is structured, but if moving away from that word is a goal, we should align that here too.

Worked up a few more ideas around the Navigation block's initial state. The first uses two buttons with a skip to let you choose from either your existing pages or existing menus (if one or more exists):

nav initial state 1

The second mockup uses radio buttons to outline all the available options:

nav initial state 2

The third mockup simplifies things down to adding all top-level pages, a dropdown for existing menus (if they exist) and a skip button:

image

After posting my comment above, I refreshed the page and realized I didn't see a bunch of comments. (Never trust Github to be up-to-date.)

That said, here's another option we could consider:

nav initial state 3

So as things stand for MVP it looks like we're going to ship with this implementation. We can then iterate towards:

  • Shaun's designs.
  • Adding Menus

...in follow up PRs.

Was this page helpful?
0 / 5 - 0 ratings