carbon
carbon copied to clipboard
feat(tabs): vertical variation with inner grid
Closes #16305
Adds a new vertical variant to tabs
Changelog
New
TabListVerticalcomponent- will scroll selected
<Tab>into view on resize and when using mouse/keyboard
- will scroll selected
- new
verticalandheightprops toTabs- the vertical
Tabsvariant wraps aGridaround the component except for atsmbreakpoint
- the vertical
Tabnew update to add ellipsis withTooltiponly on vertical variantTabPanelstill needs to account for changing heights if the adopter doesn't give theTabsa set height
Changed
- added
overflow-x: hiddento default Tabs ... fixed an issue where an unwanted horizontal scroll would appear if the length of the tabs is too long
Other notes:
Testing / Reviewing
{{ Add descriptions, steps or a checklist for how reviewers can verify this PR works or not }}
Deploy Preview for v11-carbon-react ready!
| Name | Link |
|---|---|
| Latest commit | 5ba02e1d61e9ee4b1f7cebdc85e630a8c9f9b66d |
| Latest deploy log | https://app.netlify.com/sites/v11-carbon-react/deploys/6682fc473ab811000857a868 |
| Deploy Preview | https://deploy-preview-16738--v11-carbon-react.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Deploy Preview for carbon-elements ready!
| Name | Link |
|---|---|
| Latest commit | 5ba02e1d61e9ee4b1f7cebdc85e630a8c9f9b66d |
| Latest deploy log | https://app.netlify.com/sites/carbon-elements/deploys/6682fc476fbf030008e646bb |
| Deploy Preview | https://deploy-preview-16738--carbon-elements.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
This is looking good!
Couple things
- we will need to make sure we have tests added (AVT, VRT, unit)
- we reuse the storybook stories for the live demo on the website, so will want to probably just show the tabs with the height set, and also make sure the controls are enabled for that story. (we can wait to update this until after it has been reviewed fully / by design etc)
@ariellalgilmore looks good to go from design! 💥
I tested locally inside some weird nested grids and it is working as expected. 🥳
*It does break if you try and place it inside a column that spans less than 5, which is probably fine. Could be fun to play with container queries to see we could fix that edge case 🤷♀️
Seeing some issues with default tabs now
Seeing some issues with default tabs now
hmm i'm not seeing that and doesn't seem like Percy is picking it up either? What browser/size were you looking in?
@ariellalgilmore in Firefox, but I restarted my browser and its working now... 🙃
@tay1orjones we followed the same guidance as operational tag, so on mouse click it shouldn't show the tooltip, but on hover it will eventually pop up with the browser's tooltip
Hey there! v11.61.0 was just released that references this issue/PR.
Uh oh, this broke the background coloring on all our tabs that use contained. (Even though our tabs are horizontal, not vertical.).
This CSS you added is pretty general, it affects any code using <Tabs contained>, not just vertical tabs.
.cds--tabs--contained~.cds--tab-content>* {
@include layer-tokens.emit-layer-tokens(2);
}
Hi @wkeese, can you share a stackblitz example of what is breaking for you? and maybe some screenshots? Looking at storybook here: https://react.carbondesignsystem.com/?path=/story/components-tabs--contained and it is showing the expected results
Yes, I started the discussion on Slack (https://ibm-analytics.slack.com/archives/C2K6RFJ1G/p1722510209140579) and posted an example link there.
PS: Moved the discussion to ticket #17096.
