Skip to content
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

Closed

Conversation

aitbw
Copy link
Contributor

@aitbw aitbw commented Nov 22, 2018

Refs: #2950

Here's a screenshot to demonstrate how the menu looks after the proposed patch

screenshot_2018-11-22 store stock - apache baseball jersey - products

Open to suggestions! 🙌

Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me! If we find this in more places we should add a test for it, but I think this fixes #2950

Thanks @aitbw!

Copy link
Member

@tvdeyen tvdeyen left a 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?

@jacobherrington
Copy link
Contributor

@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.

Copy link
Member

@tvdeyen tvdeyen left a 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.

@jacobherrington
Copy link
Contributor

@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?

@tvdeyen
Copy link
Member

tvdeyen commented Nov 22, 2018

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.

Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to suggest we go with the solution in #2969. Thanks for sharing your code @aitbw!

@aitbw
Copy link
Contributor Author

aitbw commented Nov 22, 2018

Don't worry @jacobherrington @tvdeyen, I completely understand and I'm more fond of a solution like #2969 ☺️

@aitbw aitbw closed this Nov 22, 2018
@aitbw aitbw deleted the nebulab/fix-double-menu-highlight branch November 22, 2018 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants