[feat] 동적 버전 정보 표시 구현#211
Conversation
Walkthrough네이티브 앱 버전을 동적으로 표시하기 위해 global 타입 선언과 UI 구현을 추가했습니다. Possibly related issues
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/pages/User/MyPage/index.tsx (1)
68-68: 타이포그래피는 semantic token 클래스로 통일을 권장합니다.
text-[13px]대신 프로젝트 토큰(text-cap*,text-body*등) 사용으로 일관성을 맞추는 게 좋습니다.As per coding guidelines
**/*.{ts,tsx}: Use typography tokens (text-h1throughtext-h5,text-sub1throughtext-sub4,text-body1throughtext-body3,text-cap1throughtext-cap2) fromsrc/styles/theme.css.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pages/User/MyPage/index.tsx` at line 68, Replace the hardcoded utility class in the version badge div with a semantic typography token: locate the JSX div rendering v{window.APP_VERSION ?? '-'} (className currently "text-[13px] leading-4 text-indigo-200") and swap "text-[13px]" for the appropriate project token (for example "text-cap2" or "text-body3" depending on desired size) while keeping "leading-4 text-indigo-200"; ensure the resulting className uses the semantic token (e.g., "text-cap2 leading-4 text-indigo-200") to conform to the theme.css typography tokens.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/pages/User/MyPage/index.tsx`:
- Line 68: The version display renders "v-" when APP_VERSION is missing; update
the JSX in the MyPage component where the div contains the expression using
window.APP_VERSION so that the "v" prefix is only added when a valid version
exists (e.g., conditionally render `v{window.APP_VERSION}` if window.APP_VERSION
is truthy, otherwise render "-"), ensuring you edit the specific JSX expression
that currently reads window.APP_VERSION ?? '-' to avoid showing "v-".
---
Nitpick comments:
In `@src/pages/User/MyPage/index.tsx`:
- Line 68: Replace the hardcoded utility class in the version badge div with a
semantic typography token: locate the JSX div rendering v{window.APP_VERSION ??
'-'} (className currently "text-[13px] leading-4 text-indigo-200") and swap
"text-[13px]" for the appropriate project token (for example "text-cap2" or
"text-body3" depending on desired size) while keeping "leading-4
text-indigo-200"; ensure the resulting className uses the semantic token (e.g.,
"text-cap2 leading-4 text-indigo-200") to conform to the theme.css typography
tokens.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 93f3fc6e-1b63-4f6b-8a90-52746e36060c
📒 Files selected for processing (2)
src/global.d.tssrc/pages/User/MyPage/index.tsx
| <div className="text-sm leading-4 font-semibold">버전관리</div> | ||
| </div> | ||
| <div className="text-[13px] leading-4 text-indigo-200">v1.0.3</div> | ||
| <div className="text-[13px] leading-4 text-indigo-200">v{window.APP_VERSION ?? '-'}</div> |
There was a problem hiding this comment.
버전 fallback 표시가 v-로 잘못 노출됩니다.
Line 68에서 v{window.APP_VERSION ?? '-'}는 버전이 없을 때 v-를 렌더링합니다. 버전이 있을 때만 v prefix를 붙이세요.
수정 예시
- <div className="text-[13px] leading-4 text-indigo-200">v{window.APP_VERSION ?? '-'}</div>
+ <div className="text-[13px] leading-4 text-indigo-200">
+ {window.APP_VERSION ? `v${window.APP_VERSION}` : '-'}
+ </div>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <div className="text-[13px] leading-4 text-indigo-200">v{window.APP_VERSION ?? '-'}</div> | |
| <div className="text-[13px] leading-4 text-indigo-200"> | |
| {window.APP_VERSION ? `v${window.APP_VERSION}` : '-'} | |
| </div> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/pages/User/MyPage/index.tsx` at line 68, The version display renders "v-"
when APP_VERSION is missing; update the JSX in the MyPage component where the
div contains the expression using window.APP_VERSION so that the "v" prefix is
only added when a valid version exists (e.g., conditionally render
`v{window.APP_VERSION}` if window.APP_VERSION is truthy, otherwise render "-"),
ensuring you edit the specific JSX expression that currently reads
window.APP_VERSION ?? '-' to avoid showing "v-".
Summary by CodeRabbit
릴리스 노트