Skip to content

feat(lynx): add app bar component#1641

Merged
junghyeonsu merged 15 commits into
devfrom
codex/lynx-app-bar
Jun 9, 2026
Merged

feat(lynx): add app bar component#1641
junghyeonsu merged 15 commits into
devfrom
codex/lynx-app-bar

Conversation

@junghyeonsu

@junghyeonsu junghyeonsu commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Lynx 전용 AppBar compound component와 qvism recipe를 추가합니다.
  • SystemInfo.platform 기반 기본 theme 결정과 명시적 theme override를 지원합니다.
  • Lynx docs, registry snippet, lynx-spa 예제 페이지, changeset을 함께 추가합니다.

Test Plan

  • bun generate:all
  • bun test:all
  • bun packages:build
  • bun docs:test
  • bun --filter lynx-spa build
  • git diff --check

Summary by CodeRabbit

  • New Features

    • AppBar 컴포넌트 세트 추가(루트/왼쪽/메인/오른쪽/아이콘 버튼/뒤로/닫기 등) 및 테마·톤·레이아웃 변형 지원
  • Documentation

    • AppBar 사용 가이드, 예제, 플랫폼 간 차이 문서 추가
  • Examples

    • 데모 앱에 AppBar 페이지 및 탐색 항목 추가
  • Style

    • AppBar 관련 CSS/레시피 및 타입 선언 추가
  • Tests

    • 테마 선택 및 레이아웃 동작 검증 테스트 추가
  • Chores

    • 관련 패키지 버전 마이너 업데이트 지정

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

이 PR은 Lynx AppBar 컴포넌트를 전체 스택으로 추가합니다. 레시피 정의, CSS 산출물, React 구현, 테스트, 문서, 예제 통합과 플랫폼 기반 theme 기본 선택 및 centered title 레이아웃 계산을 포함합니다.

Changes

Lynx AppBar 컴포넌트 추가

Layer / File(s) Summary
릴리스 노트
.changeset/bright-lantern-glow.md
@seed-design/lynx-react@seed-design/lynx-css의 minor 범위 릴리스 표기와 AppBar 추가 내용을 기록합니다.
문서 레지스트리 및 wrapper
docs/registry/lynx/registry-ui.ts, docs/registry/lynx/ui/app-bar.tsx, docs/content/lynx/components/app-bar.mdx
registry에 app-bar 항목을 등록하고 문서용 wrapper와 MDX 문서를 추가하여 사용법, theme 규칙, 플랫폼 차이를 문서화합니다.
Panda 레시피 정의와 preset 등록
packages/lynx-qvism-preset/src/recipes/app-bar.ts, packages/lynx-qvism-preset/src/recipes.ts
appBarappBarMain slot recipe를 정의하고 preset의 recipes에 등록합니다.
레시피 JS/타입 산출물
packages/lynx-css/recipes/app-bar.mjs, packages/lynx-css/recipes/app-bar.d.ts, packages/lynx-css/recipes/app-bar-main.mjs, packages/lynx-css/recipes/app-bar-main.d.ts
레시피별 className 생성 로직, variant 맵/키, splitVariantProps 헬퍼 타입 및 연결을 추가합니다.
CSS 레시피와 통합 스타일
packages/lynx-css/recipes/app-bar.css, packages/lynx-css/recipes/app-bar-main.css, packages/lynx-css/all.css
app-bar 및 app-bar-main의 스타일 규칙(루트/배경/좌우/아이콘/메인 레이아웃), theme(cupertino/android)·tone(layer/transparent) 변형을 정의하고 all.css에 통합합니다.
React AppBar 핵심 컴포넌트
packages/lynx-react/src/components/AppBar/AppBar.tsx
AppBarRoot(기본 theme 결정, safe-area top, centered-title padding), AppBarLeft/Right(layoutchange 처리), AppBarMain(타이틀/서브타이틀 렌더링 분기), Title/Subtitle/IconButton/Slot을 구현합니다.
React 테스트와 공개 API
packages/lynx-react/src/components/AppBar/AppBar.test.tsx, packages/lynx-react/src/components/AppBar/AppBar.namespace.ts, packages/lynx-react/src/components/AppBar/index.ts, packages/lynx-react/src/components/index.ts
플랫폼별 theme 선택, 슬롯 렌더링, layoutchange 반영을 테스트하고 AppBar 컴포넌트/타입을 패키지 public surface로 노출합니다.
예제 wrapper, AppBarPage, 라우팅 통합
examples/lynx-spa/src/seed-design/ui/app-bar.tsx, examples/lynx-spa/src/pages/AppBarPage.tsx, examples/lynx-spa/src/pages/HomePage.tsx, examples/lynx-spa/src/App.tsx
예제용 AppBar wrapper와 VariantCatalog 기반 AppBarPage를 추가하고 HomePage와 App 라우팅에 app-bar 경로를 포함합니다.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 상단 바가 왔네, 살짝 번쩍✨
레시피로 짠 스타일 줄기 따라
React가 안전영역을 조심히 감싸고
플랫폼마다 테마가 부드럽게 깔려
예제와 테스트가 함께 폴짝 춤춘다 🥕

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 AppBar 컴포넌트 추가라는 주요 변경사항을 명확하게 요약하고 있습니다.
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 codex/lynx-app-bar

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.

@changeset-bot

changeset-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cb7f392

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

This PR includes changesets to release 2 packages
Name Type
@seed-design/lynx-react Minor
@seed-design/lynx-css Minor

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

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Alpha Preview (Stackflow SPA)

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Alpha Preview (Storybook)

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Alpha Preview (Docs)

@junghyeonsu junghyeonsu self-assigned this Jun 5, 2026
@junghyeonsu junghyeonsu marked this pull request as ready for review June 5, 2026 09:04

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/lynx-css/recipes/app-bar.d.ts (1)

6-9: 💤 Low value

JSDoc 주석 들여쓰기 불일치

Line 6의 JSDoc 주석 시작 부분(/**)이 다른 JSDoc 주석(line 2, 10, 14)과 달리 앞쪽 공백이 없어 일관성이 떨어집니다.

이 파일이 자동 생성된 파일이라면 생성기의 출력 문제일 수 있습니다. 수동으로 수정하는 대신 생성기 수준에서 일관성을 개선하는 것을 고려하세요.

일관된 형식 예시
   theme: "cupertino" | "android";
-/**
+  /**
   * `@default` "slideFromRightIOS"
   */
   transitionStyle: "slideFromRightIOS" | "fadeFromBottomAndroid" | "fadeIn";
🤖 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/lynx-css/recipes/app-bar.d.ts` around lines 6 - 9, The JSDoc opening
for the transitionStyle property is missing the leading space compared to other
JSDoc blocks, causing inconsistent indentation; update the comment start so it
matches the other blocks (add the same leading whitespace before `/**` for the
JSDoc above the `transitionStyle` declaration) or, if this file is generated,
fix the generation template that emits the JSDoc for `transitionStyle` to
produce consistent leading whitespace across all comments.
🤖 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 `@packages/lynx-css/recipes/app-bar.d.ts`:
- Around line 6-9: The JSDoc opening for the transitionStyle property is missing
the leading space compared to other JSDoc blocks, causing inconsistent
indentation; update the comment start so it matches the other blocks (add the
same leading whitespace before `/**` for the JSDoc above the `transitionStyle`
declaration) or, if this file is generated, fix the generation template that
emits the JSDoc for `transitionStyle` to produce consistent leading whitespace
across all comments.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3d1c838f-7d28-4981-8806-90ebbf0d1b81

📥 Commits

Reviewing files that changed from the base of the PR and between fb7416d and f01e275.

⛔ Files ignored due to path filters (3)
  • docs/public/__docs__/index.json is excluded by !**/public/**/*
  • docs/public/__registry__/lynx/ui/app-bar.json is excluded by !**/__registry__/**/*, !**/public/**/*
  • docs/public/__registry__/lynx/ui/index.json is excluded by !**/__registry__/**/*, !**/public/**/*
📒 Files selected for processing (23)
  • .changeset/bright-lantern-glow.md
  • docs/content/lynx/components/app-bar.mdx
  • docs/registry/lynx/registry-ui.ts
  • docs/registry/lynx/ui/app-bar.tsx
  • examples/lynx-spa/src/App.tsx
  • examples/lynx-spa/src/pages/AppBarPage.tsx
  • examples/lynx-spa/src/pages/HomePage.tsx
  • examples/lynx-spa/src/seed-design/ui/app-bar.tsx
  • packages/lynx-css/all.css
  • packages/lynx-css/all.min.css
  • packages/lynx-css/recipes/app-bar-main.css
  • packages/lynx-css/recipes/app-bar-main.d.ts
  • packages/lynx-css/recipes/app-bar-main.mjs
  • packages/lynx-css/recipes/app-bar.css
  • packages/lynx-css/recipes/app-bar.d.ts
  • packages/lynx-css/recipes/app-bar.mjs
  • packages/lynx-qvism-preset/src/recipes.ts
  • packages/lynx-qvism-preset/src/recipes/app-bar.ts
  • packages/lynx-react/src/components/AppBar/AppBar.namespace.ts
  • packages/lynx-react/src/components/AppBar/AppBar.test.tsx
  • packages/lynx-react/src/components/AppBar/AppBar.tsx
  • packages/lynx-react/src/components/AppBar/index.ts
  • packages/lynx-react/src/components/index.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/lynx-qvism-preset/src/recipes/app-bar.test.ts (1)

7-18: ⚡ Quick win

테스트 기대값의 매직 넘버를 토큰 참조로 바꿔 주세요.

"44px", "56px" 하드코딩은 디자인 토큰 변경 시 의도와 무관한 실패를 유발합니다. 레시피가 쓰는 동일 토큰을 기대값으로 참조하면 계약 테스트가 덜 취약합니다.

♻️ 제안 diff
 import { describe, expect, it } from "vitest";
+import { topNavigation as vars } from "../vars/component";

 import { appBar } from "./app-bar";

 describe("appBar recipe", () => {
   it("aligns side slots to the navigation content height for each theme", () => {
     expect(appBar.variants.theme.cupertino.left).toMatchObject({
-      height: "44px",
+      height: vars.themeIos.enabled.root.height,
     });
     expect(appBar.variants.theme.cupertino.right).toMatchObject({
-      height: "44px",
+      height: vars.themeIos.enabled.root.height,
     });
     expect(appBar.variants.theme.android.left).toMatchObject({
-      height: "56px",
+      height: vars.themeAndroid.enabled.root.height,
     });
     expect(appBar.variants.theme.android.right).toMatchObject({
-      height: "56px",
+      height: vars.themeAndroid.enabled.root.height,
     });
   });
 });
🤖 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/lynx-qvism-preset/src/recipes/app-bar.test.ts` around lines 7 - 18,
The test uses hardcoded magic pixel values ("44px", "56px") for appBar heights
which makes the contract brittle; change the expectations to reference the same
design token exports the recipe uses instead of literals: import the preset's
token object (the token export used by the recipe) and replace the literals in
assertions against appBar.variants.theme.cupertino.left/right and
appBar.variants.theme.android.left/right with the corresponding token properties
(e.g., the appBar height token for cupertino and android) so the test reads the
canonical token values rather than hardcoded strings.
🤖 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 `@packages/lynx-qvism-preset/src/recipes/app-bar.test.ts`:
- Around line 7-18: The test uses hardcoded magic pixel values ("44px", "56px")
for appBar heights which makes the contract brittle; change the expectations to
reference the same design token exports the recipe uses instead of literals:
import the preset's token object (the token export used by the recipe) and
replace the literals in assertions against
appBar.variants.theme.cupertino.left/right and
appBar.variants.theme.android.left/right with the corresponding token properties
(e.g., the appBar height token for cupertino and android) so the test reads the
canonical token values rather than hardcoded strings.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f0f4bf89-e1ff-4b21-b1eb-285fee3cd327

📥 Commits

Reviewing files that changed from the base of the PR and between f01e275 and 374ada2.

📒 Files selected for processing (14)
  • docs/content/lynx/components/app-bar.mdx
  • examples/lynx-spa/src/App.tsx
  • examples/lynx-spa/src/pages/AppBarPage.tsx
  • packages/lynx-css/all.css
  • packages/lynx-css/all.min.css
  • packages/lynx-css/recipes/app-bar-main.css
  • packages/lynx-css/recipes/app-bar.css
  • packages/lynx-css/recipes/app-bar.d.ts
  • packages/lynx-css/recipes/app-bar.mjs
  • packages/lynx-qvism-preset/src/recipes/app-bar.test.ts
  • packages/lynx-qvism-preset/src/recipes/app-bar.ts
  • packages/lynx-react/src/components/AppBar/AppBar.style.ts
  • packages/lynx-react/src/components/AppBar/AppBar.test.tsx
  • packages/lynx-react/src/components/AppBar/AppBar.tsx
💤 Files with no reviewable changes (1)
  • packages/lynx-css/recipes/app-bar.d.ts
✅ Files skipped from review due to trivial changes (1)
  • docs/content/lynx/components/app-bar.mdx
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/lynx-css/recipes/app-bar.css
  • packages/lynx-css/recipes/app-bar-main.css
  • packages/lynx-react/src/components/AppBar/AppBar.test.tsx
  • packages/lynx-react/src/components/AppBar/AppBar.tsx

@junghyeonsu junghyeonsu merged commit c8d4c26 into dev Jun 9, 2026
5 checks passed
@junghyeonsu junghyeonsu deleted the codex/lynx-app-bar branch June 9, 2026 13:35
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