[Feat] #91 - ActionButton 카탈로그 추가#93
Conversation
|
Warning Review limit reached
More reviews will be available in 54 minutes and 13 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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughComponentCategory에 "Button"을 추가해 ButtonCategory로 이동 가능하게 하고, ButtonCategory에서 ActionButtonViewController로 진입합니다. ActionButtonViewController는 primary/secondary/danger 변형별로 Default·Disabled·With Icon 행의 MDSActionButton을 크기별로 동적으로 생성합니다. MDSActionButton의 highlighted 배경 토큰이 일부 pressed 계열로 변경되었습니다. ChangesButton 카탈로그 기능
Sequence DiagramsequenceDiagram
participant User
participant ComponentCategoryVC as ComponentCategoryViewController
participant ButtonCategoryVC as ButtonCategoryViewController
participant ActionButtonVC as ActionButtonViewController
User->>ComponentCategoryVC: 카테고리 선택 (Button)
ComponentCategoryVC->>ButtonCategoryVC: push ButtonCategoryViewController
User->>ButtonCategoryVC: 항목 선택 (Action Button)
ButtonCategoryVC->>ActionButtonVC: push ActionButtonViewController
ActionButtonVC->>ActionButtonVC: setupLayout (scrollView, contentStack)
ActionButtonVC->>ActionButtonVC: setupContent (변형별 섹션 생성)
ActionButtonVC->>ActionButtonVC: makeRow / makeIconRow (크기별 MDSActionButton 생성)
ActionButtonVC->>User: 변형·상태·크기별 버튼 목록 표시
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
Code Review
This pull request introduces the ActionButtonViewController to showcase different variants, sizes, and states of MDSActionButton in the storybook, and integrates it by adding a new 'Button' category in ButtonCategoryViewController and ComponentCategoryViewController. A critical issue was identified in ButtonCategoryViewController.swift where a new UITableViewCell is instantiated on every row request instead of utilizing the dequeued cell, which breaks the table view's cell reuse mechanism and should be corrected.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
MDSStoryBook/MDSStoryBook/Component/Button/ButtonCategoryViewController.swift (1)
52-58: 💤 Low value셀 재사용이 무력화됩니다.
dequeueReusableCell로 셀을 가져온 직후 53→54번 라인에서UITableViewCell을 새로 생성해 덮어쓰고 있어, 등록한 재사용 큐가 사용되지 않습니다. 기본 스타일 셀이면 dequeue된 셀을 그대로 구성하면 됩니다. (ComponentCategoryViewController에도 동일 패턴이 있어 함께 정리하면 좋습니다.)♻️ 제안 수정
- var cell = tableView.dequeueReusableCell(withIdentifier: "CategoryCell", for: indexPath) - cell = UITableViewCell(style: .default, reuseIdentifier: "CategoryCell") + let cell = tableView.dequeueReusableCell(withIdentifier: "CategoryCell", for: indexPath) cell.textLabel?.text = categories[indexPath.row]🤖 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 `@MDSStoryBook/MDSStoryBook/Component/Button/ButtonCategoryViewController.swift` around lines 52 - 58, The table view cell reuse is being disabled in tableView(_:cellForRowAt:) of ButtonCategoryViewController (and likewise in ComponentCategoryViewController) because you dequeue a cell then immediately overwrite it with a fresh UITableViewCell; instead remove the new allocation and configure the dequeued cell (set textLabel?.text and accessoryType) so the reuse queue is used; ensure the cell identifier "CategoryCell" is registered (or a prototype cell exists) so dequeueReusableCell(withIdentifier:for:) always returns a valid cell.
🤖 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.
Nitpick comments:
In
`@MDSStoryBook/MDSStoryBook/Component/Button/ButtonCategoryViewController.swift`:
- Around line 52-58: The table view cell reuse is being disabled in
tableView(_:cellForRowAt:) of ButtonCategoryViewController (and likewise in
ComponentCategoryViewController) because you dequeue a cell then immediately
overwrite it with a fresh UITableViewCell; instead remove the new allocation and
configure the dequeued cell (set textLabel?.text and accessoryType) so the reuse
queue is used; ensure the cell identifier "CategoryCell" is registered (or a
prototype cell exists) so dequeueReusableCell(withIdentifier:for:) always
returns a valid cell.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d84c7093-70a1-443d-aaaf-85fca74bde60
📒 Files selected for processing (3)
MDSStoryBook/MDSStoryBook/Component/ActionButton/ActionButtonViewController.swiftMDSStoryBook/MDSStoryBook/Component/Button/ButtonCategoryViewController.swiftMDSStoryBook/MDSStoryBook/Component/ComponentCategoryViewController.swift
2f0c36f to
76cdee3
Compare
daaa3ed to
7ba94d6
Compare
7ba94d6 to
78f231f
Compare
🌴 PR 요약
🌱 작업한 브랜치
🌱 PR Point
ActionButtonViewController 구조
makeVariantSectionmakeRowmakeIconRow`makeCardRow
Button 카테고리 계층 추가
기존 Component 목록에 Button 카테고리를 추가하고, 그 하위에 Action Button을 배치했습니다.
ComponentCategoryViewController→ButtonCategoryViewController→ActionButtonViewController📌 참고 사항
scrollView.delaysContentTouches = false설정: 스크롤뷰 내 버튼 터치가 바로 반응할 수 있도록📸 스크린샷
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-05-31.at.03.32.56.mov
📮 관련 이슈