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

Remove Navigation screen from experiments page #40878

Merged
merged 3 commits into from
May 20, 2022

Conversation

getdave
Copy link
Contributor

@getdave getdave commented May 6, 2022

What?

📣 This is not a formal removal or ending of the Navigation Editor project. It is a stop gap whilst we consider the future of the project. See Why below.

As suggested in #40822 (comment) by @talldan, this PR removes the Navigation screen from the Gutenberg Experiments page. This means it can now only be accessed directly via URL.

Why?

Contributors are getting bug reports regarding this screen but it is not currently being actively maintained or worked on. This takes up time.

I decided against completely deleting the feature because there's been no official discussion or decision on that. However, this is a nice simple step that will help stem the flow of Issues being reported for a project which is not maintained.

How?

Removes the screen from the PHP which registers items on the Experiments page.

Testing Instructions

  1. Goto Experiments page at http://localhost:8888/wp-admin/admin.php?page=gutenberg-experiments
  2. Verify that the Navigation Editor experiment no longer appears.

Screenshots or screencast

@getdave getdave added [Type] Code Quality Issues or PRs that relate to code quality [Feature] Navigation Screen labels May 6, 2022
@getdave getdave self-assigned this May 6, 2022
@getdave getdave requested a review from spacedmonkey as a code owner May 6, 2022 08:18
@talldan
Copy link
Contributor

talldan commented May 6, 2022

Nice, thanks for doing that so quickly!

There might be some users who have the option already enabled and will be unable to turn it off with this change. I think this is the code that adds the wp admin menu entry:

gutenberg/lib/init.php

Lines 33 to 44 in df8647c

if ( get_option( 'gutenberg-experiments' ) ) {
if ( array_key_exists( 'gutenberg-navigation', get_option( 'gutenberg-experiments' ) ) ) {
add_submenu_page(
'gutenberg',
__( 'Navigation (beta)', 'gutenberg' ),
__( 'Navigation (beta)', 'gutenberg' ),
'edit_theme_options',
'gutenberg-navigation',
'gutenberg_navigation_page'
);
}
}

I wonder if it's worth doing something like this:

        // The navigation editor menu item is temporarily removed by hardcoding `false` here.
        // See https://github.com/WordPress/gutenberg/pull/40878 for more info.
	if ( false && get_option( 'gutenberg-experiments' ) ) {

What do you think?

@getdave
Copy link
Contributor Author

getdave commented May 6, 2022

Great thinking @talldan as always 🙇

Copy link
Contributor

@draganescu draganescu left a comment

Choose a reason for hiding this comment

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

Aside from @talldan 's great suggestion this is good.

getdave added a commit that referenced this pull request May 13, 2022
@getdave
Copy link
Contributor Author

getdave commented May 13, 2022

OK @talldan I've made the changes. What do you think?

@getdave getdave requested a review from draganescu May 18, 2022 11:22
lib/init.php Outdated Show resolved Hide resolved
@getdave getdave force-pushed the update/hide-navigation-editor-screen branch from 238ab09 to fcb7ca5 Compare May 20, 2022 10:42
@getdave getdave merged commit 7dbb294 into trunk May 20, 2022
@getdave getdave deleted the update/hide-navigation-editor-screen branch May 20, 2022 12:08
@github-actions github-actions bot added this to the Gutenberg 13.4 milestone May 20, 2022
westonruter added a commit that referenced this pull request May 23, 2022
…p-tests-config

* 'trunk' of github.com:WordPress/gutenberg: (88 commits)
  Components: refactor `AlignmentMatrixControl` to pass `exhaustive-deps` (#41167)
  [RNMobile] Add 'Insert from URL' option to Image block (#40334)
  [RNMobile] Improvements to Getting Started Guides (#40964)
  Post Author Name: Add to and from Post Author transformations (#41151)
  CheckboxControl: Add unit tests (#41165)
  Improve inline documentation (#41209)
  Mobile Release v1.76.1 (#41196)
  Use explicit type definitions for entity configuration (#40995)
  Scripts: Convert file extension to js in `block.json` during build (#41068)
  Reflects revert in 6446878 (#41221)
  get_style_nodes should be compatible with parent method. (#41217)
  Gallery: Opt-in to axial (column/row) block spacing controls (#41175)
  Table of Contents block: convert line breaks to spaces in headings. (#41206)
  Add support for button elements to theme.json (#40260)
  Global Styles: Load block CSS conditionally (#41160)
  Update URL (#41188)
  Improve autocompleter performance (#41197)
  Site Editor: Set min-width for styles preview (#41198)
  Remove Navigation Editor screen from experiments page (#40878)
  Fix broken Page title for pages created inline within in Nav block (#41063)
  ...
@mrfoxtalbot
Copy link

@getdave, if the Navigation Screen has been removed, does that mean we could review and close pretty much all the open related issues?

@getdave
Copy link
Contributor Author

getdave commented Aug 25, 2022

@getdave, if the Navigation Screen has been removed, does that mean we could review and close pretty much all the open related issues?

I think that's reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants