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 "Stock" admin nav double highlight #2969

Merged
merged 2 commits into from
Dec 17, 2018

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Nov 22, 2018

Without setting match_path the tab helper uses the current controller name as criteria to activate the tab in the menu. Since the stock items controller can be accessed for a single product or all products we need to make sure it only matches the /admin/stock_items path for the "Stock" menu tab.

store stock - apache baseball jersey - products 2018-11-22 22-05-07

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 agree that this is a better solution. It also is extensible (if we see this issue elsewhere) and can be used by extensions as well. 👏 Great call @tvdeyen.

Without setting match_path the tab helper uses the current controller
name as criteria to activate the tab in the menu. Since the stock items
controller can be accessed for a single product or all products we need
to make sure it only matches the /stock_items path for the Stock menu
tab.

Closes solidusio#2950
@tvdeyen
Copy link
Member Author

tvdeyen commented Nov 23, 2018

@jacobherrington done

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.

Thanks!

Copy link
Contributor

@ericsaupe ericsaupe left a comment

Choose a reason for hiding this comment

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

LGTM

@jacobherrington jacobherrington merged commit af6a140 into solidusio:master Dec 17, 2018
@tvdeyen tvdeyen deleted the fix-2950 branch September 16, 2021 20:07
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.

5 participants