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

chore: simplify routing logic [Part 2]: navigate.tsx #11186

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

MounirDhahri
Copy link
Member

@MounirDhahri MounirDhahri commented Nov 25, 2024

Description

This PR brings some simplifications to navigate.

The goal here is simple

  • Make it smaller
  • Raise errors in case navigation is not ready (this will help us tell if we are navigating before navigation is ready)

What comes next?
We have two props that do the same thing now: replaceActiveModal and replaceActiveScreen. We can replace both with a simple one.

For reviewers:
I suggest you hide white spaces - start here

PR Checklist

  • I have tested my changes on iOS and Android.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

  • simplify routing logic [Part 2]: navigate.tsx

Need help with something? Have a look at our docs, or get in touch with us.

@MounirDhahri MounirDhahri self-assigned this Nov 25, 2024
@MounirDhahri MounirDhahri marked this pull request as draft November 25, 2024 14:21
@MounirDhahri
Copy link
Member Author

Fixing tests

@MounirDhahri MounirDhahri force-pushed the chore/simplify-navigate-method branch from e1719c0 to 338476a Compare November 25, 2024 15:10
olerichter00
olerichter00 previously approved these changes Nov 25, 2024
Copy link
Contributor

@olerichter00 olerichter00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🌟

@MounirDhahri MounirDhahri marked this pull request as ready for review November 25, 2024 16:35
@ArtsyOpenSource
Copy link
Contributor

This PR contains the following changes:

  • Dev changes (simplify routing logic [Part 2]: navigate.tsx - MounirDhahri)

Generated by 🚫 dangerJS against 5d1787e

@MounirDhahri MounirDhahri merged commit 0e9cb52 into main Nov 25, 2024
6 of 8 checks passed
@MounirDhahri MounirDhahri deleted the chore/simplify-navigate-method branch November 25, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants