Skip to content

[Refactor/#55] Button tertiary varient 추가 - #56

Merged
jjjsun merged 2 commits into
developfrom
refactor/#55
Feb 25, 2026
Merged

jjjsun merged 2 commits into
developfrom
refactor/#55

Conversation

@jjjsun

@jjjsun jjjsun commented Feb 24, 2026

Copy link
Copy Markdown
Collaborator

🚨 관련 이슈

Closed #55

✨ 변경사항

  • 🐞 BugFix Something isn't working
  • 💻 CrossBrowsing Browser compatibility
  • 🌏 Deploy Deploy
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (storybook, jest, etc.)

✏️ 작업 내용

  • Button tertiary varient 추가 (주로 업로드/초기화 버튼에 사용예정)
  • 반복해서 사용되던 custom 스타일을 tertiary로 분리해서 재사용성 개선함.

😅 미완성 작업

N/A

📢 논의 사항 및 참고 사항

💬 리뷰어 가이드 (P-Rules)
P1: 필수 반영 (Critical) - 버그 가능성, 컨벤션 위반. 해결 전 머지 불가.
P2: 적극 권장 (Recommended) - 더 나은 대안 제시. 가급적 반영 권장.
P3: 제안 (Suggestion) - 아이디어 공유. 반영 여부는 드라이버 자율.
P4: 단순 확인/칭찬 (Nit) - 사소한 오타, 칭찬 등 피드백.

Summary by CodeRabbit

릴리스 노트

  • New Features
    • 버튼 컴포넌트에 새로운 변형이 추가되었습니다.

@jjjsun
jjjsun requested review from Seojegyeong and YermIm February 24, 2026 10:58
@jjjsun jjjsun self-assigned this Feb 24, 2026
@jjjsun jjjsun added the 🔨 Refactor 코드 리팩토링 label Feb 24, 2026
@coderabbitai

coderabbitai Bot commented Feb 24, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Button 컴포넌트에 "tertiary" variant를 추가하고, 텍스트 스타일(heading1, heading3, heading4, body1)을 업데이트했습니다. Button의 children 렌더링 방식도 개선했습니다.

Changes

Cohort / File(s) Summary
Button 컴포넌트 확장
src/components/common/button/Button.tsx, src/components/common/button/Button.stories.tsx
tertiary variant 추가 및 대응 스토리북 정의. Button의 자식 요소를 span 래퍼 없이 직접 렌더링으로 변경.
텍스트 스타일 업데이트
src/index.css
heading1(30px→38px), heading3(18px→25px, weight 증가, line-height 추가), 새로운 heading4(22px, weight 600) 추가, body1(weight 500→600) 업데이트.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

🎨 Html&css

Suggested reviewers

  • YermIm
  • Seojegyeong
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed PR의 모든 변경사항이 이슈 #55의 요구사항과 일치합니다. font-heading1/3/4 수정 및 tertiary variant 추가 모두 체크리스트에서 완료 표시되어 있습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항(typography 수정 및 Button tertiary variant)이 이슈 #55의 명시된 범위 내에 있으며, 추가적인 범위 외 변경은 없습니다.
Title check ✅ Passed PR 제목이 주요 변경사항과 부분적으로 관련있습니다. Button tertiary variant 추가를 명시하고 있지만, 텍스트 스타일 수정이라는 실질적인 변경사항(heading 폰트 크기/무게 조정, font-heading4 추가)을 누락했습니다.
Description check ✅ Passed PR 설명이 제목 섹션 누락을 제외하고는 전체 템플릿을 따르며 충분히 작성되었습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/#55

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 and usage tips.

@jjjsun jjjsun changed the title [Refactor/#55]: 텍스트 스타일 수정 및 Button tertiary varient 추가 [Refactor/#55] 텍스트 스타일 수정 및 Button tertiary varient 추가 Feb 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/common/button/Button.tsx (1)

5-52: ⚠️ Potential issue | 🟡 Minor

tertiary에서 size prop이 사실상 무시됩니다.

Line 31-52에서 variantClasses.tertiary!h-7, px-5, rounded-component-lg, font-body2를 포함해 sizeClasses[size]를 덮어써요. 의도된 고정 크기라면 size 옵션을 제한/명시하고, 의도 아니라면 size/variant 클래스를 분리하는 편이 안전합니다.

🛠️ 제안: size 클래스 분리로 충돌 제거
-  const variantClasses = {
+  const variantClasses = {
     primary:
       "bg-chart-3 text-white hover:opacity-80 disabled:bg-bg-disabled disabled:text-text-disabled disabled:hover:opacity-50",
@@
-    tertiary:
-      "!h-7 border border-gray-200 text-text-auth-sub px-5 rounded-component-lg bg-white font-body2 hover:bg-gray-100 transition-colors duration-200 ease-in-out",
+    tertiary:
+      "border border-gray-200 text-text-auth-sub bg-white hover:bg-gray-100 transition-colors duration-200 ease-in-out",
     custom: "",
   };
+
+  const resolvedSizeClasses =
+    variant === "tertiary"
+      ? "h-7 px-5 rounded-component-lg font-body2"
+      : sizeClasses[size];
@@
       className={twMerge(
         "flex items-center justify-center gap-2 active-scale whitespace-nowrap",
-        sizeClasses[size],
+        resolvedSizeClasses,
         variantClasses[variant],
         fullWidth && "w-full relative",
         (disabled || isLoading) && "opacity-50 cursor-not-allowed",
         className,
       )}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/common/button/Button.tsx` around lines 5 - 52, The tertiary
variant currently includes size-related classes that override sizeClasses (see
variantClasses.tertiary and sizeClasses in Button), causing the size prop to be
ignored; fix by removing height/padding/rounded/font classes from
variantClasses.tertiary so it only contains color/visual rules, or alternatively
enforce the intent by applying sizeClasses conditionally (e.g., only skip
sizeClasses when variant === 'tertiary' and explicitly document/limit allowed
sizes) — update the Button component to either strip "!h-7 px-5
rounded-component-lg font-body2" from variantClasses.tertiary or add conditional
logic around applying sizeClasses to preserve consistent sizing behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/components/common/button/Button.tsx`:
- Around line 5-52: The tertiary variant currently includes size-related classes
that override sizeClasses (see variantClasses.tertiary and sizeClasses in
Button), causing the size prop to be ignored; fix by removing
height/padding/rounded/font classes from variantClasses.tertiary so it only
contains color/visual rules, or alternatively enforce the intent by applying
sizeClasses conditionally (e.g., only skip sizeClasses when variant ===
'tertiary' and explicitly document/limit allowed sizes) — update the Button
component to either strip "!h-7 px-5 rounded-component-lg font-body2" from
variantClasses.tertiary or add conditional logic around applying sizeClasses to
preserve consistent sizing behavior.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b261843 and f8112e4.

📒 Files selected for processing (3)
  • src/components/common/button/Button.stories.tsx
  • src/components/common/button/Button.tsx
  • src/index.css

@jjjsun jjjsun changed the title [Refactor/#55] 텍스트 스타일 수정 및 Button tertiary varient 추가 [Refactor/#55] Button tertiary varient 추가 Feb 24, 2026
@jjjsun
jjjsun merged commit e2031fb into develop Feb 25, 2026
2 checks passed
@jjjsun
jjjsun deleted the refactor/#55 branch February 25, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

♻️ [Refactor] Button 타입 추가

3 participants