-
Notifications
You must be signed in to change notification settings - Fork 90
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
feat(history-sync): add priority
option to routes
#536
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 916185d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Our team has been thinking about this issue before, and we thought of several candidates for the acceptable priority rule.
Which method do you think is the best? |
Although I also believe that the score calculation should be the default behavior in most cases, I found that it sometimes makes sense to override this and therefore made this PR, which works as a hybrid of 1 and 3. I prefer my solution the most since it provides both a good default and an escape hatch that can be utilized in advanced use cases. |
Oh, I see. Is there an example that requires an escape hatch against score rule? |
My use case was dynamically matching splat routes in runtime and falling back to the default route-matching algorithm when no match was found. It was for keeping the URLs simple while using https://github.com/contentstech-com/stackflow-plugin-omniflow and also utilized #535 to appropriately transform activity params to a URL. I can also share a code snippet for dynamic route matching if you need to see that. |
Please check the added test suite to see the expected behavior!