feat(lynx): add app bar component#1641
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthrough이 PR은 Lynx AppBar 컴포넌트를 전체 스택으로 추가합니다. 레시피 정의, CSS 산출물, React 구현, 테스트, 문서, 예제 통합과 플랫폼 기반 theme 기본 선택 및 centered title 레이아웃 계산을 포함합니다. ChangesLynx AppBar 컴포넌트 추가
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 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 |
🦋 Changeset detectedLatest commit: cb7f392 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Alpha Preview (Stackflow SPA)
|
Alpha Preview (Storybook)
|
Alpha Preview (Docs)
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/lynx-css/recipes/app-bar.d.ts (1)
6-9: 💤 Low valueJSDoc 주석 들여쓰기 불일치
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
⛔ Files ignored due to path filters (3)
docs/public/__docs__/index.jsonis excluded by!**/public/**/*docs/public/__registry__/lynx/ui/app-bar.jsonis excluded by!**/__registry__/**/*,!**/public/**/*docs/public/__registry__/lynx/ui/index.jsonis excluded by!**/__registry__/**/*,!**/public/**/*
📒 Files selected for processing (23)
.changeset/bright-lantern-glow.mddocs/content/lynx/components/app-bar.mdxdocs/registry/lynx/registry-ui.tsdocs/registry/lynx/ui/app-bar.tsxexamples/lynx-spa/src/App.tsxexamples/lynx-spa/src/pages/AppBarPage.tsxexamples/lynx-spa/src/pages/HomePage.tsxexamples/lynx-spa/src/seed-design/ui/app-bar.tsxpackages/lynx-css/all.csspackages/lynx-css/all.min.csspackages/lynx-css/recipes/app-bar-main.csspackages/lynx-css/recipes/app-bar-main.d.tspackages/lynx-css/recipes/app-bar-main.mjspackages/lynx-css/recipes/app-bar.csspackages/lynx-css/recipes/app-bar.d.tspackages/lynx-css/recipes/app-bar.mjspackages/lynx-qvism-preset/src/recipes.tspackages/lynx-qvism-preset/src/recipes/app-bar.tspackages/lynx-react/src/components/AppBar/AppBar.namespace.tspackages/lynx-react/src/components/AppBar/AppBar.test.tsxpackages/lynx-react/src/components/AppBar/AppBar.tsxpackages/lynx-react/src/components/AppBar/index.tspackages/lynx-react/src/components/index.ts
There was a problem hiding this comment.
🧹 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
📒 Files selected for processing (14)
docs/content/lynx/components/app-bar.mdxexamples/lynx-spa/src/App.tsxexamples/lynx-spa/src/pages/AppBarPage.tsxpackages/lynx-css/all.csspackages/lynx-css/all.min.csspackages/lynx-css/recipes/app-bar-main.csspackages/lynx-css/recipes/app-bar.csspackages/lynx-css/recipes/app-bar.d.tspackages/lynx-css/recipes/app-bar.mjspackages/lynx-qvism-preset/src/recipes/app-bar.test.tspackages/lynx-qvism-preset/src/recipes/app-bar.tspackages/lynx-react/src/components/AppBar/AppBar.style.tspackages/lynx-react/src/components/AppBar/AppBar.test.tsxpackages/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
Summary
SystemInfo.platform기반 기본 theme 결정과 명시적themeoverride를 지원합니다.Test Plan
bun generate:allbun test:allbun packages:buildbun docs:testbun --filter lynx-spa buildgit diff --checkSummary by CodeRabbit
New Features
Documentation
Examples
Style
Tests
Chores