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

Outline button variation slow-load styles in TT4 #62668

Closed
bgardner opened this issue Jun 18, 2024 · 8 comments · Fixed by #63071
Closed

Outline button variation slow-load styles in TT4 #62668

bgardner opened this issue Jun 18, 2024 · 8 comments · Fixed by #63071
Assignees
Labels
[Block] Buttons Affects the Buttons Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@bgardner
Copy link

bgardner commented Jun 18, 2024

Description

Likely a bi-product of work done in #62451, there seems to be a lag during the styling in the editor (on page load) for buttons with the outline variation. (Original issue was fixed, now the lag exists)

Step-by-step reproduction instructions

  1. Go to a post or page and add the buttons block.
  2. Create a button, apply Outline variation.
  3. See bug.

Screenshots, screen recording, code snippet

Screen.Recording.2024-06-18.at.3.28.18.PM.mov

Environment info

WordPress 6.6 beta3 (Gutenberg NOT active)
Issue goes away with Gutenberg 18.5 active.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

@bgardner bgardner added the [Type] Bug An existing feature does not function as intended label Jun 18, 2024
@bgardner
Copy link
Author

@aaronrobertshaw
Copy link
Contributor

Thanks for flagging this @bgardner 👍

I'm not sure what the cause is yet however it does appear isolated to the post editor as there is no styling flash in the site editor. My hunch is the variation styling in the post editor relies on global styles data set in the editor settings which is likely loaded asynchronously causing the delay.

@bgardner
Copy link
Author

@aaronrobertshaw Can confirm the site editor does not experience the lag. Can you confirm the lag in the post editor on your end?

@aaronrobertshaw
Copy link
Contributor

Can you confirm the lag in the post editor on your end?

Yes, I tested this before making my prior comment that the issue is isolated to the post editor.

I've checked with and without Gutenberg active using the latest 6.6 beta.

@akasunil akasunil added the [Block] Buttons Affects the Buttons Block label Jun 19, 2024
@justintadlock
Copy link
Contributor

I was just coming to report this. I'm always seeing this flash of the wrong style when loading the Post Editor.

@bgardner
Copy link
Author

Maybe we can get this resolved in RC2?

@aaronrobertshaw
Copy link
Contributor

I'd like to think we can come up with something for this as quickly hacking around providing the global styles data from the server side initially, as a fallback, successfully prevented the flash of styles.

It will need some deeper thought though to be able to come up with a proper solution that doesn't negatively impact performance too much.

@aaronrobertshaw
Copy link
Contributor

I have a potential fix for the flash of variation styles in the post editor up in #63071.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
4 participants