-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Site Editor: don't hide nav after Gutenberg 12.2 #58830
Conversation
Link to Calypso live: https://calypso.live?image=registry.a8c.com/calypso/app:build-22790 |
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
5f26445
to
7bf5ff8
Compare
This PR modifies the release build for editing-toolkit To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-mMA-p2 |
@@ -338,6 +338,10 @@ function load_tags_education() { | |||
* (Core Full Site Editing) | |||
*/ | |||
function load_wpcom_site_editor() { | |||
// This is no longer needed after Gutenberg 12.1 due to the Navigation menu no longer being inscrutable. |
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.
Is this comment necessary? I feel that people can always refer to the git blame
, check the PR and the explanation on why it is not needed anymore. Comments are often misleading, get outdated pretty quickly, and pollute the source code.
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.
The point of this code comment is to encourage future maintainers to investigate if this can be removed, should I not get to it. But your point is a fair one, given the number of years-later @todo
and @fixme
comments strewn about.
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.
How about an issue instead of a comment? You could even link it as a comment inside the code.
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.
I think its a handy companion to the version check below. As long as we are conditionally enabling functionality based off a magic gutenberg version number, it seems good to note why for easy reference.
Hopefully it wont get outdated or misleading, as it is accurate to the code beneath it. When that code is updated, then the comment should be as well. Ideally, once we don't support any pre-12.2 Gutenberg version on dotcom anymore we can just remove this entire site editor section of this plugin.
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.
How about an issue instead of a comment?
An issue sounds good to me in addition, so we can just get rid of all of this in the near future - #59295
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.
Thanks for creating that issue @Addison-Stavlo ! I intended to do the same but this has been the week of inability to maintain an attention span.
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.
Works perfectly on my end 👍
@@ -338,6 +338,10 @@ function load_tags_education() { | |||
* (Core Full Site Editing) | |||
*/ | |||
function load_wpcom_site_editor() { | |||
// This is no longer needed after Gutenberg 12.1 due to the Navigation menu no longer being inscrutable. | |||
if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '12.1.0', '>=' ) ) { |
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.
This should be updated to 12.2.0
. I also think that instead of conditional loading we can delete this code and folder after it lands 12.2 lands in production.
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.
Yup this should all be removed after 12.2.0
hits production. This is simply a mechanism to deploy for edge
and production
simultaneously.
ca2c667
to
4a9f6c2
Compare
Changes proposed in this Pull Request
Gutenberg 12.2 (ahead of and for WP 5.9) has a new, drastically scaled-back Navigation Sidebar. The
< Dashboard
link is no longer nested-away-by-default, so we can stop hijacking the (W) menu to go back to the Dashboard directly.This also prevents the weird state in which you could open the nav sidebar by picking "browse templates" from the top middle template dropdown without being able to close it again. There was probably an issue about that.
Testing instructions
gutenberg-edge
sticker.npm run build:plugin-zip
in thegutenberg-core/v12.1.0-rc.1
directory on your sandbox to overwrite it. (If you sync a working repo without building, you won't have the requiredGUTENBERG_VERSION
PHP constant.)< Dashboard
link takes you back to Calypso home.