-
-
Notifications
You must be signed in to change notification settings - Fork 103
feat(extendRoutes): allow relative path overrides #519
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(extendRoutes): allow relative path overrides #519
Conversation
…uter into feat/relative-route-block-paths
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #519 +/- ##
==========================================
+ Coverage 61.68% 62.35% +0.67%
==========================================
Files 32 32
Lines 3145 3140 -5
Branches 580 586 +6
==========================================
+ Hits 1940 1958 +18
+ Misses 1199 1176 -23
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
WalkthroughThe changes revise how route path overrides are handled in the routing core. The logic for setting and validating custom route paths is updated to allow non-absolute (relative) paths for non-root nodes, and to propagate relative path overrides correctly through the route tree. The warning for non-absolute paths is now limited to root nodes only. Test coverage is added to verify correct path resolution for both relative and absolute overrides in nested routes. Some validation and warning logic is removed or relocated, and internal getters are updated to reflect the new path resolution behavior. Changes
Assessment against linked issues
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
BREAKING CHANGE: If you were relying on EditableTreeNode's `path` returning a _full path_, you will now need to read `fullPath` instead. Otherwise, this change should be more intuitive as it allows setting a relative path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! I did some refactor to simplify things and ended up aligning the path
+ fullPath
usage. I think it makes more sense this way even though it's a breaking change.
commit: |
Nice, thanks! 🎉 |
Thanks @posva 🎉 Those refactors look great 😊 |
BREAKING CHANGE: allow relative path overrides
Closes #341
EditableTreeNode
definePage
and<route>
blockIncludes changes from #431
Description
Relative paths in
definePage
and route blockRelative paths are converted to absolute paths. Here is an example:
custom-root.vue
custom-child.vue
Summary by CodeRabbit