feat(IconButton): spec 정합 — 박스 토큰화·hit area 정책·색상 갱신#494
Conversation
- normal: 박스 = nearestDimensionToken(icon × 1.5, tie→up), WCAG 24 clamp. corner radius = nearestRadiusToken(box × 0.3, tie→down). xlarge box 40→36. - background: 박스 = nearestDimensionToken(icon × 1.5). 기본 icon 24→20, `.background()` default 인자 지원. 글래스 레이어 컨테이너 채움. - outlined/solid: 컨테이너 크기 지정 모델. small 32 / medium 40 / custom(N)은 max(24, N), icon = box − 12. WCAG 24 clamp. - disabled: outlined 배경 `.backgroundNormal`, solid 배경 `.fillNormal`, background icon coolNeutral50@0.22. - interaction expansion 제거 → hit area = container 100%. - Blueprint Preview에 debug frame 토글 추가(시각 검증용), background customSize 기본값 20으로 동기화. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary by CodeRabbit릴리스 노트
WalkthroughIconButton 컴포넌트의 크기 계산 모델을 재설계하고 ZStack 기반 레이아웃으로 전환합니다. Variant API에 기본값을 추가하고, 프리뷰에 디버그 프레임 도구를 제공하며, 문서와 로컬라이제이션을 업데이트합니다. ChangesIconButton 구조 재설계 및 기능 강화
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 `@packages/montage-mcp/data/components.json`:
- Line 1050: 요약 문자열에 선행 특수문자 '·'가 포함되어 있어 문서에 오타로 노출됩니다;
packages/montage-mcp/data/components.json에서 해당 항목의 "summary" 값(현재 "· variant의
컨테이너 사이즈를 결정하는 열거형입니다.")을 찾아 선행 '·' 및 불필요한 공백을 제거하여 "variant의 컨테이너 사이즈를 결정하는
열거형입니다."로 변경해 주세요.
🪄 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: 398a0414-8024-4898-bc29-29ed93de4035
📒 Files selected for processing (5)
Sources/Blueprint/Sources/Scene/Previews/IconButtonPreview.swiftSources/Montage/1 Components/2 Actions/IconButton.swiftSources/Montage/Asset/Localizable.xcstringsdocumentation/components/actions/iconbutton/ios.mdpackages/montage-mcp/data/components.json
| "name": "IconButton.Size", | ||
| "kind": "enum", | ||
| "summary": "버튼 사이즈를 결정하는 열거형입니다.", | ||
| "summary": "· variant의 컨테이너 사이즈를 결정하는 열거형입니다.", |
There was a problem hiding this comment.
요약 문구 선행 특수문자 제거 필요
Line 1050의 ·는 문서 노출 시 오타처럼 보입니다. 불필요한 선행 문자는 제거해 주세요.
수정 제안
- "summary": "· variant의 컨테이너 사이즈를 결정하는 열거형입니다.",
+ "summary": "variant의 컨테이너 사이즈를 결정하는 열거형입니다.",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "summary": "· variant의 컨테이너 사이즈를 결정하는 열거형입니다.", | |
| "summary": "variant의 컨테이너 사이즈를 결정하는 열거형입니다.", |
🤖 Prompt for 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.
In `@packages/montage-mcp/data/components.json` at line 1050, 요약 문자열에 선행 특수문자 '·'가
포함되어 있어 문서에 오타로 노출됩니다; packages/montage-mcp/data/components.json에서 해당 항목의
"summary" 값(현재 "· variant의 컨테이너 사이즈를 결정하는 열거형입니다.")을 찾아 선행 '·' 및 불필요한 공백을 제거하여
"variant의 컨테이너 사이즈를 결정하는 열거형입니다."로 변경해 주세요.
Summary
Confluence IconButton 스펙 (4.0.0 기준, 2026-05-28 change log)에 맞춰 iOS IconButton의 박스·패딩·반경·색상 정책을 갱신합니다. 지라: WRP-887.
Changes
normal variant
nearestDimensionToken(icon × 1.5, tie→up), WCAG 2.2 SC 2.5.8 보장(box ≥ 24).nearestRadiusToken(box × 0.3, tie→down).interactionExpansion제거 → hit area = container 100%.background variant
nearestDimensionToken(icon × 1.5), pill.case background(size: Int = 20, isAlternative: Bool = false)default 인자 지원.regularMaterial)는 컨테이너 전체를 채움.staticWhite@0.88/ 기본coolNeutral50@0.61(0.74→0.61).outlined / solid variant
custom(N): box =max(24, N)(WCAG clamp), icon =box − 12, padding 6.Disabled
.clear→semantic.backgroundNormal.semantic.fillNormal@0.08→semantic.fillNormal.coolNeutral50@0.22(변경 없음).Blueprint Preview
customSize기본값 24 → 20 (background 새 default 반영).debug frame토글 추가 — normal variant의 transparent 박스(1.5배) 영역을 빨간 외곽선으로 시각화하는 검증용 도구.문서
documentation/components/actions/iconbutton/ios.md자동 갱신.packages/montage-mcp/data/components.json자동 갱신.Test plan
xcodebuild -workspace Montage.xcworkspace -scheme Montage build통과xcodebuild -workspace Montage.xcworkspace -scheme Blueprint build통과make실행으로 문서/MCP 데이터 갱신 (verify-docs 통과 예상).background()) 호출이 size=20으로 동작하는지 확인🤖 Generated with Claude Code