-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Menu item should not match url if match_path is set #5643
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.
Thanks. Makes sense to me. The test failures are unrelated. Fix is in #5644
The menu item should not match the url if a match_path prevents this behavior. Previously the match_path method went truthy, if the url of the menu item started with the same url as the request regardless of the given match_path - configuration.
1a74a2d
to
26fa1c1
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5643 +/- ##
=======================================
Coverage 88.55% 88.55%
=======================================
Files 685 685
Lines 16407 16408 +1
=======================================
+ Hits 14529 14530 +1
Misses 1878 1878 ☔ View full report in Codecov by Sentry. |
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.
👍
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
EDIT: you are already on that. ❤️ |
Yes, thankfully @sascha-karnatz pointed me to it as well |
Summary
The menu item should not match the url if a match_path prevents this behavior. Previously the match_path method went truthy, if the url of the menu item started with the same url as the request regardless of the given match_path - configuration.
Example
The regex in the match_path of menu item 1 should highlight only if the url ends with "bar":
In the prevous implementation both menu items got highlighted, because they started with the same url. In the implemation of this Pull Request only the second menu item will be highlighted.
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: