-
-
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
Fix double highlight on admin menu when Product Stock tab is active #2968
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.
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.
I don’t know if we want to handle this particular case like this in a helper. Isn’t there a way to fix this with using match_path
for the problematic tabs?
@tvdeyen I agree, if it seems like there are more examples of this problem, but if it is only on the product stock page this solves that issue. |
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.
Sorry, I cannot give my approval to that solution. Please let us try to fix the problem in a different way.
@aitbw let's try to approach the problem from another perspective. Instead of removing the class from the incorrect element, we should make sure it never gets applied. Does that make sense? |
This is my alternative approach #2969 to this issue. @aitbw thanks for working on this and sorry for the rejection, but we would like to fix the issue at the root cause. Having to deal with issue like this in a helper is not ideal. That's why I made this alternative approach. Thanks for the contribution. That's very much appreciated. |
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.
Don't worry @jacobherrington @tvdeyen, I completely understand and I'm more fond of a solution like #2969 |
Refs: #2950
Here's a screenshot to demonstrate how the menu looks after the proposed patch
Open to suggestions! 🙌