-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 Sidebar: Hide behind the experiment flag #46710
Conversation
Size Change: +11 B (0%) Total Size: 1.32 MB
ℹ️ View Unchanged
|
@@ -69,7 +69,7 @@ export function SidebarComplementaryAreaFills() { | |||
// See https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/feature-flags.md#dead-code-elimination. | |||
let MaybeNavigationMenuSidebar = Fragment; | |||
|
|||
if ( process.env.IS_GUTENBERG_PLUGIN ) { | |||
if ( window?.__experimentalEnableOffCanvasNavigationEditor === true ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking note: other (most?) experimental flags are assigned to a variable before use.
E.g.
const isOffCanvasNavigationEditorEnabled =
window?.__experimentalEnableOffCanvasNavigationEditor === true;
if ( isOffCanvasNavigationEditorEnabled ) {
// ...
}
The only other occurrence I could find of the global used directly is another off-canvas nav flag:
Line 53 in c05d7c5
if ( window?.__experimentalEnableOffCanvasNavigationEditor ) { |
Whatever, not a big deal, IMHO. 🙂
Ok let's bring this in. If there are concerns we can always revert! |
What?
This changes the conditions under which we make the navigation sidebar visible.
Why?
As raised in Automattic/wp-calypso#71278, this sidebar is quite broken and not a great experience. We hope that the Navigation List View experiment will improve this experience, so lets make this sidebar dependent on that flag being enabled.
How?
Just changing the conditional
Testing Instructions
Testing Instructions for Keyboard
As above
Screenshots or screencast
With the experiment flag disabled:
With the experiment flag enabled: