Skip to content

feat(tabs): support contextual layout tokens (size & density)#13951

Merged
kodiakhq[bot] merged 8 commits into
carbon-design-system:mainfrom
janhassel:13923-tabs
Jul 10, 2023
Merged

feat(tabs): support contextual layout tokens (size & density)#13951
kodiakhq[bot] merged 8 commits into
carbon-design-system:mainfrom
janhassel:13923-tabs

Conversation

@janhassel

Copy link
Copy Markdown
Member

Ref #13923

Adds support for contextual layout tokens to Tabs.

Changelog

Changed

  • Updated tabs styles to support size and density groups

Testing / Reviewing

Locally run storybook

  • Line tabs
    • should support layout.size with sm, md, lg (default: md)
    • padding-inline should adapt to layout.density
  • Icon only tabs
    • should support layout.size with sm, md, lg (default: md)
    • should be square
  • Contained tabs
    • should support layout.size with sm, md, lg, xl (default: lg)
    • padding-inline should adapt to layout.density
    • spacing between label and icon should adapt to layout.density
  • Tabs with two lines
    • should support layout.size with lg, xl (default: xl)
  • Tab content
    • padding should adapt to layout.density
  • <Tab iconSize="lg">
    • should result in the tabs being locked to lg
  • Tab horizontal overflow buttons should share same size as tabs

@janhassel janhassel requested a review from a team as a code owner June 7, 2023 14:40
@netlify

netlify Bot commented Jun 7, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b92c1dc
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/64abad6fc51ac400086bb1d3
😎 Deploy Preview https://deploy-preview-13951--carbon-components-react.netlify.app
📱 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.

@netlify

netlify Bot commented Jun 7, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit b92c1dc
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/64abad6ff6115d0008731627
😎 Deploy Preview https://deploy-preview-13951--carbon-elements.netlify.app
📱 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.

@janhassel

Copy link
Copy Markdown
Member Author

@aagonzales I want to tag you here as well as there are some differences percy reported. It looks like the labels in line tabs are not 100% centered in main right now due to a difference in padding:
image
The visual specs on carbondesignsystem.com show that equal padding is desired though:
image

Would love it if you could have a look at the implementation of this PR and see whether this achieves the desired visuals.

@aagonzales

aagonzales commented Jun 7, 2023

Copy link
Copy Markdown
Contributor

The Percey screenshots aren't showing but when I manually compare it to the spec this PR still seems slightly off (1px maybe). The foreground is a Figma asset, the background is a code asset. (I could live with it though)

image

I also think the 8px top and bottom isn't true. Not sure where that number came from looking at the assets. They should just be vertically centered.

@janhassel

Copy link
Copy Markdown
Member Author

@aagonzales I pushed an update positioning the label 1px lower. Checking with the latest Figma library I see an exact overlay now. Let me know if this works!

@aagonzales

Copy link
Copy Markdown
Contributor

@janhassel yup that's it! Matches up perfectly now. 👍

@tw15egan tw15egan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, missed this review! LGTM once merge conflict is resolved 👍🏻 ✅

@janhassel

Copy link
Copy Markdown
Member Author

@tw15egan I just resolved the merge conflict. I think the percy approval is the last failing check now.

@kodiakhq kodiakhq Bot merged commit 149d34d into carbon-design-system:main Jul 10, 2023
@janhassel janhassel deleted the 13923-tabs branch July 10, 2023 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants