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

[DOCS] Hide duplicate tabs #9570

Merged
merged 1 commit into from Mar 11, 2024
Merged

Conversation

JessSaavedra
Copy link
Contributor

@JessSaavedra JessSaavedra commented Mar 4, 2024

Description

If className="hidden" is added to a Tabs component, it will have its tabs hidden (useful for nested tabs inside the same document that will always have the same value).

You can check this does not break the logic of switching tabs, there's an example in this page: https://deploy-preview-9570.docs.greatexpectations.io/docs/oss/guides/setup/installation/install_gx. If you select pip or conda tabs inside the local tab, you will see the content is updated properly, even though the second set of tabs that previously showed options pip and conda again is hidden.

Screenshots

Before

screencapture-docs-greatexpectations-io-docs-oss-guides-setup-installation-install-gx-2024-03-04-15_31_27

After

screencapture-localhost-3000-docs-oss-guides-setup-installation-install-gx-2024-03-04-15_31_56

  • Description of PR changes above includes a link to an existing GitHub issue
  • PR title is prefixed with one of: [BUGFIX], [FEATURE], [DOCS], [MAINTENANCE], [CONTRIB]
  • Code is linted - run invoke lint (uses black + ruff)
  • Appropriate tests and docs have been updated

For more information about contributing, see Contribute.

After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!

Copy link

netlify bot commented Mar 4, 2024

Deploy Preview for niobium-lead-7998 ready!

Name Link
🔨 Latest commit 26d2f42
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/65e6135cd2a8a4000812e986
😎 Deploy Preview https://deploy-preview-9570.docs.greatexpectations.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -8,6 +8,10 @@ div[role="tabpanel"]{
font-weight: var(--ifm-font-weight-normal);
line-height: var(--p-line-height);

&.hidden {
Copy link
Member

Choose a reason for hiding this comment

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

Are we going to need to add this class to each screen in order to get this effect?

Copy link
Contributor

Choose a reason for hiding this comment

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

My understanding is that we'll add the class name to any Tab group that we want to hide the tab selection portion of.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rachel is right, any tab that has the hidden class in the markdown will be hidden!

Copy link
Member

@josectobar josectobar left a comment

Choose a reason for hiding this comment

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

👍🏽

@JessSaavedra JessSaavedra added this pull request to the merge queue Mar 11, 2024
Merged via the queue into develop with commit d8be182 Mar 11, 2024
64 checks passed
@JessSaavedra JessSaavedra deleted the DSB-721_hide_duplicate_tabs branch March 11, 2024 16:21
deborahniesz pushed a commit that referenced this pull request Mar 12, 2024
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

3 participants