Skip to content

refactor(tooltip): replace styles with design tokens#290

Open
minji0214 wants to merge 1 commit into
devfrom
refactor/tooltip-token-css-minji0214
Open

refactor(tooltip): replace styles with design tokens#290
minji0214 wants to merge 1 commit into
devfrom
refactor/tooltip-token-css-minji0214

Conversation

@minji0214

Copy link
Copy Markdown
Contributor

Changes

  • 토큰 패키지를 툴팁에 import하고 기존 하드코딩된 스타일을 토큰으로 치환시킵니다.
  • 툴팁 내부에서 자주 사용하는 값들은 툴팁 내에서 선언하여 사용합니다.

Visuals

Checklist

  • Have you written the functional specifications?
  • Have you written the test code?

Additional Discussion Points

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • main
  • release/v1

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6fc57fa7-2d97-4653-baa2-e1556f591787

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/tooltip-token-css-minji0214

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e42df01

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sipe-team/tooltip Patch
@sipe-team/side Patch

Not sure what this means? Click here to learn what changesets are.

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

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
packages/tooltip/src/Tooltip.css.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +7 to +8
const tooltipArrowSize = `calc(${vars.spacing.component.md} / 2)`;
const tooltipArrowOffset = `calc(${vars.spacing.component.md} / -2)`;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

정의되지 않은 토큰이면 하드코딩하는게 좋을꺼 같아요~

spacing이라 size에 의존이 생기는게 어색합니다!

@osohyun0224 osohyun0224 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

고생많으셨습니다 bb

boxShadow: '0 4px 8px rgba(0, 0, 0, 0.2)',
zIndex: 1000,
boxShadow: tooltipShadow,
zIndex: zIndex.dropdown,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

https://github.com/sipe-team/side/blob/main/packages/tokens/src/effects/zIndex.ts

를 보니까,

zIndex.tooltip 이 있는데. 이를 쓰면 어떨까요?

border: '1px solid #ccc',
borderRadius: '4px',
borderRadius: vars.radius.component.md,
backgroundColor: '#f9f9f9',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

이거 색,

"#ccc" 랑 "f9f9f9" 는 따로 토큰화 하지 않고 냅두는 건가요?


const tooltipBackgroundColor = `var(--tooltip-bg-color, ${themeColor['1st'].background})`;
const tooltipArrowSize = `calc(${vars.spacing.component.md} / 2)`;
const tooltipArrowOffset = `calc(${vars.spacing.component.md} / -2)`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

const tooltipArrowSize = calc(${vars.spacing.component.md} / 2);
const tooltipArrowOffset = calc(${vars.spacing.component.md} / -2);

이거를,

const tooltipArrowSize = `calc(${vars.spacing.component.md} / 2)`;
const tooltipArrowOffset = `calc(${tooltipArrowSize} * -1)`;

처럼 바꾸는 건 어떨가요...?

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.

4 participants