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

Navigation: Remove filters disabling tabs for link and submenu #47593

Merged

Conversation

aaronrobertshaw
Copy link
Contributor

Related:

What?

Removes the filters for Navigation Link & Submenu blocks that disable block inspector tab display.

Why?

Once #47592 lands, the settings tab will be the default tab. It was the need to display the settings tab by default when we couldn't programmatically change the tab selection that led to these filters being introduced.

How?

Delete the filters disabling tabs from each block.

Testing Instructions

  1. Apply the changes from Block Inspector: Make Settings tab the default #47592 as well as this PR.
  2. Add a Navigation block containing a submenu and additional links.
  3. Select the Navigation block and click the edit button beside the submenu within the Nav block's List View tab.
  4. The Navigation Submenu block should not display tabs, as it has no controls for the Styles tab.
  5. Navigate back to the Navigation block. This time click the edit icon beside one of the Navigation Link blocks in the List View tab.
  6. Ensure the Navigation Link block shows both the Settings and Styles tabs. Settings should be selected by default.

Screenshots or screencast

Screen.Recording.2023-01-31.at.3.50.33.pm.mp4

@getdave
Copy link
Contributor

getdave commented Jan 31, 2023

Will test once #47592 lands. Thank you for considering the need to retain "Settings" as the default tab for these blocks.

@talldan talldan added [Type] Task Issues or PRs that have been broken down into an individual action to take [Block] Navigation Link Affects the Navigation Link Block [Block] Submenu Affects the Submenu Block - for submenus in navigation labels Feb 1, 2023
Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rebased it when testing locally to bring in some other recent changes - removal of the offcanvas editor button and 'settings' as the first tab. There are also now 'dimension' tools for the submenu block.

It's working really well, and feels more consistent than earlier version:

Kapture.2023-02-01.at.14.17.30.mp4

@aaronrobertshaw aaronrobertshaw merged commit f52ddf3 into trunk Feb 1, 2023
@aaronrobertshaw aaronrobertshaw deleted the try/removing-tab-filters-for-innner-nav-blocks branch February 1, 2023 06:24
@github-actions github-actions bot added this to the Gutenberg 15.1 milestone Feb 1, 2023
@juanmaguitar juanmaguitar added the [Type] Enhancement A suggestion for improvement. label Feb 1, 2023
@getdave
Copy link
Contributor

getdave commented Feb 1, 2023

Nice work here @aaronrobertshaw 👏

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] Submenu Affects the Submenu Block - for submenus in navigation Needs User Documentation Needs new user documentation [Type] Enhancement A suggestion for improvement. [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants