-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(navigation): Simplify initial route logic (#6223)
### Description This PR overhauls how we handle the initial route logic for the app. The main difficulty in determining the initial route is onboarding. Previously, we collected various bits and pieces of random information and used them in aggregate, along with some custom logic, as a proxy for what screen the user left off at during onboarding. With this PR, we write state directly to redux during onboarding about the _first screen_ present in the user's current onboarding step. On startup, we set the initial route to this screen, less a couple of edge cases. (This means that a user will always be dropped back at the _beginning_ of their current onboarding step.) ### Test plan Unit and manual tested. See video below. https://github.com/user-attachments/assets/a2312a02-a590-483e-953d-ebcebc25c509 ### Related issues - Fixes #[issue number here] ### Backwards compatibility <!-- Brief explanation of why these changes are/are not backwards compatible. --> ### Network scalability If a new NetworkId and/or Network are added in the future, the changes in this PR will: - [ ] Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)
- Loading branch information
Showing
23 changed files
with
571 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,6 @@ module.exports = { | |
navigate: jest.fn(), | ||
reset: jest.fn(), | ||
setParams: jest.fn(), | ||
canGoBack: jest.fn(), | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.