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

chore(compass-components): add TabNavBar component to compass-components COMPASS-5517 #2860

Merged
merged 11 commits into from
Mar 4, 2022

Conversation

Anemy
Copy link
Member

@Anemy Anemy commented Mar 4, 2022

This PR moves the TabNavBar from hadron-react-components to compass-components. This pr makes the component listen to the theme with the other component that is added in this package WorkspaceContainer - COMPASS-5521 . We're also reducing the global compass less styles previously used for various workspace views in Compass here. Lastly there's a little bit of drive by cleanup and some more thorough testing of the TabNavBar component's functionality.
To use Compass with the components handling theming instead of darkreader you can use the env variable COMPASS_LG_DARKMODE. (video at bottom shows these components in darkmode)

I think it's worth mentioning this is a bit of a misuse of the Tabs and Tab from leafygreen-ui as we're losing the references between the html roles tab and the tabpanel. The reason for this is we're working around the leafygreen tab fully unmounting content when the tab isn't displayed. We keep the elements mounted here. I think we should improve it but that'll happen in a follow up pr.

Open to any other names for these components or different component compositions if y'all have ideas.

containers.themed.mp4

Copy link
Contributor

@mcasimir mcasimir left a comment

Choose a reason for hiding this comment

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

<a className={classnames(styles['schema-zero-state-link'])} onClick={this.onOpenLink.bind(this)}>
Learn more about schema analysis in Compass
</a>
<Link
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@Anemy Anemy merged commit 5d7eebb into main Mar 4, 2022
@Anemy Anemy deleted the COMPASS-5517-remove-tab-nav-bar-component branch March 4, 2022 18:19
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