-
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
Navigator: fix isInitial logic #65527
Conversation
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. |
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.
Makes sense, thanks for the fix 🚀
652b56a
to
014f023
Compare
The failing tests seem unrelated FWIW. |
014f023
to
65baea0
Compare
Yeah, the e2e test failures are about block bindings and can be seen across many other PRs, so they they're not related. All e2e and unit tests related to these changes are passing, so I'm going to merge anyway. |
There was a conflict while trying to cherry-pick the commit to the wp/6.7 branch. Please resolve the conflict manually and create a PR to the wp/6.7 branch. PRs to wp/6.7 are similar to PRs to trunk, but you should base your PR on the wp/6.7 branch instead of trunk.
|
The backport has a conflict because of #65564 not being backported yet. Let's wait for that PR to be backported first |
* Navigator: fix isInitial logic * CHANGELOG --- Co-authored-by: ciampo <[email protected]> Co-authored-by: tyxla <[email protected]>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: bc3af46 |
What?
Discovered while working on #65523
Set the
isInitial
flag tofalse
in the internalNavigator
reducer only when effectively navigating to a new screen.Why?
Previously, the
isInitial
flag was set tofalse
on every navigation, even the ones that were not leading to effectively navigating to a new screen. This was causing unwanted side effects, like the one flagged in #65523How?
The
isInitial
flag is set tofalse
only when navigating to a new location.Testing Instructions
In Storybook:
Navigator
In the editor:
Screenshots or screencast
trunk
)Kapture.2024-09-20.at.14.24.56.mp4
Kapture.2024-09-20.at.14.26.11.mp4