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

Disable "block-nav-menus" feature for the purposes of removing the "experimental" status on the Navigation Editor #34444

Merged
merged 1 commit into from
Sep 2, 2021
Merged

Disable "block-nav-menus" feature for the purposes of removing the "experimental" status on the Navigation Editor #34444

merged 1 commit into from
Sep 2, 2021

Conversation

anton-vlasenko
Copy link
Contributor

@anton-vlasenko anton-vlasenko commented Sep 1, 2021

Description

For the purposes of removing the "experimental" status on the Navigation Editor, we agreed we would disable the theme opt-in from the screen until core developers have had enough time to improve the feature. That means no additional blocks.
Fixes #34265.

Steps to test this PR.

  1. Enable support for the block-nav-menus feature.
    If you theme doesn't support this feature you can "enable" it programmatically by modifying the plugins/gutenberg/lib/navigation-page.php file.
    To do so go to that file and add this line
get_theme_support( 'block-nav-menus' );

at the very beginning of the gutenberg_navigation_init's function body (around line 31).
2. Go to the Gutenberg ->Navigation Editor -> Experiments page.
3. Enable the Enable Navigation screen setting, save the changes.
Screenshot 2021-09-01 at 21 23 06
4. Go to the Gutenberg -> Navigation page.
5. Create a new menu.
6. Click on the "Start empty" link.
Screenshot 2021-09-01 at 21 28 24
7. Click on the plus sign.
Expected result:
Make sure you only see "regular" menu items like those on the screenshot below:
Screenshot 2021-09-01 at 21 28 30
You shouldn't see block menu items, like Social Links block on the screenshot below:
Screenshot 2021-09-01 at 21 50 36

Types of changes

New feature / Breaking change.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@anton-vlasenko anton-vlasenko changed the title [WIP] For the purposes of removing the "experimental" status on the Navigat… Disable "block-nav-menus" feature for the purposes of removing the "experimental" status on the Navigation Editor Sep 1, 2021
@anton-vlasenko
Copy link
Contributor Author

anton-vlasenko commented Sep 1, 2021

I'm not sure if we can use the @see tag in inline comments (I mean not in the PHPDOC block).
Is there a better way to document these changes?

…ion Editor, we agreed we would disable the theme opt-in from the screen until core developers have had enough time to improve the feature. That means no additional blocks.
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.

Thanks @anton-vlasenko! LGTM

I'm not sure if we can use the @see tag in inline comments (I mean not in the PHPDOC block).
Is there a better way to document these changes?

This seems fine to me. I'm not sure whether documentation generation will pick them up, but these inline docs won't be picked up anyway.

@talldan talldan merged commit 5b704ad into WordPress:trunk Sep 2, 2021
@github-actions github-actions bot added this to the Gutenberg 11.5 milestone Sep 2, 2021
@anton-vlasenko
Copy link
Contributor Author

Thank you for the review, @talldan !

@anton-vlasenko anton-vlasenko deleted the add/temporarily-disable-theme-opt-in-for-block-nav-menus branch September 2, 2021 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Temporarily disable support for theme-opt for block-nav-menus from the Nav Editor
3 participants