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
Tabs
- Fix issues for query-params-based status, nested tabs, variable tabs widths
#1688
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
26e3a0f
to
def105d
Compare
def105d
to
63e72c5
Compare
a6a7035
to
df585db
Compare
df585db
to
4fe431b
Compare
4fe431b
to
e4b2fdb
Compare
@MiniHeyd as discussed today, the PR is ready for an initial review (I still have to update the documentation, but I'll do it in a separate follow-up PR tomorrow) @hashicorp/hds-engineering it would be great if you could start to look at this PR, is pretty meaty and it would be better to get it merged in (There are a few tests failing. I suspected they would have been brittle/flaky, I'll look into them asap) |
Tabs
- Fix issues for query-params-based status, nested tabs, variable tabs widthsTabs
- Fix issues for query-params-based status, nested tabs, variable tabs widths
0171d1b
to
826e54a
Compare
826e54a
to
c5932b1
Compare
Co-authored-by: Steve Heydweiller <steve@highdwellercreative.com>
… it to fix issue with indicator not initialized for (hidden) nested tabs not elegant solution, but it works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's causing the test failures, but after that's resolved, I have no objections to this PR after today's group review.
6d18583
to
ae95703
Compare
60e1ad8
to
c842b6e
Compare
… `Tabs` component per @alex-ju suggestion
… the `Tabs` documentation to fix a reported issue
… for `Tabs` to include demo with query parameter
… scroll (in `Tabs` and `Pagination`)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-reviewed this one – had a more in-depth look at the functional aspects and checked the updated tests – and it's good to be merged. You'll likely want to get the documentation in first (which may require a rebase on this judging by the current diff no rebase required).
Co-authored-by: Alex <alex-ju@users.noreply.github.com> Co-authored-by: Jory Tindall <jory.tindall@hashicorp.com>
…documentation `Tabs` - Update documentation
📌 Summary
This is a "reworking" #1654 to understand if there was a more idiomatic (to HDS code) approach to solve the issue of tab selection and persistence using query params, initially proposed by @MiniHeyd in #1654.
In the process, I have also tried to tackle other two known tabs-related issues: the fact that when there are nested tabs, the indicator for the tabs inside hidden panels doesn't get initialized correctly, and the fact that when the content of the tab button (in particular the badge) changes, the indicator doesn't update its width accordingly.
The intent of this PR is to drive the conversation with @MiniHeyd and see how we can have a synthesis of the two PRs in a single one. Once approved the approach, the PR will be opened to the HDS engineering team for full review.
Notice: the documentation update will be done in #1702 and then merged here.
🛠️ Detailed description
In this PR I have:
Tabs
component +Tab/Panel
sub-components to support more complex use casesscrollIntoView
scrolling the page on page loadthis.selectedTabIndex
Tabs
adding more detailed tests and complex use cases👉 👉 👉 Preview: https://hds-showcase-git-selected-tab-condition-proposal-hashicorp.vercel.app/components/tabs (in particular see "Examples of tabs implementation")
🔗 External links
Jira tickets:
👀 Component checklist
yarn test:a11y --filter="COMPONENT-NAME"
)💬 Please consider using conventional comments when reviewing this PR.