-
Notifications
You must be signed in to change notification settings - Fork 4.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
Global styles: do not navigate twice to home screen when opening the sidebar #65523
Global styles: do not navigate twice to home screen when opening the sidebar #65523
Conversation
Size Change: -16 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
Flaky tests detected in 34c3550. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10958908801
|
@ramonjd @andrewserong @Mamaduka I'm not really sure if this change introduces unintended regressions, but I figured you are the most indicated reviewers as you worked on #59261 |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Hmm I'm seeing a max depth exceeded in the 2024-09-23.10.32.09.mp4I'll see if I can get more info... |
I was seeing that, too. I've just rebased against Edit: possibly resolved by #65533 |
if ( path !== '/' && ! isRevisionsOpen ) { | ||
return; | ||
if ( path !== '/' && isRevisionsOpen ) { | ||
goTo( '/' ); |
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, in my testing so far, I think we could get right of the entire default block.
Kapture.2024-09-23.at.10.50.28.mp4
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.
Me likes more red! Pushed an update with the whole default
block removed
Good call! Thanks Edit: working normally now. 👍🏻 I'm still convinced that getting right of the entire default block wouldn't hurt. I can't yet see any difference in behaviour. |
34c3550
to
0924465
Compare
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 the update, all working nicely for me now! 🚀
LGTM! I'll merge |
…sidebar (#65523) * Global styles: do not navigate twice to home screen on sidebar load * Remove whole default block Co-authored-by: ciampo <[email protected]> Co-authored-by: ramonjd <[email protected]> Co-authored-by: andrewserong <[email protected]>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: 7d60169 |
What?
Extracted from #64777
Prevent
Navigator
from navigating twice to the home screen when opening the Global Styles sidebar.Why?
The double navigation cause the first screen displayed in the Global Styles sidebar to animate, which is not the expected behavior (the enter animation should be skipped on the first screen)
How?
By inverting the logic of a check inside a
useEffect
in the global styles sidebar code.Testing Instructions
Screenshots or screencast
trunk
)Kapture.2024-09-20.at.14.24.56.mp4
Kapture.2024-09-20.at.14.26.11.mp4