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

Router: Support RegExp in Route component #23292

Merged
merged 8 commits into from Jul 4, 2023

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Jul 4, 2023

This targets release/7.2 to not disrupt the 7.1 release.

What I did

  • I made the router library more powerful by making the Route component accept a RegExp as a path prop.
  • I improved the Route component interface

How to test

  • unit tests should pass
  • types check should pass
  • no UI changes
  • e2e tests should pass
  • generating a sandbox and navigating from default path (/) to a story, then to settings page should work.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

… split into separate types & use overloads for improved type-safety
@ndelangen ndelangen self-assigned this Jul 4, 2023
@ndelangen ndelangen added the maintenance User-facing maintenance tasks label Jul 4, 2023
@ndelangen ndelangen changed the title Router: supporting regex in the Route component Router: Supporting regex in the Route component Jul 4, 2023
@ndelangen ndelangen changed the title Router: Supporting regex in the Route component Router: Supporting RegExp in the Route component Jul 4, 2023
@ndelangen ndelangen changed the title Router: Supporting RegExp in the Route component Router: Support RegExp in the Route component Jul 4, 2023
@ndelangen ndelangen changed the title Router: Support RegExp in the Route component Router: Support RegExp in Route component Jul 4, 2023
@ndelangen ndelangen changed the base branch from next to release/7.2 July 4, 2023 08:53
ndelangen added a commit that referenced this pull request Jul 4, 2023
@ndelangen ndelangen merged commit c0a18af into release/7.2 Jul 4, 2023
50 of 51 checks passed
@ndelangen ndelangen deleted the norbert/improve-router branch July 4, 2023 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants