Skip to content

[Feature/#52] 공통 버튼에 스타일 개선 - #53

Merged
jjjsun merged 4 commits into
developfrom
feature/#52
Feb 24, 2026
Merged

jjjsun merged 4 commits into
developfrom
feature/#52

Conversation

@jjjsun

@jjjsun jjjsun commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

🚨 관련 이슈

Closed #52

✨ 변경사항

  • 🐞 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.)

✏️ 작업 내용

  • 기존 primary 컬러를 주 사용컬러인 chart-3로 변경 및 hover 개선
  • danger, dangerSoft varient 추가
  • border 클래스 두께변경
  • 버튼 전환효과 자연스럽게 변경
  • 스토리북에 danger, dangersoft 스토리 추가 및 varient 확인용 스토리 보

😅 미완성 작업

N/A

📢 논의 사항 및 참고 사항

지금 워크스페이스 관련 페이지 개발하다가 버튼 컴포넌트 사용이 불편한것같아서 수정작업 진행했습니다! 추가로 팀원들 각자 페이지 구현하다가 불편한 스토리북 컴포넌트 발견하면 알려주세요! 바로 수정작업 들어가겠습니다!

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

Summary by CodeRabbit

  • New Features

    • 버튼 변형에 "danger" 및 "dangerSoft" 추가
  • 스타일 업데이트

    • 버튼 크기별 전환 효과 및 호버 반응 개선
    • 비활성화 상태(disabled) 시 시각적 표현 업데이트
    • outline과 gradient 변형의 호버/비활성화 동작 조정
    • 전체 너비(fullWidth) 및 로딩(isLoading) 동작은 유지

@jjjsun
jjjsun requested review from Seojegyeong and YermIm February 23, 2026 16:15
@jjjsun jjjsun self-assigned this Feb 23, 2026
@jjjsun jjjsun added the 🎨 Html&css 마크업 & 스타일링 label Feb 23, 2026
@coderabbitai

coderabbitai Bot commented Feb 23, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@jjjsun has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 6 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between ccece1a and 15c8d3e.

📒 Files selected for processing (1)
  • src/components/common/button/Button.tsx
📝 Walkthrough

Walkthrough

Updated the Button component and its Storybook: added "danger" and "dangerSoft" variants, adjusted variant typings and styling (colors, borders, opacity, transitions), removed a root transition-smooth class, and added corresponding Story exports for the new variants.

Changes

Cohort / File(s) Summary
Button component & stories
src/components/common/button/Button.tsx, src/components/common/button/Button.stories.tsx
Added danger and dangerSoft variants and Story exports; expanded IButtonProps.variant union; updated size classes to include transition properties; refactored variant styles (primary, secondary, outline, gradient, danger/dangerSoft) and removed transition-smooth from the root button container.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

"I hopped through code with a twitch and grin,
New danger hues stitched softly within,
Stories bloom to show the change,
Transitions hum — a tidy range 🐇✨"

🚥 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
Title check ✅ Passed The PR title clearly describes the main change: Button component style improvement, which aligns with the actual modifications to styling and new variants.
Description check ✅ Passed The PR description follows the template structure with all major sections completed: linked issue (#52), change type (Design) selected, work content detailed, incomplete tasks marked as N/A, and discussion notes provided.
Linked Issues check ✅ Passed The PR successfully addresses all requirements from issue #52: primary style changes applied, danger/dangerSoft variants added, border class modifications made, and transitions improved, matching all checked items in the issue checklist.
Out of Scope Changes check ✅ Passed All code changes in Button.tsx and Button.stories.tsx directly support the stated objectives of style improvement, variant additions, and transition adjustments with no extraneous modifications detected.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#52

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 [Feat]: 공통 버튼에 스타일 개선 [Feature/#52]: 공통 버튼에 스타일 개선 Feb 23, 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.

Actionable comments posted: 2

> [!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)

59-64: ⚠️ Potential issue | 🟠 Major

로딩 상태에 aria-busy 속성이 누락되어 있습니다.

isLoadingtrue일 때 버튼은 HTML disabled 속성을 받고 스피너가 렌더링되지만, 스크린 리더는 버튼이 로딩 중인지 단순히 비활성화된 건지 구분할 수 없습니다. aria-busy={isLoading} 속성을 추가하면 보조 기술이 로딩 상태를 인식할 수 있습니다.

As per coding guidelines, src/** 파일은 "접근성: 시맨틱 HTML, ARIA 속성 사용 확인"을 준수해야 합니다.

♿ 제안 수정
     <button
       className={twMerge(...)}
       disabled={disabled || isLoading}
+      aria-busy={isLoading}
       {...rest}
     >
🤖 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 59 - 64, The Button
component currently sets disabled and renders a spinner when isLoading is true
but lacks ARIA to announce loading; update the root button element in Button.tsx
(the element using disabled={disabled || isLoading} and {...rest}) to include
aria-busy={isLoading}, ensuring you add the attribute in the explicit props (or
place it after {...rest} so it cannot be accidentally overridden) so assistive
tech can detect the loading state; keep the rest of the logic (isLoading,
disabled, spinner span) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/common/button/Button.tsx`:
- Around line 37-43: The variant class strings in Button.tsx include
"disabled:hover:opacity-100" which overrides the component-level conditional
"(disabled || isLoading) && \"opacity-50\"" on hover; update all occurrences of
"disabled:hover:opacity-100" in the variant definitions (the variant map used by
the Button component) to "disabled:hover:opacity-50" so the disabled hover state
preserves the intended 50% opacity for both disabled and loading states.
- Around line 44-45: The dangerSoft variant string lacks a disabled-hover
override, so disabled buttons still respond to hover; update the dangerSoft
class (the dangerSoft entry in the Button variant definitions) to include the
same disabled-hover override used elsewhere (e.g., add
disabled:hover:bg-transparent or the appropriate disabled:hover:opacity-* token
used by other variants) so that when the button is disabled its hover background
change (hover:bg-status-red/20) is suppressed.

---

Outside diff comments:
In `@src/components/common/button/Button.tsx`:
- Around line 59-64: The Button component currently sets disabled and renders a
spinner when isLoading is true but lacks ARIA to announce loading; update the
root button element in Button.tsx (the element using disabled={disabled ||
isLoading} and {...rest}) to include aria-busy={isLoading}, ensuring you add the
attribute in the explicit props (or place it after {...rest} so it cannot be
accidentally overridden) so assistive tech can detect the loading state; keep
the rest of the logic (isLoading, disabled, spinner span) unchanged.

ℹ️ 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 74d3da7 and bc2e206.

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

Comment thread src/components/common/button/Button.tsx Outdated
Comment thread src/components/common/button/Button.tsx Outdated

@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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/common/button/Button.tsx`:
- Line 48: The gradient variant in Button (Button.tsx) currently uses
"hover:opacity-90" which overrides the disabled opacity; update the gradient
variant string to include "disabled:hover:opacity-50" (matching the other
opacity-based variants like primary/secondary/danger) so a disabled gradient
button cannot be raised to 90% on hover and retains the disabled visual cue;
locate the gradient class entry in the variant definitions inside the Button
component and append the disabled:hover:opacity-50 token alongside
hover:opacity-90.
- Line 40: The secondary button variant in Button.tsx uses the class string
containing "bg-gray-100 text-brand-900 hover:bg-gray-200 disabled:bg-bg-disabled
disabled:text-text-disabled disabled:hover:opacity-50" but is missing the
explicit "disabled:hover:bg-bg-disabled" override; update the secondary
variant's class list to include disabled:hover:bg-bg-disabled so disabled state
wins over hover (matching the outline and dangerSoft patterns) and prevents
hover:bg-gray-200 from applying when disabled.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc2e206 and ccece1a.

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

Comment thread src/components/common/button/Button.tsx Outdated
Comment thread src/components/common/button/Button.tsx Outdated
@YermIm

YermIm commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

P4: 확인했습니다! 감사합니다 👍🏻

@Seojegyeong Seojegyeong left a comment

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.

P4: 확인했습니다!

@jjjsun
jjjsun merged commit b261843 into develop Feb 24, 2026
2 checks passed
@jjjsun
jjjsun deleted the feature/#52 branch February 24, 2026 04:29
@jjjsun jjjsun changed the title [Feature/#52]: 공통 버튼에 스타일 개선 [Feature/#52] 공통 버튼에 스타일 개선 Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎨 Html&css 마크업 & 스타일링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ [Feature] 공통 Button 컴포넌트 스타일 개선

3 participants