From 9f80fdc630438e85404d237838b2d26efdd950a8 Mon Sep 17 00:00:00 2001 From: sungheeyoon Date: Thu, 5 Nov 2026 16:08:24 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(ui):=20=EC=84=A4=EC=A0=95=20=ED=86=B1?= =?UTF-8?q?=EB=8B=88=20=EC=95=84=EC=9D=B4=EC=BD=98=EC=9D=84=20Lucide=20?= =?UTF-8?q?=ED=86=B1=EB=8B=88=EB=A1=9C=20=EB=B0=94=EA=BE=B8=EA=B3=A0=20?= =?UTF-8?q?=ED=95=98=EB=8B=A8=20=ED=83=AD=EC=9D=98=20=EB=B6=88=20=EC=BC=A0?= =?UTF-8?q?=20=ED=91=9C=EC=8B=9C=EB=A5=BC=20Material=203=20=EC=95=8C?= =?UTF-8?q?=EC=95=BD(64=C3=9732)=EC=9C=BC=EB=A1=9C=20=EB=A7=9E=EC=B6=98?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 톱니: 이가 뾰족하고 오른쪽 아래가 잘려 보이던 경로를 Lucide `settings`(lucide-static 0.460.0, ISC)의 경로로 바꿨다. 웹 `app/ui/icons.tsx` 와 앱 `mobile/src/ui/icons.tsx` 가 같은 값이다 — 옛 웹 경로는 호 하나의 방향이 앱과 달랐다. 선 1.8 을 넣어도 x 2.1–21.9 · y 1.1–22.9 로 24 격자 안이다. - 하단 탭: 앱 · 웹의 불 켠 알약을 56×32 에서 Material 3 내비게이션 막대의 활성 표시 64×32 로 넓혔다. 색 · 모서리 토큰은 그대로다. Co-Authored-By: Claude Opus 5.5 --- app/site-header.tsx | 4 ++-- app/ui/icons.tsx | 3 ++- mobile/src/app/me/_layout.tsx | 3 ++- mobile/src/ui/icons.tsx | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/site-header.tsx b/app/site-header.tsx index 1ab9c366a..f8c2c878b 100644 --- a/app/site-header.tsx +++ b/app/site-header.tsx @@ -458,13 +458,13 @@ function Dock({ > {tab.label} {(badges[tab.href] ?? 0) > 0 && ( - + )} diff --git a/app/ui/icons.tsx b/app/ui/icons.tsx index 31f0b85cd..76faeaf6d 100644 --- a/app/ui/icons.tsx +++ b/app/ui/icons.tsx @@ -65,8 +65,9 @@ const PATHS: Record = { ), gear: ( <> + {/* 톱니는 Lucide `settings`(lucide-static 0.460.0, ISC — https://lucide.dev/license)의 경로 그대로다. 옛 그림은 이가 뾰족하고 잘려 보였다(2026-11-05) */} + - ), arrow: , diff --git a/mobile/src/app/me/_layout.tsx b/mobile/src/app/me/_layout.tsx index 907f681c4..0e108cb13 100644 --- a/mobile/src/app/me/_layout.tsx +++ b/mobile/src/app/me/_layout.tsx @@ -168,7 +168,8 @@ const styles = StyleSheet.create({ body: { flex: 1 }, dock: { flexDirection: 'row', paddingHorizontal: 6, paddingTop: 6, borderTopWidth: 1, borderTopColor: COLOR.border, backgroundColor: COLOR.surface }, tab: { flex: 1, minHeight: 56, alignItems: 'center', justifyContent: 'center', gap: 2 }, - tabMark: { width: 56, height: 32, alignItems: 'center', justifyContent: 'center', borderRadius: RADIUS.pill }, + /** 불 켠 탭의 표시는 Material 3 내비게이션 막대의 활성 표시(64×32dp 알약, 아이콘 뒤 · 이름은 아래)다 — https://m3.material.io/components/navigation-bar/specs. 웹 하단 독(`app/site-header.tsx`)과 같은 크기다 */ + tabMark: { width: 64, height: 32, alignItems: 'center', justifyContent: 'center', borderRadius: RADIUS.pill }, tabMarkOn: { backgroundColor: ELEMENT_TONE.木.soft }, tabLabel: { fontFamily: FONT.bold, fontSize: TYPE.fine, color: COLOR.secondary }, tabLabelOn: { color: COLOR.foreground }, diff --git a/mobile/src/ui/icons.tsx b/mobile/src/ui/icons.tsx index 67337a4bb..c9f3754f7 100644 --- a/mobile/src/ui/icons.tsx +++ b/mobile/src/ui/icons.tsx @@ -23,8 +23,9 @@ const shapes = (color: string): Record => ({ ), gear: ( <> + {/* 톱니는 Lucide `settings`(lucide-static 0.460.0, ISC — https://lucide.dev/license)의 경로 그대로다. 옛 그림은 이가 뾰족하고 잘려 보였다(2026-11-05) */} + - ), reading: , From 0a91fc30b42788e86e21419ddfae4fc011c4d568 Mon Sep 17 00:00:00 2001 From: sungheeyoon Date: Thu, 5 Nov 2026 16:17:59 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix(mobile):=20=EC=95=88=EB=93=9C=EB=A1=9C?= =?UTF-8?q?=EC=9D=B4=EB=93=9C=EC=97=90=EC=84=9C=20=EB=B0=94=ED=83=95?= =?UTF-8?q?=EC=9D=B4=20=EB=82=98=EC=A4=91=EC=97=90=20=EC=84=9C=EB=8A=94=20?= =?UTF-8?q?=EB=91=A5=EA=B7=BC=20=EC=9E=90=EB=A6=AC=EA=B0=80=20=EB=84=A4?= =?UTF-8?q?=EB=AA=A8=EB=A1=9C=20=EC=84=9C=EC=A7=80=20=EC=95=8A=EA=B2=8C=20?= =?UTF-8?q?KEEP=5FVIEW=20=EB=A5=BC=20=ED=8E=BC=EC=B9=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 운영 APK(API 37 에뮬레이터)의 하단 탭 불 켠 표시가 모서리 없는 네모였다. 원인은 RN 0.88.1 의 안드로이드 view flattening — 바탕 없는 뷰를 펼쳐 없앴다가 바탕이 서면 새로 지으며 바뀐 값만 넘겨 borderRadius 를 잃는다 (react/react-native#52415, 고치는 PR #56588 은 머지 전 · 깃발 enableAccumulatedUpdatesInRawPropsAndroid 는 꺼짐). 999 의 문제가 아니라 모든 모서리 값에 걸린다. - mobile/src/ui/keep-view.ts: KEEP_VIEW = { collapsable: false } — 처음부터 네이티브 뷰라 모서리를 첫 값으로 받는다 - 펼친 자리 여섯: 하단 탭 표시 · 채팅 목록 줄(누를 때) · 만세력 보기 탭 · 신고할 메시지 고르기 · 사진 위 더보기 · 설정의 고르기 칸 - scripts/mobile-surfaces.test.ts: 모서리만 있는 스타일에 조건으로 바탕 · 테두리를 붙이면서 KEEP_VIEW 가 없으면 붉다 - 탭 표시 폭은 56 으로 되돌린다 — 64 로 넓힌 까닭(네모로 보임)이 틀렸다 Co-Authored-By: Claude Opus 5.5 --- app/site-header.tsx | 4 +-- mobile/src/app/me/_layout.tsx | 6 ++-- mobile/src/app/me/chat/index.tsx | 3 +- mobile/src/chart/parts.tsx | 3 +- mobile/src/chat/dialogs.tsx | 3 +- mobile/src/matching/people.tsx | 3 +- mobile/src/settings/discovery-rows.tsx | 3 +- mobile/src/ui/keep-view.ts | 12 +++++++ scripts/mobile-surfaces.test.ts | 48 ++++++++++++++++++++++++++ 9 files changed, 75 insertions(+), 10 deletions(-) create mode 100644 mobile/src/ui/keep-view.ts diff --git a/app/site-header.tsx b/app/site-header.tsx index f8c2c878b..1ab9c366a 100644 --- a/app/site-header.tsx +++ b/app/site-header.tsx @@ -458,13 +458,13 @@ function Dock({ > {tab.label} {(badges[tab.href] ?? 0) > 0 && ( - + )} diff --git a/mobile/src/app/me/_layout.tsx b/mobile/src/app/me/_layout.tsx index 0e108cb13..a6af4f17e 100644 --- a/mobile/src/app/me/_layout.tsx +++ b/mobile/src/app/me/_layout.tsx @@ -20,6 +20,7 @@ import { Icon } from '@/ui/icons'; import { Logo } from '@/ui/logo'; import { SecondaryButton } from '@/ui/parts'; import { COLOR, ELEMENT_TONE, FONT, RADIUS, TYPE } from '@/ui/tokens'; +import { KEEP_VIEW } from '@/ui/keep-view'; /** 웹 머리글의 `MEMBER_TABS` 와 같은 넷 · 같은 글자다. 궁합의 첫 화면은 앱에서 `/me/compat` 다. 인연이 닫힌 동안은 홈 · 궁합 둘이다(ADR 0222) */ const TABS = [ @@ -136,7 +137,7 @@ export default function MeLayout() { onPress={() => goTab(tab.href)} style={styles.tab} > - + {tab.label} @@ -168,8 +169,7 @@ const styles = StyleSheet.create({ body: { flex: 1 }, dock: { flexDirection: 'row', paddingHorizontal: 6, paddingTop: 6, borderTopWidth: 1, borderTopColor: COLOR.border, backgroundColor: COLOR.surface }, tab: { flex: 1, minHeight: 56, alignItems: 'center', justifyContent: 'center', gap: 2 }, - /** 불 켠 탭의 표시는 Material 3 내비게이션 막대의 활성 표시(64×32dp 알약, 아이콘 뒤 · 이름은 아래)다 — https://m3.material.io/components/navigation-bar/specs. 웹 하단 독(`app/site-header.tsx`)과 같은 크기다 */ - tabMark: { width: 64, height: 32, alignItems: 'center', justifyContent: 'center', borderRadius: RADIUS.pill }, + tabMark: { width: 56, height: 32, alignItems: 'center', justifyContent: 'center', borderRadius: RADIUS.pill }, tabMarkOn: { backgroundColor: ELEMENT_TONE.木.soft }, tabLabel: { fontFamily: FONT.bold, fontSize: TYPE.fine, color: COLOR.secondary }, tabLabelOn: { color: COLOR.foreground }, diff --git a/mobile/src/app/me/chat/index.tsx b/mobile/src/app/me/chat/index.tsx index aca340ee9..03b195959 100644 --- a/mobile/src/app/me/chat/index.tsx +++ b/mobile/src/app/me/chat/index.tsx @@ -17,6 +17,7 @@ import { noteActivity, readRoomListScreen, type ChatRoom, type RoomListScreen } import { Icon } from '@/ui/icons'; import { LoadingMark } from '@/ui/loading'; import { COLOR, FONT, RADIUS, TYPE } from '@/ui/tokens'; +import { KEEP_VIEW } from '@/ui/keep-view'; /** 한 물결의 변경을 묶어 다시 읽는 간격 — 웹의 `REDRAW_AFTER_MS` 와 같다 */ const REREAD_AFTER_MS = 400; @@ -146,7 +147,7 @@ function RoomRow({ room }: { room: ChatRoom }) { accessibilityRole="link" accessibilityLabel={unread > 0 ? `${name} ${unread}건 안 읽음` : name} onPress={() => router.push(`/me/chat/${room.matchId}` as never)} - style={({ pressed }) => [styles.row, pressed && styles.pressed]} + {...KEEP_VIEW} style={({ pressed }) => [styles.row, pressed && styles.pressed]} > diff --git a/mobile/src/chart/parts.tsx b/mobile/src/chart/parts.tsx index 4501a0c0a..1d830edd7 100644 --- a/mobile/src/chart/parts.tsx +++ b/mobile/src/chart/parts.tsx @@ -6,6 +6,7 @@ import type { Rich as RichParts, RichPart } from '@saju-view/notes'; import { Card as CardFace } from '@/ui/surfaces'; import { COLOR, CONTROL, FONT, RADIUS, TYPE } from '@/ui/tokens'; +import { KEEP_VIEW } from '@/ui/keep-view'; /** 한자 — 부산단디명조에 없어 기기 서체다(웹의 `.glyph`) */ const GLYPH_FONT = Platform.select({ ios: 'System', android: 'sans-serif', default: 'system-ui' }); @@ -147,7 +148,7 @@ export function Tabs({ tabs, initial, label, small = false }: { tabs: readonly T accessibilityRole="tab" accessibilityState={{ selected }} onPress={() => setView(tab.key)} - style={[styles.tab, selected && styles.tabChosen]} + {...KEEP_VIEW} style={[styles.tab, selected && styles.tabChosen]} > {tab.label} diff --git a/mobile/src/chat/dialogs.tsx b/mobile/src/chat/dialogs.tsx index 494462843..1ba276b14 100644 --- a/mobile/src/chat/dialogs.tsx +++ b/mobile/src/chat/dialogs.tsx @@ -9,6 +9,7 @@ import { Icon } from '@/ui/icons'; import { ConfirmDialog, DialogText } from '@/ui/confirm-dialog'; import { DialogPanel } from '@/ui/surfaces'; import { COLOR, CONTROL, FONT, RADIUS, TYPE } from '@/ui/tokens'; +import { KEEP_VIEW } from '@/ui/keep-view'; import { blockUser, reportMessage, reportUser, type SaveAnswer } from './reads'; @@ -129,7 +130,7 @@ export function ReportDialog({ accessibilityRole="button" accessibilityState={{ selected: chosen }} onPress={() => setPicked(chosen ? null : message.id)} - style={[styles.pick, chosen && styles.picked]} + {...KEEP_VIEW} style={[styles.pick, chosen && styles.picked]} > diff --git a/mobile/src/matching/people.tsx b/mobile/src/matching/people.tsx index aba6c7a21..6d8c73f88 100644 --- a/mobile/src/matching/people.tsx +++ b/mobile/src/matching/people.tsx @@ -12,6 +12,7 @@ import { Photo } from '@/ui/photo'; import { ConfirmDialog, DialogText } from '@/ui/confirm-dialog'; import { DetailSheet } from '@/ui/sheet'; import { COLOR, ELEMENT_TONE, FONT, RADIUS, TYPE } from '@/ui/tokens'; +import { KEEP_VIEW } from '@/ui/keep-view'; import { Tile } from '@/ui/surfaces'; import { blockUser, reportUser } from './doors'; @@ -254,7 +255,7 @@ export function ReportBlock({ userId, nickname, onPhoto = false, onBlocked }: { accessibilityRole="button" accessibilityLabel="신고 · 차단" onPress={() => setMenu(true)} - style={[styles.more, onPhoto && styles.moreOnPhoto]} + {...KEEP_VIEW} style={[styles.more, onPhoto && styles.moreOnPhoto]} > diff --git a/mobile/src/settings/discovery-rows.tsx b/mobile/src/settings/discovery-rows.tsx index b93221e2e..08ff0f100 100644 --- a/mobile/src/settings/discovery-rows.tsx +++ b/mobile/src/settings/discovery-rows.tsx @@ -7,6 +7,7 @@ import { PREFER_GENDER_KO } from '@discovery/copy'; import { saveFailureOf, setParticipation } from '@/reading/chart-writes'; import { followRefusal } from '@/reading/panel'; import { COLOR, FONT, RADIUS, TYPE } from '@/ui/tokens'; +import { KEEP_VIEW } from '@/ui/keep-view'; import { FailureLine, SwitchRow, useDoneNote } from './parts'; import { savePreferGender } from './settings'; @@ -109,7 +110,7 @@ export function PreferenceRow({ current }: { current: PreferGender }) { {PREFER_GENDER_ORDER.map((value) => { const on = chosen === value; return ( - choose(value)} style={[styles.choice, on && styles.chosen]}> + choose(value)} {...KEEP_VIEW} style={[styles.choice, on && styles.chosen]}> {PREFER_GENDER_KO[value]} ); diff --git a/mobile/src/ui/keep-view.ts b/mobile/src/ui/keep-view.ts new file mode 100644 index 000000000..83894d086 --- /dev/null +++ b/mobile/src/ui/keep-view.ts @@ -0,0 +1,12 @@ +/** + * **모서리를 지키는 뷰** — 처음에 바탕이 없다가 고르거나 누르면 바탕이 서는 둥근 자리에 펼친다(``). + * + * 안드로이드(새 구조, RN 0.88.1)는 바탕 · 테두리가 없는 뷰를 펼쳐 없앤다(view flattening). 나중에 바탕이 서면 그 자리에 네이티브 뷰를 + * 새로 짓는데, 바뀐 값(`backgroundColor`)만 받고 `borderRadius` 는 못 받아 **둥근 표시가 네모로 선다** — 2026-11-05 운영 APK 의 하단 탭이 + * 그랬다. https://github.com/react/react-native/issues/52415 · 고치는 PR https://github.com/react/react-native/pull/56588 은 아직 + * 머지 전이고, 그 깃발(`enableAccumulatedUpdatesInRawPropsAndroid`)은 0.88.1 에서 꺼져 있다. + * `collapsable: false` 면 처음부터 네이티브 뷰라 모서리를 첫 값으로 받는다(`ViewShadowNode.cpp` 의 `formsStackingContext`). + * + * 그 자리를 빠뜨리면 `scripts/mobile-surfaces.test.ts` 가 붉다. 위 PR 이 들어간 판으로 올리면 이 파일과 그 시험을 함께 걷는다. + */ +export const KEEP_VIEW = { collapsable: false } as const; diff --git a/scripts/mobile-surfaces.test.ts b/scripts/mobile-surfaces.test.ts index 637cbdb6b..25c9a8082 100644 --- a/scripts/mobile-surfaces.test.ts +++ b/scripts/mobile-surfaces.test.ts @@ -67,3 +67,51 @@ describe('앱 화면의 면', () => { for (const fine of ['borderRadius: RADIUS.cell', 'borderRadius: RADIUS.pill']) expect(handMadeIn(fine), fine).toEqual([]); }); }); + +/** + * **바탕이 나중에 서는 둥근 자리는 `KEEP_VIEW` 를 펼친다**(`mobile/src/ui/keep-view.ts`). 안드로이드는 바탕 없는 뷰를 펼쳐 없앴다가 바탕이 + * 서면 새로 짓는데, 그때 `borderRadius` 를 잃어 둥근 표시가 네모로 선다(RN #52415 — 2026-11-05 운영 APK 의 하단 탭). 웹 번들 · 단위 시험은 + * 이것을 못 본다 — 글자로 읽는다. 한 줄로 쓴 스타일만 읽는다: 모서리만 있고 바탕 · 테두리가 없는 스타일에 `조건 && styles.X` 로 바탕이나 + * 테두리를 붙이는 자리. `ui/` 의 부품은 위 `files` 처럼 빠진다 — 거기서 같은 꼴을 쓰면 손으로 펼친다. + */ +const STYLE_LINE = /^\s+(\w+): \{(.*)\},?$/gm; +const TOGGLED = /styles\.(\w+)\b[^\]\n]*?&&[^\]\n]*?styles\.(\w+)/g; +const PAINTS = /\b(?:backgroundColor|borderWidth):/; + +function roundedWithoutKeep(text: string): string[] { + const styles = new Map([...text.matchAll(STYLE_LINE)].map((match) => [match[1], match[2]])); + const bare = (key: string) => /\bborderRadius:/.test(styles.get(key) ?? '') && !PAINTS.test(styles.get(key) ?? ''); + const paints = (key: string) => PAINTS.test(styles.get(key) ?? ''); + return [...text.matchAll(TOGGLED)] + /* 같은 배열에 늘 서는 바탕(`{ backgroundColor: soft }`)이 끼면 처음부터 네이티브 뷰다 */ + .filter((match) => bare(match[1]) && paints(match[2]) && !PAINTS.test(match[0].split('&&')[0])) + .filter((match) => { + const before = text.slice(0, match.index); + const tag = Math.max(...[...before.matchAll(/<[A-Z]/g)].map((open) => open.index ?? 0), 0); + return !before.slice(tag).includes('KEEP_VIEW'); + }) + .map((match) => `styles.${match[1]} + styles.${match[2]}`); +} + +describe('앱의 둥근 자리', () => { + it('바탕이 나중에 서는 둥근 자리는 `KEEP_VIEW` 를 펼친다', () => { + const found = files.flatMap(({ file, text }) => roundedWithoutKeep(text).map((what) => `${file}: ${what}`)); + expect(found).toEqual([]); + }); + + it('빠뜨린 자리를 잡는다 — 누를 때 · 고를 때 둘 다', () => { + const sheet = ` + mark: { width: 56, height: 32, borderRadius: RADIUS.pill }, + markOn: { backgroundColor: COLOR.accent }, + row: { padding: 8, borderRadius: RADIUS.cell }, + pressed: { backgroundColor: COLOR.surfaceSoft }, + face: { borderRadius: RADIUS.pill, backgroundColor: COLOR.surface }, +`; + expect(roundedWithoutKeep(`${sheet}`)).toEqual(['styles.mark + styles.markOn']); + expect(roundedWithoutKeep(` [styles.row, pressed && styles.pressed]}\n>${sheet}`)).toEqual(['styles.row + styles.pressed']); + expect(roundedWithoutKeep(`\n${sheet}`)).toEqual(['styles.mark + styles.markOn']); + expect(roundedWithoutKeep(`${sheet}`)).toEqual([]); + expect(roundedWithoutKeep(`${sheet}`)).toEqual([]); + expect(roundedWithoutKeep(`${sheet}`)).toEqual([]); + }); +});