Skip to content

feat: IconButton 시안 정합 — NormalSize enum 도입 및 사이즈 토큰 갱신#485

Merged
knine79 merged 4 commits into
release/4.0.0from
feat/iconbutton-ui-update
May 26, 2026
Merged

feat: IconButton 시안 정합 — NormalSize enum 도입 및 사이즈 토큰 갱신#485
knine79 merged 4 commits into
release/4.0.0from
feat/iconbutton-ui-update

Conversation

@dididoeun
Copy link
Copy Markdown
Collaborator

개요

  • 이슈 링크 :

수정사항

API breaking change

  • IconButton.Variant.normal(size: Int).normal(size: NormalSize)
  • 신규 IconButton.NormalSize enum
    • .small(16) / .medium(18) / .large(20) / .xlarge(24) / .custom(size:)
  • 기본값: .normal(size: .xlarge) (=24, 기존 동작 보존)

Normal variant

항목 Before After
Interaction shape Circle() RoundedRectangle (사이즈별 radius)
Interaction radius small/medium: 8, large: 10, xlarge: 12
Interaction frame 40x40 (offset 8 고정) small: 24, medium: 28, large: 32, xlarge: 40
Disable icon color .labelDisable.opacity(0.16) .labelDisable (시안 #37383C)

Outlined / Solid variant

항목 Before After
.small icon 18 16
.medium icon 20 18
.small padding 7 8
.medium padding 10 11
.custom padding 6 7
Outlined border .lineNeutral .lineNeutral.opacity(0.16)
Outlined Interaction border 안쪽까지 border 바깥 1px까지 확장
Disable icon color .labelDisable.opacity(0.16) .labelDisable

호출처 마이그레이션

Tab / Category / Select / TextField / SnackBar / Card / Popover / TextFieldPreview 모두 새 NormalSize enum 사용으로 갱신. 시안에 없는 픽셀값(8, 22)은 .custom(size:)로 변환해 시각적 픽셀값 보존.

Blueprint

  • IconButtonPreview의 normal size UI를 [small][medium][large][xlarge][custom] SegmentedControl로 변경
  • custom 선택 시 슬라이더 + 현재 값 라벨 노출

자동 생성

  • make로 DocC 및 MCP 데이터 갱신 (documentation/components/actions/iconbutton/ios.md, packages/montage-mcp/data/components.json)

미리보기

작업 전 작업 후
스크린샷 스크린샷

@dididoeun dididoeun self-assigned this May 21, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Review Change Stack

Warning

Review limit reached

@knine79, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 28 minutes and 24 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b502bb81-0fb2-49a7-871f-f20f29dfabab

📥 Commits

Reviewing files that changed from the base of the PR and between 9165ae9 and 337acbb.

📒 Files selected for processing (15)
  • Sources/Blueprint/Sources/Scene/Previews/IconButtonPreview.swift
  • Sources/Blueprint/Sources/Scene/Previews/TextFieldPreview.swift
  • Sources/Montage/1 Components/2 Actions/IconButton.swift
  • Sources/Montage/1 Components/3 Selection And Input/Control.swift
  • Sources/Montage/1 Components/3 Selection And Input/Select.swift
  • Sources/Montage/1 Components/3 Selection And Input/TextField.swift
  • Sources/Montage/1 Components/4 Contents/Card.swift
  • Sources/Montage/1 Components/4 Contents/Thumbnail.swift
  • Sources/Montage/1 Components/6 Navigations/Category.swift
  • Sources/Montage/1 Components/6 Navigations/Tab.swift
  • Sources/Montage/1 Components/7 Feedback/SnackBar.swift
  • Sources/Montage/1 Components/8 Presentation/Popover.swift
  • documentation/components/actions/iconbutton/ios.md
  • packages/montage-mcp/data/components.json
  • packages/montage-mcp/data/markdown/coding-guidelines.md

Walkthrough

Button에 negative 색상과 xsmall 크기를 추가하고, IconButton의 normal variant 크기를 Int 타입에서 NormalSize enum으로 리팩토링합니다. outlined + negative 조합은 자동으로 solid로 폴백되며, 여러 의존 컴포넌트의 IconButton 호출이 업데이트되고, Preview와 문서도 함께 변경됩니다.

Changes

Button 및 IconButton 컴포넌트 확장

Layer / File(s) Summary
Button: negative 색상 및 xsmall 크기 지원
Sources/Montage/1 Components/2 Actions/Button.swift, documentation/components/actions/button/ios.md
Button.Colornegative 케이스를 추가하고, outlined + negative 조합이 자동으로 solid로 폴백되도록 initializer에서 처리합니다. negative에 대한 semantic 배경색, 전경색, 로딩 색상 매핑을 정의하고, 크기 계산 로직에서 xsmall을 포함하도록 확장합니다.
IconButton: NormalSize enum 도입 및 기본값 변경
Sources/Montage/1 Components/2 Actions/IconButton.swift, documentation/components/actions/iconbutton/ios.md
IconButton.Variant.normal의 size 파라미터를 Int에서 NormalSize enum(small/medium/large/xlarge/custom)으로 변경하고, 상호작용 형태(normal은 라운디드 렉탱글, 다른 variant는 Circle)와 아이콘 크기 계산을 NormalSize에 맞춰 재정의합니다. 초기자 기본값을 24에서 .xlarge로 변경합니다.
의존 컴포넌트 마이그레이션
Sources/Montage/1 Components/3 Selection And Input/Select.swift, Sources/Montage/1 Components/3 Selection And Input/TextField.swift, Sources/Montage/1 Components/4 Contents/Card.swift, Sources/Montage/1 Components/6 Navigations/Category.swift, Sources/Montage/1 Components/6 Navigations/Tab.swift, Sources/Montage/1 Components/7 Feedback/SnackBar.swift, Sources/Montage/1 Components/8 Presentation/Popover.swift
Select, TextField, Card, Category, Tab, SnackBar, Popover에서 IconButton 호출 시 size 인자를 NormalSize enum 값(small, large, xlarge) 또는 custom(size:) 형태로 업데이트합니다. TextField의 TrailingButton에서 negative 색상에 대한 textColor와 typoWeight 매핑도 조정합니다.
Preview 파일: UI 옵션 확장
Sources/Blueprint/Sources/Scene/Previews/ButtonPreview.swift, Sources/Blueprint/Sources/Scene/Previews/IconButtonPreview.swift, Sources/Blueprint/Sources/Scene/Previews/TextFieldPreview.swift
ButtonPreview의 색상 및 크기 옵션에 negative와 xsmall을 추가하고, outlined + negative 조합 시 border UI를 숨기는 조건부 로직을 구현합니다. IconButtonPreview에서 normal variant를 위한 별도 크기 선택(normalSizeIndex)과 UI 분기(일반 세그먼트 + custom일 때만 슬라이더)를 추가합니다.
문서 및 메타데이터 업데이트
documentation/components/actions/button/ios.md, documentation/components/actions/iconbutton/ios.md, packages/montage-mcp/data/components.json
Button과 IconButton의 공개 API 문서에서 negative 색상, xsmall 크기, NormalSize enum을 추가하고 기본값을 업데이트합니다. components.json 메타데이터에도 새 열거형 케이스들을 반영합니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • wanteddev/montage-ios#470: Button의 negative 색상 및 xsmall 크기 옵션, 그리고 Button과 TextField 컴포넌트의 관련 로직 변경이 이전 PR과 코드 레벨에서 직접 겹칩니다.

Suggested labels

accepted, AI Review Completed

Suggested reviewers

  • knine79
🚥 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 PR 제목이 핵심 변경사항을 명확하게 요약하고 있습니다. 'NormalSize enum 도입' 및 '사이즈 토큰 갱신'이라는 주요 개선사항을 정확히 반영하고 있습니다.
Description check ✅ Passed PR 설명이 변경사항과 관련성이 높습니다. API 변경, 각 variant별 업데이트, 호출처 마이그레이션, Blueprint 및 자동 생성 부분을 상세히 설명하고 있습니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/iconbutton-ui-update

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.

@dididoeun
Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Sources/Blueprint/Sources/Scene/Previews/IconButtonPreview.swift`:
- Line 16: The initial normalSizeIndex is set to 2 which maps to .large(20) but
the comment and intended default are 24px/.xlarge; update the `@State` property
normalSizeIndex in IconButtonPreview so its initial value matches the index that
corresponds to the .xlarge (24px) size and update the trailing comment to
reflect 24 as the default; locate the normalSizeIndex declaration to change its
numeric value and accompanying comment to the correct index for .xlarge.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5a65aea1-a446-4eb7-a419-fe9d9873219c

📥 Commits

Reviewing files that changed from the base of the PR and between f758cc8 and 9165ae9.

📒 Files selected for processing (15)
  • Sources/Blueprint/Sources/Scene/Previews/ButtonPreview.swift
  • Sources/Blueprint/Sources/Scene/Previews/IconButtonPreview.swift
  • Sources/Blueprint/Sources/Scene/Previews/TextFieldPreview.swift
  • Sources/Montage/1 Components/2 Actions/Button.swift
  • Sources/Montage/1 Components/2 Actions/IconButton.swift
  • Sources/Montage/1 Components/3 Selection And Input/Select.swift
  • Sources/Montage/1 Components/3 Selection And Input/TextField.swift
  • Sources/Montage/1 Components/4 Contents/Card.swift
  • Sources/Montage/1 Components/6 Navigations/Category.swift
  • Sources/Montage/1 Components/6 Navigations/Tab.swift
  • Sources/Montage/1 Components/7 Feedback/SnackBar.swift
  • Sources/Montage/1 Components/8 Presentation/Popover.swift
  • documentation/components/actions/button/ios.md
  • documentation/components/actions/iconbutton/ios.md
  • packages/montage-mcp/data/components.json

Comment thread Sources/Blueprint/Sources/Scene/Previews/IconButtonPreview.swift Outdated
@github-actions github-actions Bot added the in review This issue requires a review. label May 21, 2026
@github-actions github-actions Bot added accepted This issue has been reviewed. and removed in review This issue requires a review. labels May 21, 2026
@knine79 knine79 added this to the 4.0.0 milestone May 22, 2026
@knine79 knine79 force-pushed the feat/iconbutton-ui-update branch from 9634778 to 8fb44de Compare May 26, 2026 10:28
@github-actions github-actions Bot added in review This issue requires a review. and removed accepted This issue has been reviewed. labels May 26, 2026
@knine79 knine79 force-pushed the feat/iconbutton-ui-update branch from 8fb44de to 337acbb Compare May 26, 2026 10:42
@knine79 knine79 marked this pull request as ready for review May 26, 2026 10:43
@knine79 knine79 requested a review from a team as a code owner May 26, 2026 10:43
@knine79 knine79 requested review from knine79 and removed request for a team May 26, 2026 10:43
@knine79 knine79 added accepted This issue has been reviewed. AI Review Completed and removed in review This issue requires a review. labels May 26, 2026
@knine79 knine79 merged commit 1aaa159 into release/4.0.0 May 26, 2026
1 check passed
@knine79 knine79 deleted the feat/iconbutton-ui-update branch May 26, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted This issue has been reviewed. AI Review Completed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants