diff --git a/assets/images/home-install-art.svg b/assets/images/home-install-art.svg index 697d1e2..2369ef3 100644 --- a/assets/images/home-install-art.svg +++ b/assets/images/home-install-art.svg @@ -1,24 +1,36 @@ - - - - - + + + + + + - - + + + + + + + + + + + + - - - - - + + + + + - + + + + + - - - diff --git a/assets/images/income-graphic.svg b/assets/images/income-graphic.svg index a27736f..c1e6e88 100644 --- a/assets/images/income-graphic.svg +++ b/assets/images/income-graphic.svg @@ -1,20 +1,71 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/income-status.md b/docs/income-status.md index 60fbbf2..affd033 100644 --- a/docs/income-status.md +++ b/docs/income-status.md @@ -28,4 +28,4 @@ API는 미확정입니다. `IncomeState`/`IncomeData`는 화면 모델이며 실 ## 공통 수입 그래픽 -전달받은 graphic.png 원본을 income-graphic.png로 보관하고 공통 IncomeGraphic 컴포넌트로 표시합니다. 일부 브라우저의 SVG 효과 렌더링 문제를 피하기 위해 PNG를 사용합니다. 기본 100×100, 수입 요약 카드는 88×88로 적용합니다. 배치용 style과 size를 받을 수 있으며 장식 이미지이므로 접근성 읽기에서는 제외합니다. 원본의 민트색 카드·투명 효과는 보존합니다. +최종 전달된 SVG 원본을 income-graphic.svg로 보관하고 공통 IncomeGraphic 컴포넌트로 표시합니다. 이전 PNG 대신 최종 SVG를 사용합니다. 기본 100×100, 수입 요약 카드는 88×88로 적용합니다. 배치용 style과 size를 받을 수 있으며 장식 이미지이므로 접근성 읽기에서는 제외합니다. 원본의 민트색 카드·투명 효과는 보존합니다. diff --git a/docs/makeup-coordination.md b/docs/makeup-coordination.md index 196fe8b..387ca93 100644 --- a/docs/makeup-coordination.md +++ b/docs/makeup-coordination.md @@ -40,3 +40,7 @@ 개발 전용 진입점은 production에서 홈으로 이동합니다. 실제 일정 화면의 이벤트 연결은 담당 화면에서 콜백을 연결해야 합니다. 날짜 필드 안의 별도 달력 아이콘은 표시하지 않습니다. 날짜 필드 전체를 누르면 달력이 열리고, 시간 필드는 시간 선택이 열립니다. 일정 홈은 담당 화면에서 시트를 호출하는 방식으로 연결합니다. + +## 바텀시트 높이 및 부분 스크롤 + +기본 조율(action) 시트는 기존 높이를 유지합니다. 후보·시간 변경·날짜/시간 선택·처리 안내 단계는 전달된 기준대로 최대 466px(작은 화면에서는 가시 높이 92% 이내)을 적용하며, 짧은 내용은 자연 높이를 사용합니다. 후보 단계의 제목·설명·하단 CTA는 고정하고 후보 입력/추가 영역만 스크롤합니다. 달력과 시간 선택도 목록 영역을 스크롤해 하단 취소 버튼이 잘리지 않게 합니다. diff --git a/src/components/IncomeGraphic.tsx b/src/components/IncomeGraphic.tsx index 2fbda3d..4d64940 100644 --- a/src/components/IncomeGraphic.tsx +++ b/src/components/IncomeGraphic.tsx @@ -1,6 +1,6 @@ import { Image } from 'expo-image'; import type { ImageProps } from 'expo-image'; -import graphic from '../../assets/images/income-graphic.png'; +import graphic from '../../assets/images/income-graphic.svg'; type Props = { size?: number; diff --git a/src/features/makeup/DateTimePicker.tsx b/src/features/makeup/DateTimePicker.tsx index 6c8994c..79fde8a 100644 --- a/src/features/makeup/DateTimePicker.tsx +++ b/src/features/makeup/DateTimePicker.tsx @@ -51,37 +51,43 @@ export function CalendarPicker({ › - - {['일', '월', '화', '수', '목', '금', '토'].map((day) => ( - - {day} + + + {['일', '월', '화', '수', '목', '금', '토'].map((day) => ( + + {day} + + ))} + + {Array.from({ length: Math.ceil((start + count) / 7) }, (_, row) => ( + + {Array.from({ length: 7 }, (_, col) => { + const day = row * 7 + col - start + 1; + const date = `${month.year}-${String(month.month).padStart(2, '0')}-${String(day).padStart(2, '0')}`; + return day < 1 || day > count ? ( + + ) : ( + onChange(date)} + style={[s.day, normalizeDate(value) === date && s.selectedDay]} + > + + {day} + + + ); + })} ))} - - {Array.from({ length: Math.ceil((start + count) / 7) }, (_, row) => ( - - {Array.from({ length: 7 }, (_, col) => { - const day = row * 7 + col - start + 1; - const date = `${month.year}-${String(month.month).padStart(2, '0')}-${String(day).padStart(2, '0')}`; - return day < 1 || day > count ? ( - - ) : ( - onChange(date)} - style={[s.day, normalizeDate(value) === date && s.selectedDay]} - > - - {day} - - - ); - })} - - ))} + diff --git a/src/features/makeup/MakeupSheet.tsx b/src/features/makeup/MakeupSheet.tsx index 565c057..3631f7b 100644 --- a/src/features/makeup/MakeupSheet.tsx +++ b/src/features/makeup/MakeupSheet.tsx @@ -1,5 +1,13 @@ import { useRef, useState } from 'react'; -import { Keyboard, Modal, Pressable, ScrollView, Text, View } from 'react-native'; +import { + Keyboard, + Modal, + Pressable, + ScrollView, + Text, + View, + useWindowDimensions, +} from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { ActionButton } from '@/components/ActionButton'; import { useSubmission } from '@/features/session-record/useSubmission'; @@ -36,6 +44,8 @@ export function MakeupSheet({ const nextId = useRef(4); const submit = useSubmission(); const insets = useSafeAreaInsets(); + const { height: windowHeight } = useWindowDimensions(); + const limitedHeight = step !== 'action' || picker !== null || notice !== null; const error = candidateError(candidates); const mayShare = !error && lesson.parentConsented; function update(id: string, patch: Partial) { @@ -103,7 +113,11 @@ export function MakeupSheet({ accessibilityLabel="휴강 보강 조율" accessibilityViewIsModal aria-busy={submit.pending} - style={[s.sheet, { paddingBottom: Math.max(insets.bottom + 24, 52) }]} + style={[ + s.sheet, + limitedHeight && { maxHeight: Math.min(466, windowHeight * 0.92) }, + { paddingBottom: Math.max(insets.bottom + 24, 52) }, + ]} > {notice ? ( @@ -117,7 +131,7 @@ export function MakeupSheet({ setNotice(null)} /> ) : picker ? ( - <> + {picker.kind === 'date' && target ? ( setPicker(null)} /> )} - + ) : ( <> - + {step === 'candidates' && ( + + + 보강 후보 날짜 고르기 + + + {lesson.dateLabel} {lesson.studentName} 수업을 휴강해요. 가능한 날짜를 1~3개 + 고르면 학부모님이 그중 하나를 고르고, 안 맞으면 다른 날짜를 요청해요. + + + )} + {step === 'action' ? ( <> @@ -155,13 +185,6 @@ export function MakeupSheet({ ) : step === 'candidates' ? ( <> - - 보강 후보 날짜 고르기 - - - {lesson.dateLabel} {lesson.studentName} 수업을 휴강해요. 가능한 날짜를 1~3개 - 고르면 학부모님이 그중 하나를 고르고, 안 맞으면 다른 날짜를 요청해요. - {candidates.map((candidate, index) => ( diff --git a/src/features/makeup/styles.ts b/src/features/makeup/styles.ts index 16d5c3c..51457bd 100644 --- a/src/features/makeup/styles.ts +++ b/src/features/makeup/styles.ts @@ -19,7 +19,12 @@ export const s = StyleSheet.create({ borderTopRightRadius: radius.large, paddingHorizontal: padding[24], }, + formScroll: { flexGrow: 0, flexShrink: 1, minHeight: 0 }, + fixedHeading: { flexShrink: 0 }, + pickerBody: { flexShrink: 1, minHeight: 0 }, + calendarDays: { flexGrow: 0, flexShrink: 1, minHeight: 0 }, handle: { + flexShrink: 0, width: 56, height: 4, backgroundColor: c.border.default, @@ -31,7 +36,7 @@ export const s = StyleSheet.create({ heading: { ...t.heading[1].semiBold, color: c.text.default.strong, marginBottom: gap[8] }, description: { ...t.body[4].regular, color: c.text.default.weak, marginBottom: gap[16] }, content: { paddingBottom: padding[12] }, - actions: { gap: gap[8], paddingTop: padding[12] }, + actions: { flexShrink: 0, gap: gap[8], paddingTop: padding[12] }, actionSpacing: { height: 32 }, candidate: { marginBottom: gap[12] }, candidateHeading: { @@ -115,7 +120,7 @@ export const s = StyleSheet.create({ }, selectedTime: { backgroundColor: c.surface.focused }, timeOptionText: { ...t.body[3].medium, color: c.text.default.normal }, - timeList: { maxHeight: 300 }, + timeList: { maxHeight: 300, flexGrow: 0, flexShrink: 1, minHeight: 0 }, preview: { flex: 1, alignItems: 'center',