-
-
Notifications
You must be signed in to change notification settings - Fork 103
feat(extendRoutes): allow relative paths in EditableTreeNode #431
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
Conversation
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.
Could you add a test? I would like to see the error reproduced
I'm not entirely sure how the trees are structured or created. I had to update the code to check that the parent was the root. Can you think of any cases where this would not work? |
Do you have a bug reproduction? This doesn't seem to be fixing something 😅 |
Quite right! It's actually more of a feature 😊 #341 is exactly the problem I was trying to solve 😊 |
I think I'm seeing the problem now. Here's a snippet out of get path() {
return (
this.value.overrides.path ??
(this.parent?.isRoot() ? '/' : '') + this.value.pathSegment
)
} |
If we were to make a slight change to the behaviour of the I just need to think a little about what this would mean for the route block and |
The fullPath shouldn’t change its behavior, or at least it shouldn’t be needed |
I'll have a look at where it is being used and see if I can remove it 😊 |
Sorry, I was overcomplicating this a lot. I didn't realise that you could have absolute paths as child routes. I just assumed you had to put an extra |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #431 +/- ##
==========================================
+ Coverage 73.29% 73.61% +0.31%
==========================================
Files 34 34
Lines 5767 5775 +8
Branches 581 589 +8
==========================================
+ Hits 4227 4251 +24
+ Misses 1530 1514 -16
Partials 10 10 ☔ View full report in Codecov by Sentry. |
Looking good. I will probably give this a review and merge next Monday during the stream |
Closing in favour of #519 |
BREAKING CHANGE: allow relative path overrides
Closes #341
EditableTreeNode