Skip to content

Conversation

@ZeroChoi2781
Copy link
Contributor

Related Issues

n/a

Description of Changes

  • variant="line" (default): Border styling with moving indicator
  • variant="fill": Background styling with hidden indicator

Discussion Items

Indicator Animation: Animation behavior for fill variant still needs designer review

Screenshots

스크린샷 2025-10-28 22 56 10

Checklist

Before submitting the PR, please make sure you have checked all of the following items.

  • The PR title follows the Conventional Commits convention. (e.g., feat, fix, docs, style, refactor, test, chore)
  • I have added tests for my changes.
  • I have updated the Storybook or relevant documentation.
  • I have added a changeset for this change. (e.g., for any changes that affect users, such as component prop changes or new features).
  • I have performed a self-code review.
  • I have followed the project's coding conventions and component patterns.

@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2025

⚠️ No Changeset found

Latest commit: 50baca0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
vapor-ui Ready Ready Preview, Comment Dec 24, 2025 8:01am

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ZeroChoi2781, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Tabs component by introducing new visual variants, 'line' and 'fill', to provide greater flexibility in UI design. The changes involve a refactor of the component's styling using CSS variables, enabling distinct appearances for selected tabs and their indicators based on the chosen variant. This update allows developers to easily switch between a classic border-based tab style and a more modern background-filled style, improving the component's adaptability across different user interfaces.

Highlights

  • New Tabs Variants: Introduced two new visual variants for the Tabs component: line (default) and fill. The line variant provides border styling with a moving indicator, while the fill variant offers background styling for selected tabs and hides the indicator.
  • Styling Refactor with CSS Variables: Refactored the styling of the Tabs component to utilize CSS variables (createVar) for properties like border, background, and border-radius. This allows for more dynamic and variant-specific styling control.
  • Indicator Visibility Control: The visibility of the tab indicator is now controlled by a CSS variable, allowing it to be hidden for the fill variant and shown for the line variant.
  • Storybook Updates: Updated the Storybook examples to reflect the new line and fill variants, replacing the previous plain variant.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 PR은 Tabs 컴포넌트에 fillline variant를 추가하는 변경 사항을 담고 있습니다. 전반적으로 vanilla-extract의 CSS 변수를 활용하여 확장 가능하고 깔끔하게 새로운 variant를 구현한 점이 좋습니다. 다만, list recipe에서 variant에 따른 border 스타일을 적용하는 방식에 대해 가독성과 유지보수성을 높일 수 있는 리팩토링 방안을 제안했습니다. compoundVariants를 활용하여 line variant일 때만 border가 적용되도록 조건을 명시적으로 만들어, 코드를 더 쉽게 이해할 수 있도록 하는 개선안입니다.

Comment on lines 34 to 79
base: layerStyle('components', {
position: 'relative',
gap: vars.size.space[100],
borderBottom: listBorderBottom,
borderRight: listBorderRight,
}),

defaultVariants: { variant: 'line', orientation: 'horizontal' },
variants: {
variant: { line: {}, plain: {} },
orientation: {
horizontal: layerStyle('components', {
display: 'flex',
vars: {
[listBorderBottom]: `1px solid ${vars.color.border.normal}`,
[listBorderRight]: 'none',
},
}),
vertical: layerStyle('components', {
display: 'inline-flex',
flexDirection: 'column',
vars: {
[listBorderBottom]: 'none',
[listBorderRight]: `1px solid ${vars.color.border.normal}`,
},
}),
},
},
compoundVariants: [
{
variants: { variant: 'line', orientation: 'horizontal' },
style: layerStyle('components', {
borderBottom: `1px solid ${vars.color.border.normal}`,
variant: {
line: layerStyle('components', {
vars: {
[triggerSelectedBg]: 'transparent',
[triggerSelectedBorderRadius]: '0',
[indicatorDisplay]: 'block',
},
}),
},
{
variants: { variant: 'line', orientation: 'vertical' },
style: layerStyle('components', {
borderRight: `1px solid ${vars.color.border.normal}`,
fill: layerStyle('components', {
vars: {
[listBorderBottom]: 'none',
[listBorderRight]: 'none',
[triggerSelectedBg]: vars.color.background.primary[100],
[triggerSelectedBorderRadius]: vars.size.borderRadius[300],
[indicatorDisplay]: 'none',
},
}),
},
],
},
});
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

현재 orientation variant에서 설정된 border 스타일을 fill variant에서 none으로 덮어쓰는 방식으로 구현되어 있습니다. 이 방식은 vanilla-extract의 variant 적용 순서에 의존하고 있어 코드의 흐름을 파악하기에 다소 직관적이지 않을 수 있습니다.

line variant일 때만 border가 필요하므로, 이 로직을 compoundVariants를 사용하여 명시적으로 결합하는 것을 제안합니다. 이렇게 하면 fill variant에서 border를 리셋할 필요가 없어지고, 각 variant의 역할이 더 명확해져 코드 가독성과 유지보수성이 향상될 수 있습니다.

    base: layerStyle('components', {
        position: 'relative',
        gap: vars.size.space[100],
    }),

    defaultVariants: { variant: 'line', orientation: 'horizontal' },
    variants: {
        orientation: {
            horizontal: layerStyle('components', {
                display: 'flex',
            }),
            vertical: layerStyle('components', {
                display: 'inline-flex',
                flexDirection: 'column',
            }),
        },
        variant: {
            line: layerStyle('components', {
                vars: {
                    [triggerSelectedBg]: 'transparent',
                    [triggerSelectedBorderRadius]: '0',
                    [indicatorDisplay]: 'block',
                },
            }),
            fill: layerStyle('components', {
                vars: {
                    [triggerSelectedBg]: vars.color.background.primary[100],
                    [triggerSelectedBorderRadius]: vars.size.borderRadius[300],
                    [indicatorDisplay]: 'none',
                },
            }),
        },
    },
    compoundVariants: [
        {
            variants: { variant: 'line', orientation: 'horizontal' },
            style: {
                borderBottom: `1px solid ${vars.color.border.normal}`,
            },
        },
        {
            variants: { variant: 'line', orientation: 'vertical' },
            style: {
                borderRight: `1px solid ${vars.color.border.normal}`,
            },
        },
    ],
});

@vapor-ui
Copy link
Collaborator

vapor-ui commented Oct 28, 2025

All tests passed!

Tests Passed Failed Duration Report
144 144 0 1m 37s Open report ↗︎

Click here if you need to update snapshots.

@ZeroChoi2781 ZeroChoi2781 removed their assignment Dec 2, 2025
Comment on lines 144 to 148
selectors: {
'&[data-selected]': {
color: vars.color.foreground.primary['100'],
},
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Upon checking the snapshot, it appears the color attribute hasn't changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO:

  • Check the foreground color
  • Check the typography by size

@ZeroChoi2781 ZeroChoi2781 merged commit 701c186 into main Dec 24, 2025
13 checks passed
@ZeroChoi2781 ZeroChoi2781 deleted the add-tabs-variants branch December 24, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants