Skip to content

Tab section pattern#5712

Merged
jmuzina merged 39 commits intomainfrom
tab-section
Jan 13, 2026
Merged

Tab section pattern#5712
jmuzina merged 39 commits intomainfrom
tab-section

Conversation

@jmuzina
Copy link
Member

@jmuzina jmuzina commented Dec 4, 2025

Done

Builds the tab section pattern.

Includes #5694 in the diff. Please merge #5694 first.

TODO

  • Fix Percy visual regressions
  • Polish code
  • Docs page

QA

  • Open full width
  • Open 50/50
  • Open 25/75
  • Open combined examples and make sure everything looks OK. Note that combined examples are not interactive, so you won't be able to interact with the tabs.
  • Open docs and review the tab section docs.
  • Open what's new and review the changelog

Check if PR is ready for release

If this PR contains Vanilla SCSS or macro code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention
    • if existing APIs (CSS classes & macro APIs) are not changed it can be a bugfix release (x.x.X)
    • if existing APIs (CSS classes & macro APIs) are changed/added/removed it should be a minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) or macros should be listed on the what's new page.

@webteam-app
Copy link

@jmuzina jmuzina marked this pull request as ready for review December 16, 2025 05:01
@eliman11
Copy link

eliman11 commented Dec 16, 2025

Thanks @jmuzina! LGTM already, mostly just nitpicking here -

  • The description on Figma documentation is "The tab section is a pattern used to display multiple related categories or content sets within a single section, allowing users to switch between them without moving to the next section.
The tab adapts its width to accommodate the maximum width of its inner content, supporting 50, 75, or 100 width variants." instead of "A tab section is used to organize related content into separate tabs within a section. It combines a title, optional description, and optional call-to-action with a tabbed interface that can contain various types of content blocks." - should this we keep the description consistent between Vanilla and Figma @kim-isaac?

  • The headings seem to shift slightly as you toggle through the tabs because of scroll bar that is/isn't present in some of the options - not a huge deal if there isn't an obvious fix for this but at a glance it seems as though the design varies between content variants.

Screenshot 2025-12-16 at 15 27 10
  • Very minor but under the padding variants, could we list "default" as the first item in the bulleted list as it's the default value?

Also tagging @Sophie-32 if there's anything I missed as I see she reviewed the content on Figma! I'll +1 anyway as these are minor

@kim-isaac
Copy link

Thanks @jmuzina ! Looks great and glad to see the basic section included.

Regarding @eliman11 's comment, I think it’s fine to keep as it is in the Vanilla documentation, since the one in the Figma mainly focuses on content and design aspects. I’ll include that in the design documentation instead.

The Codepen example with scrolling also looks fine to me, as I don’t expect this case to occur often on real pages.

And I have one comments from the visual side:

  • it looks like the shallow padding between the heading part and tabs is missing - could we add that?
image image

Lastly, as discussed in the MM, the equal heights block should be added to all three layout options in a future update, separate from the current scope. If there’s anything you can share for follow-up, that would be much appreciated. For future reference, I’m sharing here the comment you left on the equal heights ticket as well.

Thank you so much!!

@jmuzina
Copy link
Member Author

jmuzina commented Dec 17, 2025

Very minor but under the padding variants, could we list "default" as the first item in the bulleted list as it's the default value?

@eliman11 Good call, adjusted - thanks!

it looks like the shallow padding between the heading part and tabs is missing - could we add that?

@kim-isaac I've added shallow padding between the heading/description/cta and tabs. Can you have a look and let me know if it's as you expect?

@kim-isaac
Copy link

kim-isaac commented Dec 18, 2025

Thanks @jmuzina ! I have a few comments left:

  • For the 50/50 layout, could we group heading and description+tab separately? In the current structure, if there’s no description, it results in empty space.
  • Also, it would be good to standardise the naming. In this case it’s written as 50-50, while other patterns use 50/50. Would it make sense to unify everything as 50/50? (for 25/75 as well)
  • Additionally, for the 25/75 and full-width layouts, if there’s no description, could we make heading to expand to full width? Right now, it stays at 50%.

@jmuzina
Copy link
Member Author

jmuzina commented Dec 19, 2025

@kim-isaac Thanks, I have addressed your second two points, and I believe I've addressed the third:

For the 50/50 layout, could we group heading and description+tab separately? In the current structure, if there’s no description, it results in empty space.

I was applying shallow section spacing to the entire title/desc/CTA row - I have moved it to beneath the description/cta when it is present, so none is added when there is no desc/CTA. Is this what you expect? It seems to align with the Figma, just want to be sure.

Screenshot 2025-12-18 at 23 12 14

@kim-isaac
Copy link

All looks great, thanks a lot @jmuzina !

@advl
Copy link
Contributor

advl commented Jan 13, 2026

I wonder if this should be rebased so that the giff only contains the tab section - and not the whole refactor into the shared folder. Otherwise it looks good to me and I'm giving an approval

@jmuzina
Copy link
Member Author

jmuzina commented Jan 13, 2026

I wonder if this should be rebased so that the giff only contains the tab section - and not the whole refactor into the shared folder. Otherwise it looks good to me and I'm giving an approval

Yes, once #5694 is merged the surface of this PR will shrink as this PR is based on the quote wrapper pattern refactor.

@jmuzina jmuzina merged commit ad94436 into main Jan 13, 2026
18 of 20 checks passed
@jmuzina jmuzina deleted the tab-section branch January 13, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature 🎁 New feature or request Review: Code +1 Review: Design +1 Review: Percy needed This PR needs a review of Percy for visual regressions Review: QA +1 Review: UX +1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants