-
Notifications
You must be signed in to change notification settings - Fork 57
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
Transform item's path to lowercase in navigator #836
Transform item's path to lowercase in navigator #836
Conversation
@@ -89,7 +89,7 @@ | |||
:is="refComponent" | |||
:id="item.uid" | |||
:class="{ bolded: isBold }" | |||
:url="isGroupMarker ? null : (item.path || '')" | |||
:url="isGroupMarker ? null : (item.path.toLowerCase() || '')" |
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.
Instead of changing the URL itself, maybe we can just add a new CSS class when item.path.toLowerCase() === this.$route.path.toLowerCase()
that we apply the active/selected background color to?
That way we get the correct highlight/selection background color for the active item, regardless of whether the case matches between the two items, but we don't actually change the URL itself?
I think we investigated a similar problem with the tutorial dropdown in the past: #11
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.
Yes, it sounds like a better approach. I changed it.
It's a pity that vuejs/vue-router#3657 didn't get merged, it made sense to me.
82c3a22
to
fd27de3
Compare
@swift-ci test |
@swift-ci test |
Bug/issue #122911237, if applicable:
Summary
Transform item's path to lowercase in navigator, so if symbols have a path with capital letters, the highlighting of the active element in the navigator continues working
Dependencies
NA
Testing
Steps:
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
npm test
, and it succeeded