-
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
Live Preview: Fix the Save button wasn't overriden correctly #95639
Conversation
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
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. |
} | ||
// Delay it to ensure the element is visible. | ||
const timeout = window.setTimeout( () => { | ||
if ( canvasMode === 'view' ) { |
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.
Hmm, maybe we don't need the delay in view
mode? I don't think it's broken. The delay itself makes it a bit confusing 🥲
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 it's more consistent for both view and edit mode and it's safer for any dom manipulation regardless of the order of loading.
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.
In refreshing edit mode, I am seeing the "You are previewing..." banner first and then it gets replaced with "Get access to..." banner. I don't see this behavior in production.
Screen.Capture.on.2024-10-24.at.11-35-35.mp4
Maybe we can live with this tradeoff because we assume that user will first open the view mode first while the theme is still loading 🥲 |
I made changes to check whether the editor is ready only for the upgrade button and it seems to look better. |
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.
It's much better now 👍
Wondering why it broke? I am pretty sure it worked fine in the past 🤔
I'm not sure but maybe something changed in Gutenberg 🙈 |
* Live Preview: Fix the Save button wasn't overriden correctly * Check whether the editor is ready only for the upgrade button
Related to #95611
Proposed Changes
wordpress.com/checkout/:site/:plan
page if the site didn't have the ability to activate the previewing theme. However, there was CORS issue so the error would show.Why are these changes being made?
Testing Instructions
Pre-merge Checklist