Wp-calypso: FSE: Navigation menu block styles are broken if site does not have primary and footer menus

Created on 3 Jul 2019  路  2Comments  路  Source: Automattic/wp-calypso

Steps to reproduce

  1. Check out branch and follow instructions in https://github.com/Automattic/wp-calypso/tree/master/apps/full-site-editing#build-system. Install the FSE plugin, and activate it on local gutenberg dev
  2. Make sure that your site has no Primary or Footer menu defined
  3. Compare the header content in the edit view and published page view with that of a standard 2019 theme site. The navigation menus should display roughly the same, but styling is different, eg. multiple menu items will display on new lines instead of inline.
  4. Add a Primary and Footer to the site and check edit and page views again - they should now be the same as a standard 2019 site.

Nav menu with no site menus defined:
Screen Shot 2019-07-03 at 3 53 48 PM

Nav menu with site menus defined:

Screen Shot 2019-07-03 at 3 56 12 PM

What is expected

Some discussion needed about this. Possibly the menu should not be rendered if the site does not have any menus defined. wp_get_nav_menu_object( $locations[ $args->theme_location ] ); returns false if no menu for given location so this could be used to bail early if no menu defined.

[Goal] Full Site Editing [Pri] Normal [Type] Bug

Most helpful comment

I have a potential fix for this almost sorted, but phpcs has decided to pack a sad for me so couldn't get up a PR, should be able to sort first thing in the morning

All 2 comments

@glendaviesnz @vindl @gwwar I think this one is a blocker for having a working Modern Business by the end of the sprint.

I have a potential fix for this almost sorted, but phpcs has decided to pack a sad for me so couldn't get up a PR, should be able to sort first thing in the morning

Was this page helpful?
0 / 5 - 0 ratings