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. |
tyxla
left a comment
There was a problem hiding this comment.
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 <mciampini@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org>
|
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
isInitialflag tofalsein the internalNavigatorreducer only when effectively navigating to a new screen.Why?
Previously, the
isInitialflag was set tofalseon 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
isInitialflag is set tofalseonly when navigating to a new location.Testing Instructions
In Storybook:
NavigatorIn the editor:
Screenshots or screencast
trunk)Kapture.2024-09-20.at.14.24.56.mp4
Kapture.2024-09-20.at.14.26.11.mp4