Skip to content

[Feat] #91 - ActionButton 카탈로그 추가#93

Merged
yungu0010 merged 1 commit into
defaultfrom
feat/#91-action-button-catalog
Jun 1, 2026
Merged

[Feat] #91 - ActionButton 카탈로그 추가#93
yungu0010 merged 1 commit into
defaultfrom
feat/#91-action-button-catalog

Conversation

@yungu0010
Copy link
Copy Markdown
Member

@yungu0010 yungu0010 commented May 30, 2026

🌴 PR 요약

🌱 작업한 브랜치

🌱 PR Point

ActionButtonViewController 구조

  • makeVariantSection

    • variant(Primary / Secondary / Danger) 단위 섹션 생성.
    • 섹션 타이틀 + Default / Disabled / With Icon 3개 행으로 구성
  • makeRow

    • 지정된 sizes와 enabled 상태의 버튼들을 한 행으로 구성
  • makeIconRow

    • 지원되는 sizes별로 prefix + suffix 아이콘이 적용된 버튼을 한 행으로 구성
  • `makeCardRow

    • 레이블 + 카드 컨테이너 + 버튼 목록을 하나의 행으로 조합하는 공통 헬퍼

Button 카테고리 계층 추가

기존 Component 목록에 Button 카테고리를 추가하고, 그 하위에 Action Button을 배치했습니다.

  • ComponentCategoryViewControllerButtonCategoryViewControllerActionButtonViewController

📌 참고 사항

  • danger variant는 디자인 스펙상 xsmall 미지원으로, Default / Disabled / With Icon 모두 small, medium, large만 표시
  • scrollView.delaysContentTouches = false 설정: 스크롤뷰 내 버튼 터치가 바로 반응할 수 있도록

📸 스크린샷

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-05-31.at.03.32.56.mov

📮 관련 이슈

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Review Change Stack

Warning

Review limit reached

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

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 @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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fc91d1c9-6c5e-4599-a3bc-2f5629e0443b

📥 Commits

Reviewing files that changed from the base of the PR and between daaa3ed and 78f231f.

📒 Files selected for processing (3)
  • MDS/Sources/Components/ActionButton/MDSActionButton.swift
  • MDSStoryBook/MDSStoryBook/Component/ActionButton/ActionButtonViewController.swift
  • MDSStoryBook/MDSStoryBook/Component/ComponentCategoryViewController.swift

Walkthrough

ComponentCategory에 "Button"을 추가해 ButtonCategory로 이동 가능하게 하고, ButtonCategory에서 ActionButtonViewController로 진입합니다. ActionButtonViewController는 primary/secondary/danger 변형별로 Default·Disabled·With Icon 행의 MDSActionButton을 크기별로 동적으로 생성합니다. MDSActionButton의 highlighted 배경 토큰이 일부 pressed 계열로 변경되었습니다.

Changes

Button 카탈로그 기능

Layer / File(s) Summary
메인 카테고리 네비게이션 라우팅 확장
MDSStoryBook/MDSStoryBook/Component/ComponentCategoryViewController.swift
categories"Button"을 추가하고 cellForRowAt 단순화 및 didSelectRowAt에 Button 케이스를 추가해 ButtonCategoryViewController로 라우팅합니다.
Button 카테고리 목록 화면
MDSStoryBook/MDSStoryBook/Component/Button/ButtonCategoryViewController.swift
ButtonCategoryViewController를 추가하여 insetGrouped UITableView로 카테고리 목록을 표시하고, Action Button 선택 시 ActionButtonViewController로 푸시합니다.
Action Button 카탈로그 화면 구성
MDSStoryBook/MDSStoryBook/Component/ActionButton/ActionButtonViewController.swift
ActionButtonViewController를 추가해 UIScrollView·UIStackView 레이아웃을 구성하고, primary/secondary/danger 변형을 순회해 Default/Disabled/With Icon 행과 크기별 MDSActionButton을 동적으로 생성·배치합니다. 버튼 탭 핸들러가 추가되었으나 구현은 비어 있습니다.
MDSActionButton highlighted 배경 토큰 수정
MDS/Sources/Components/ActionButton/MDSActionButton.swift
ColorToken 생성 로직에서 .primary·.secondary variant의 isHighlighted 배경 토큰을 *.hover에서 *.pressed 계열로 변경했습니다 (highlighted 배경만 변경).

Sequence Diagram

sequenceDiagram
  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: 변형·상태·크기별 버튼 목록 표시
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • #100: Action Button 카탈로그 추가 — 이 PR의 목적(버튼 카탈로그 추가)과 직접적으로 일치합니다.

Possibly related PRs

Suggested reviewers

  • kwonseokki
  • juri123123

Poem

🐰 작은 당근을 들고 와서,
버튼 숲 사이를 껑충껑충,
변형마다 빛나는 작은 버튼들,
카탈로그 한눈에 담아 보여주며,
훌쩍 기뻐 뛰는 토끼의 박수!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 23.53% 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 제목이 핵심 변경 사항인 ActionButton 카탈로그 추가를 명확하게 설명하고 있으며, 간결하고 구체적입니다.
Description check ✅ Passed PR 설명이 ActionButton 카탈로그 추가와 관련된 구조, 계층, 참고사항을 상세히 기술하고 있으며, 변경사항과 직접적으로 관련됩니다.
Linked Issues check ✅ Passed PR은 이슈 #91의 ActionButton 카탈로그 추가 요구사항을 충족합니다. ActionButtonViewController 추가, Button 카테고리 계층 구조 등 모든 주요 구현이 포함되어 있습니다.
Out of Scope Changes check ✅ Passed PR의 모든 변경사항이 ActionButton 카탈로그 추가라는 범위 내에 있으며, 색상 토큰 수정도 MDSActionButton의 highlighted 상태 개선으로 기능적 범위 내입니다.

✏️ 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/#91-action-button-catalog

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.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread MDSStoryBook/MDSStoryBook/Component/Button/ButtonCategoryViewController.swift Outdated
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.

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4303a5a and 2f0c36f.

📒 Files selected for processing (3)
  • MDSStoryBook/MDSStoryBook/Component/ActionButton/ActionButtonViewController.swift
  • MDSStoryBook/MDSStoryBook/Component/Button/ButtonCategoryViewController.swift
  • MDSStoryBook/MDSStoryBook/Component/ComponentCategoryViewController.swift

@yungu0010 yungu0010 self-assigned this May 30, 2026
@yungu0010 yungu0010 added enhancement New feature or request feat labels May 30, 2026
@yungu0010 yungu0010 requested a review from juri123123 May 30, 2026 18:37
@yungu0010 yungu0010 force-pushed the feat/#91-action-button-catalog branch from 2f0c36f to 76cdee3 Compare May 30, 2026 18:42
@yungu0010 yungu0010 force-pushed the feat/#91-action-button-catalog branch from daaa3ed to 7ba94d6 Compare June 1, 2026 06:32
@yungu0010 yungu0010 force-pushed the feat/#91-action-button-catalog branch from 7ba94d6 to 78f231f Compare June 1, 2026 06:34
@yungu0010 yungu0010 merged commit aa29850 into default Jun 1, 2026
1 check passed
@yungu0010 yungu0010 deleted the feat/#91-action-button-catalog branch June 1, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] Action Button 카탈로그 추가

2 participants