-
Notifications
You must be signed in to change notification settings - Fork 798
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
Calypsoify: Remove unnecessary redirect #17286
Conversation
Currently, if we've specified `?calypsoify=1` or `?calypsoify=0`, we redirect after we set the user meta. While this works, a redirect here is really unnecessary, because we can just enable or disable the flag if this argument is set. A redirect was needed in the original internal plugin version, because it works with cookies; while here, we just set a user meta.
cc @Automattic/jetpack-crew - I've added this under the 9.0 milestone, but if it's too late for that, it should be fine to move it to 9.1. Thanks 🙌 |
Scheduled Jetpack release: October 6, 2020. E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-17286 Thank you for the great PR description! When this PR is ready for review, please apply the |
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 as advertised 👍
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 tests well for me. 🚢
Thanks, Miguel and Jeremy 🙌 |
Currently, if we've specified
?calypsoify=1
or?calypsoify=0
, we redirect after we set the user meta.While this works, a redirect here is really unnecessary, because we can just enable or disable the flag if this argument is set.
A redirect was needed in the original internal plugin version because it works with cookies; while here, we just set a user meta.
This PR removes the redirect and sets the
is_calypsoify_enabled
module flag early enough so we could benefit from it without a redirect.The reason to remove this is outlined in p4TIVU-9p3-p2 - this extra redirect increases the time for Calypsoified editor to load in Calypso. By removing the redirect, we're increasing the perceived performance of the Calypsoified block editor in Calypso.
Changes proposed in this Pull Request:
is_calypsoify_enabled
flag earlyJetpack product discussion
This is related to a similar optimization we're doing on the WP.com side of Calypsoify: D50124-code
Does this pull request change what data or activity we track or use?
No, this change doesn't change any data that we track or use.
Testing instructions:
1
, such as/wp-admin/plugins.php?calypsoify=1
and verify you get a calypsoified view.0
, such as/wp-admin/plugins.php?calypsoify=0
and verify you get a default, non-calypsoified wp-admin view.?calypsoify=1
, load/wp-admin
and verify you no longer get Calypsoify. A redirect should follow, that is expected behavior here 😉Proposed changelog entry for your changes:
is_calypsoify_enabled
flag early.