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: showing current settings tab broken in MULTI_ORG. #4855

Merged
merged 4 commits into from
May 2, 2020

Conversation

arikfr
Copy link
Member

@arikfr arikfr commented Apr 30, 2020

What type of PR is this? (check all applicable)

  • Bug Fix

Description

Current logic of active tab selection assumed the path will begin with the path of the tab, but in MULTI_ORG the path begins with the org slug.

@arikfr arikfr requested a review from gabrieldutra April 30, 2020 19:57
@kravets-levko
Copy link
Collaborator

There is simpler solution.

Add this import to client/app/components/SettingsWrapper.jsx:

import { stripBase } from "./Router";

And use it to prepare argument for settingsMenu.getActiveItem

return function SettingsTab(props) {
const activeItem = settingsMenu.getActiveItem(location.path);
return (

Probably a proper solution will be to change location service to strip base by default, but this should be fine for now.

@arikfr
Copy link
Member Author

arikfr commented May 1, 2020

@kravets-levko thanks! Updated the implementation and added a test case.

Copy link
Collaborator

@kravets-levko kravets-levko left a comment

Choose a reason for hiding this comment

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

🚀

@arikfr arikfr merged commit 873c87b into master May 2, 2020
@arikfr arikfr deleted the highlight-selected-screen branch May 2, 2020 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants