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

feat(nav): allow user to switch orgs from the navbar #13171

Merged
merged 1 commit into from
Apr 4, 2019

Conversation

AlirieGray
Copy link
Contributor

@AlirieGray AlirieGray commented Apr 4, 2019

Closes #13157

This PR adds an organizations dropdown to the Home nav bar item. From this dropdown, the user can switch organizations and will be redirected to the Home page in that organization context.

This feature is feature flagged for Cloud for now.

The /me subroute is also removed from the Home page because it is redundant.

2019-04-04 13 44 19

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • Rebased/mergeable
  • Tests pass

@AlirieGray AlirieGray force-pushed the switch-orgs-in-nav branch 2 times, most recently from fc265c8 to 562759a Compare April 4, 2019 21:49
active: boolean
className?: string
onClick?: () => void
}

interface DefaultProps {
Copy link
Contributor

Choose a reason for hiding this comment

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

We could update this to the new DefaultProps pattern. If we just merge the interface with the PassedProps interface and don't specify the type for defaultProps TypeScript should be able to infer the default props.

}).name
}

private get accountSubItem(): JSX.Element[] {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make this it's own function component.


return [
<CloudFeatureFlag key="feature-flag">
<NavMenu.SubItem
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to show this if there's only one organization?

@AlirieGray AlirieGray merged commit 541b429 into master Apr 4, 2019
@AlirieGray AlirieGray deleted the switch-orgs-in-nav branch April 4, 2019 23:11
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.

None yet

2 participants