Skip to content

feat(notification-badge): add min width/height/aspect-ratio for size=large#1500

Merged
te6-in merged 3 commits intodevfrom
feat/notification-badge-min-aspect-ratio
Apr 23, 2026
Merged

feat(notification-badge): add min width/height/aspect-ratio for size=large#1500
te6-in merged 3 commits intodevfrom
feat/notification-badge-min-aspect-ratio

Conversation

@te6-in
Copy link
Copy Markdown
Member

@te6-in te6-in commented Apr 21, 2026

Summary by CodeRabbit

릴리스 노트

  • 버그 수정

    • NotificationBadge의 large 변형에서 최소 너비가 항상 유지되도록 개선
    • 폰트 스케일링이 적용된 환경에서도 배지가 최소 1:1 종횡비를 보존하도록 수정
  • 문서

    • Storybook 스토리 추가로 다양한 테마와 폰트 스케일 환경에서 동작 확인 가능
    • large/small 변형 사용성 설명(large는 내부 라벨 포함, small은 라벨 미지원) 명확화

te6-in and others added 2 commits April 21, 2026 18:59
…large

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

🦋 Changeset detected

Latest commit: 54d5f31

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@seed-design/rootage-artifacts Patch
@seed-design/css Patch
@seed-design/figma Patch
@seed-design/mcp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Alpha Preview (Stackflow SPA)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Alpha Preview (Storybook)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e01b27ef-fe9e-40fc-a120-f8b47e4588c5

📥 Commits

Reviewing files that changed from the base of the PR and between 0453038 and 54d5f31.

📒 Files selected for processing (1)
  • docs/stories/NotificationBadge.stories.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/stories/NotificationBadge.stories.tsx

📝 Walkthrough

Walkthrough

NotificationBadge의 size=large에 최소 너비(minWidth)와 최소 종횡비(minAspectRatio: 1) 제약을 도입하고, 이를 반영한 레시피 계산식과 Storybook 스토리 파일을 추가하여 폰트 스케일링 시에도 배지의 1:1 비율을 유지하도록 업데이트함.

Changes

Cohort / File(s) Summary
Changeset
./.changeset/shiny-suits-pick.md
@seed-design/rootage-artifacts@seed-design/css에 대한 patch 버전 범프를 기록. NotificationBadge size=large 관련 변경 요약을 추가.
Design Schema
packages/rootage/components/notification-badge.yaml
컴포넌트 스키마에 root 레이아웃 제약으로 minWidth(dimension) 및 minAspectRatio(number) 속성 추가. size=large 루트에 minWidth: 18px, minHeight: 18px, minAspectRatio: 1 명시. 설명 문구 업데이트.
Recipe / Styles
packages/qvism-preset/src/recipes/notification-badge.ts
size.large 변형에 계산된 minWidth 스타일 추가: max(vars.sizeLarge.enabled.root.minWidth, calc(vars.sizeLarge.enabled.label.lineHeight + vars.sizeLarge.enabled.root.paddingY * 2)).
Storybook
docs/stories/NotificationBadge.stories.tsx
NotificationBadge용 Storybook 스토리 추가. attach, size, 선택적 label 조합을 맵핑한 테이블 기반 사례(라이트/다크/폰트 스케일 변형 포함) 제공.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 배지가 말하네, 새 제약을 달고
최소 너비로 껴안고, 정사각을 꿈꾸네
폰트가 커져도 우린 일치해요
작은 스토리도 반짝반짝 ✨
토끼가 박수 쳐요, 깡총깡총!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 풀 리퀘스트 제목은 변경 사항의 주요 내용을 명확하게 반영하고 있습니다. NotificationBadge의 size=large 변형에 최소 너비, 높이, 종횡비 제약을 추가하는 것이 핵심 변경사항이며, 제목이 이를 정확하게 요약합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/notification-badge-min-aspect-ratio

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
Contributor

@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 (3)
docs/stories/NotificationBadge.stories.tsx (2)

28-67: 타입과 컴포넌트의 이름 충돌로 가독성 저하

Line 28에서 정의한 타입 NotificationBadgeCase와 Line 58에서 선언한 컴포넌트 NotificationBadgeCase가 동일한 식별자를 사용합니다. TypeScript는 타입과 값의 네임스페이스가 분리되어 있어 컴파일은 되지만, 파라미터 타입({ attach, size, label }: NotificationBadgeCase)이 같은 이름의 컴포넌트를 가리키는지 타입을 가리키는지 읽는 사람 입장에서 혼란스럽습니다. 컴포넌트 이름을 NotificationBadgeCaseRendererBadgeCase 등으로 변경하는 것을 권장합니다.

♻️ 제안 diff
-const NotificationBadgeCase = ({ attach, size, label }: NotificationBadgeCase) => {
+const NotificationBadgeCaseRenderer = ({ attach, size, label }: NotificationBadgeCase) => {
   return (
     <Box as="span" display="inline-flex" position="relative">
       ...
     </Box>
   );
 };
@@
     <VariantTable
-      Component={NotificationBadgeCase}
+      Component={NotificationBadgeCaseRenderer}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/stories/NotificationBadge.stories.tsx` around lines 28 - 67, The type
and the React component both use the identifier NotificationBadgeCase which
harms readability; rename the component (for example to
NotificationBadgeCaseRenderer or BadgeCase) and update its declaration and all
usages accordingly, keeping the props type annotation as the existing
NotificationBadgeCase type (e.g., function NotificationBadgeCaseRenderer(props:
NotificationBadgeCase) { ... }) so the type/value namespaces remain clear and
other references (imports/exports, story references) are updated to the new
component name.

35-41: 폰트 배경의 text / large 케이스를 스토리에 추가 권장

이 PR의 목적인 size=large의 최소 너비/종횡비 보장을 검증하기 위해, 현재 누락된 attach: "text"size: "large" 조합을 스토리 케이스에 추가하는 것이 좋습니다. 이 조합은 레시피 레벨에서 완벽하게 지원되며(compoundVariants에 포함), CSS 스타일도 정의되어 있습니다. 폰트 배경에서의 배지 크기/위치 보장을 확인하기 위해 회귀 검증 범위를 넓히길 권장합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/stories/NotificationBadge.stories.tsx` around lines 35 - 41, Add a new
Storybook story in NotificationBadge.stories.tsx to cover the missing
combination attach: "text" with size: "large" so the visual regression verifies
min-width/aspect-ratio for large text-attach badges; update the stories array
(or add a new exported story function) that renders the NotificationBadge
component with props attach="text" and size="large" (and any representative
content/icon) to match the compoundVariant behavior already defined in the
recipe/CSS.
packages/rootage/components/notification-badge.yaml (1)

13-27: 세 속성에 동일한 설명이 중복되어 있습니다.

minWidth, minHeight, minAspectRatio 세 속성 모두 같은 문장을 그대로 반복하고 있어, 문구를 고칠 때 세 곳을 모두 수정해야 하는 유지보수 부담이 생깁니다. 각 속성의 역할(최소 너비/최소 높이/최소 종횡비)을 구분하여 간결하게 기술하거나, 공통 의도는 한 속성(예: minAspectRatio)에만 자세히 남기고 나머지는 짧게 참조하는 방식이 더 깔끔합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/rootage/components/notification-badge.yaml` around lines 13 - 27,
The three properties minWidth, minHeight, and minAspectRatio repeat the same
long description; refactor descriptions to avoid duplication by giving each a
concise, specific sentence (minWidth: describe minimum width guarantee;
minHeight: describe minimum height guarantee; minAspectRatio: describe minimum
aspect-ratio constraint and keep the full shared rationale here) or keep the
full shared rationale only on minAspectRatio and make minWidth/minHeight
reference it briefly (e.g., "See minAspectRatio for shared sizing rationale").
Update the YAML descriptions for symbols minWidth, minHeight, and minAspectRatio
accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/stories/NotificationBadge.stories.tsx`:
- Around line 28-67: The type and the React component both use the identifier
NotificationBadgeCase which harms readability; rename the component (for example
to NotificationBadgeCaseRenderer or BadgeCase) and update its declaration and
all usages accordingly, keeping the props type annotation as the existing
NotificationBadgeCase type (e.g., function NotificationBadgeCaseRenderer(props:
NotificationBadgeCase) { ... }) so the type/value namespaces remain clear and
other references (imports/exports, story references) are updated to the new
component name.
- Around line 35-41: Add a new Storybook story in NotificationBadge.stories.tsx
to cover the missing combination attach: "text" with size: "large" so the visual
regression verifies min-width/aspect-ratio for large text-attach badges; update
the stories array (or add a new exported story function) that renders the
NotificationBadge component with props attach="text" and size="large" (and any
representative content/icon) to match the compoundVariant behavior already
defined in the recipe/CSS.

In `@packages/rootage/components/notification-badge.yaml`:
- Around line 13-27: The three properties minWidth, minHeight, and
minAspectRatio repeat the same long description; refactor descriptions to avoid
duplication by giving each a concise, specific sentence (minWidth: describe
minimum width guarantee; minHeight: describe minimum height guarantee;
minAspectRatio: describe minimum aspect-ratio constraint and keep the full
shared rationale here) or keep the full shared rationale only on minAspectRatio
and make minWidth/minHeight reference it briefly (e.g., "See minAspectRatio for
shared sizing rationale"). Update the YAML descriptions for symbols minWidth,
minHeight, and minAspectRatio accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8d0638f1-4948-49f7-8c93-74854619fa29

📥 Commits

Reviewing files that changed from the base of the PR and between 96f2038 and 0453038.

⛔ Files ignored due to path filters (11)
  • docs/public/rootage/components/notification-badge.json is excluded by !**/public/**/*
  • packages/css/all.css is excluded by !packages/css/**/*
  • packages/css/all.layered.css is excluded by !packages/css/**/*
  • packages/css/all.layered.min.css is excluded by !packages/css/**/*
  • packages/css/all.min.css is excluded by !packages/css/**/*
  • packages/css/recipes/notification-badge.css is excluded by !packages/css/**/*
  • packages/css/recipes/notification-badge.layered.css is excluded by !packages/css/**/*
  • packages/css/vars/component/notification-badge.d.ts is excluded by !packages/css/**/*
  • packages/css/vars/component/notification-badge.mjs is excluded by !packages/css/**/*
  • packages/qvism-preset/src/vars/component/notification-badge.d.ts is excluded by !packages/qvism-preset/src/vars/**/*
  • packages/qvism-preset/src/vars/component/notification-badge.mjs is excluded by !packages/qvism-preset/src/vars/**/*
📒 Files selected for processing (4)
  • .changeset/shiny-suits-pick.md
  • docs/stories/NotificationBadge.stories.tsx
  • packages/qvism-preset/src/recipes/notification-badge.ts
  • packages/rootage/components/notification-badge.yaml

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Alpha Preview (Docs)

@te6-in te6-in requested review from SeieunYoo and junghyeonsu April 22, 2026 09:46
@te6-in te6-in merged commit 79c7aa3 into dev Apr 23, 2026
12 checks passed
@te6-in te6-in deleted the feat/notification-badge-min-aspect-ratio branch April 23, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant