[feat/MAT-921] env label#364
Merged
Merged
Conversation
Introduce appVariant util to detect dev/qa/release from the bundle identifier. EnvBadge shows a variant ribbon and the app version/update id, is exported from the components index and mounted in App.tsx.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
QA/Dev 빌드에서 한눈에 환경을 식별할 수 있도록 native 앱에 환경 인디케이터를 추가. 상단 가로 텍스트(버전 + update id) + 우측 상단 대각선 ribbon(env 라벨) 두 가지 시각 요소로 구성. release 빌드에서는 렌더되지 않음.
Linear
Changes
apps/native/src/components/common/EnvBadge.tsx(신규): 상단 버전 텍스트 + 우상단 대각선 ribbon 두 element. dev=primary-500, qa=secondary-500 색상, release는null반환. View 기반 rotate 45deg + math 계산(Math.SQRT2)으로 corner triangle 렌더,overflow: 'hidden'으로 클리핑.pointerEvents: 'none'으로 모든 터치 통과.apps/native/src/utils/appVariant.ts(신규):Constants.expoConfig?.ios?.bundleIdentifier/android.packagesuffix(.dev/.qa)로 dev/qa/release 판별.app.config.ts무수정이라 fingerprint 영향 없음 → EAS Update(OTA) 호환.apps/native/App.tsx: NavigationContainer 안 최하단에<EnvBadge />마운트.apps/native/src/components/common/index.ts,apps/native/src/utils/index.ts: re-export 추가.Testing
pnpm exec eslint(변경 파일): 0 errors / 0 warnings (App.tsx 기존 5건 경고는 본 변경과 무관).npx tsc --noEmit: 0 errors.Risk / Impact
appVariant가 모듈 로드 시점에 한 번 평가되어 캐시됨 —Constants.expoConfig가 늦게 resolve되는 엣지 케이스에서 release로 굳을 가능성. dev/qa 빌드 실행 시 ribbon 표시 여부 검증 필요.color미지정 —Pretendard글로벌 기본(black)으로 렌더되므로 어두운 배경 화면에서 가독성 체크.react-native-toast-message의 elevation이 상단 ribbon 영역과 겹칠 경우 ribbon이 가려질 가능성. 상단 토스트 케이스에서 확인.app.config.ts무수정 → native fingerprint 동일 → 기존 dev/qa 빌드에 EAS Update 로 바로 배포 가능. release 채널 영향 없음.Screenshots / Video
(추후 첨부)