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] Add guidance for EuiTabs around higher-order navigation #7410

Merged
merged 3 commits into from
Dec 11, 2023
Merged

[DOCS] Add guidance for EuiTabs around higher-order navigation #7410

merged 3 commits into from
Dec 11, 2023

Conversation

1Copenut
Copy link
Contributor

@1Copenut 1Copenut commented Dec 7, 2023

Summary

We made some decisions about the EuiBreadcrumbs component in a design discussion in before UX Summit. One of the recommended actions was to document best practices for using tabs, based on my comment about tabs updating breadcrumb links.

This PR adds a Guidelines tab to EuiTabs and cross-links the new guidance from our EuiBreadcrumbs page. Screenshots attached below QA criteria. PR closes #7367.

QA

Remove or strikethrough items that do not apply to your PR.

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
  • Docs site QA
Screenshot 2023-12-08 at 4 42 24 PM Screenshot 2023-12-07 at 1 44 29 PM

* Adding a Guidance tab to EuiTabs docs
* Providing UX guidance for hash routes and higher-level navigation
@1Copenut 1Copenut added documentation Issues or PRs that only affect documentation - will not need changelog entries skip-changelog labels Dec 7, 2023
@1Copenut 1Copenut self-assigned this Dec 7, 2023
@1Copenut 1Copenut requested a review from a team as a code owner December 7, 2023 19:50
@JasonStoltz
Copy link
Member

Screenshots attached

👀 ❓

@1Copenut
Copy link
Contributor Author

1Copenut commented Dec 8, 2023

Screenshots attached

👀 ❓

Screenshots added this time. Got distracted and forgot to attach them.

@JasonStoltz
Copy link
Member

JasonStoltz commented Dec 8, 2023

I'm slightly confused about the guidance here. Is this correct? Does it make the guidance clearer?

Do
For tabs showing primary page content, use the href prop to change the current page URL hash to ensure tab selections are persisted in a user's navigation history and work with the browser's back button.

Do
Ensure that when a page is loaded with a URL hash representing a selected tab (as applied by the href prop), that the corresponding tab is shown using the selectedTab prop.

Don't
Apply the href prop to change the current page URL hash on more than one set of tabs per page, or non-primary content.

Don't
Apply the href prop in a way that would visually keep a user on the current page, but logically change the navigation, breadcrumbs, or URL path. Tabs should keep users at the same location within an application's navigation. The URL hash is the only thing that should change.

@1Copenut
Copy link
Contributor Author

1Copenut commented Dec 8, 2023

Thanks @JasonStoltz. I took another pass using your feedback and adding a couple of insights.

@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @1Copenut

@1Copenut 1Copenut merged commit 766f3bf into elastic:main Dec 11, 2023
1 check passed
@1Copenut 1Copenut deleted the docs/tabs-and-breadcrumbs branch December 11, 2023 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues or PRs that only affect documentation - will not need changelog entries skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EuiBreadcrumb] Document best practices for user experience and information architecture
4 participants