Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
18fe3df
feat: 설정 화면 구현
xeoxxn Oct 3, 2026
77225a2
feat: 알림 설정 화면 구현
xeoxxn Oct 3, 2026
59f1f1a
feat: 전화번호 변경 화면 구현
xeoxxn Oct 3, 2026
0bd0274
feat: 홈 헤더에 설정 진입 버튼 추가
xeoxxn Oct 3, 2026
2fe57f7
docs: 설정 화면에서 확정한 WDS 컴포넌트 매핑 추가
xeoxxn Oct 3, 2026
d9ea739
fix: 확인 모달 설명의 줄바꿈이 무시되는 문제 수정
xeoxxn Oct 4, 2026
69a06c6
refactor: 완료 체크 모션을 공용 컴포넌트로 분리
xeoxxn Oct 4, 2026
b003a6b
feat: 회원 탈퇴 확인 화면 구현
xeoxxn Oct 4, 2026
0eb4a27
feat: 회원 탈퇴 완료 화면 구현
xeoxxn Oct 4, 2026
255df75
Merge branch 'main' into feat/#96-settings-screens
xeoxxn Oct 8, 2026
cd77dfd
refactor: 탈퇴 완료 화면을 공용 ResultScreen 기반으로 변경
xeoxxn Oct 8, 2026
07e15a6
Merge branch 'main' into feat/#96-settings-screens
xeoxxn Oct 13, 2026
318f10a
refactor: 알림 설정 화면을 알림 기능 쪽 한 벌로 통합
xeoxxn Oct 13, 2026
0b4312f
refactor: 설정 화면 경로·이탈 경로를 상수로 빼고 갱신된 Figma 노드 ID 반영
xeoxxn Oct 13, 2026
beaec0b
refactor: 설정 화면 리뷰 반영 — 계정 정보를 users 엔티티로, 전화번호 로직을 공용으로
xeoxxn Oct 14, 2026
14d71b1
fix: 주소가 없는 설정 행을 비활성으로 그린다
xeoxxn Oct 14, 2026
6173104
refactor: 외부 링크 여는 처리를 화면 밖으로 분리
xeoxxn Oct 14, 2026
453f1bf
Merge branch 'main' into feat/#96-settings-screens
xeoxxn Oct 29, 2026
2385b51
chore: 송금 플로우와 겹치는 공용 파일의 주석을 한 벌로 맞춤
xeoxxn Oct 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docs/conventions/wds-component-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -746,3 +746,31 @@ Figma 프레임의 상태 표시줄(54px)과 홈 바(34px)는 앱 셸 몫이라
### 로그인·가입은 useFunnel 퍼널 하나(`AuthSignupScreen`)다

로그인 → 연락처 → 약관 동의 → 약관 상세 → 가입 완료를 `@use-funnel/react-router-dom`의 `useFunnel`로 묶었다(라우트 `/auth`, 단계는 `?auth.step=`). 퍼널 파일(`AuthSignupScreen.tsx`)은 단계 전환(어느 단계에서 어디로, 무슨 값을 넘기는지)만 맡고, 단계 화면은 `features/auth/steps/`에 파일 하나씩(`AuthLoginStep`, `AuthPhoneStep`, `AuthTermsStep`, `AuthTermsDetailStep`, `AuthCompleteStep`) 나눠 두며 전환은 콜백 prop으로 받는다. 단계·context 타입과 `guard`는 `constants/authSignupFunnel.ts`, 단계 화면이 함께 쓰는 뒤로가기 버튼·하단 버튼은 `components/`(`AuthBackButton`, `AuthBottomAction`)에 있다. 단계 사이에 넘기는 이름·연락처·약관 동의는 퍼널 context가 들고 있어서, 약관 상세(`history.push`)를 다녀와도 동의 상태가 유지된다(별도 저장소·navigate state 불필요). 동의 체크나 연락처 입력은 단계를 바꾸지 않고 `history.replace`로 context만 갈아 끼운다(히스토리가 늘지 않음). 앞 단계 값이 없이 중간 단계로 들어오면(새로고침·주소 직접 입력) 각 단계의 `guard`가 걸러서 로그인으로 돌려보낸다. 단계가 바뀌는 이동(`push`, 가입 완료로의 `replace`)에는 슬라이드(View Transition)를 켜고, 체크·연락처 입력처럼 context만 갈아 끼우는 `replace`에는 켜지 않는다. 라이브러리 기본 `useFunnel`은 옵션 이름을 `unstable_viewTransition`으로 넘기는데 React Router 7.18은 `viewTransition`만 알아서(소스에 이전 이름이 없다) 슬라이드가 무시된다. 그래서 `src/lib/useFunnel.ts`에 같은 라우터 어댑터를 `createUseFunnel`로 직접 만들고 옵션 이름만 바꿨다(라이브러리의 "라우터 직접 만들기" 가이드 방식) — 라이브러리를 올릴 때 이 이름이 고쳐졌는지 확인하고 고쳐졌다면 이 파일을 지운다.

## 설정 화면 (설정 `3524:152322` / 전화번호 변경 `3524:152450` / 회원 탈퇴 `3524:152473`)

코드는 `src/features/settings/` 참고.

### 알림 설정 화면은 설정이 아니라 알림 기능이 갖는다

Figma는 같은 알림 설정 화면을 **설정 섹션(`3524:152367`)과 알림 섹션(`3628:110837`) 두 군데에 복제**해 뒀다(노드 구조·좌표·문구가 완전히 같다). 디자인이 둘이라고 화면을 둘 만들면 안 된다 — 코드는 `features/notifications/NotificationsSettingsScreen`(`/notifications/settings`) 한 벌만 두고, 설정 화면의 "알림 설정" 행과 알림 목록 헤더의 설정 버튼이 **같은 경로로** 들어간다. 카테고리 문구·초기값도 `features/notifications/constants/notifications.ts`가 단일 출처다.

### 새로 확정된 WDS 매핑

| Figma 인스턴스 | 코드 | 확정 근거 |
|---|---|---|
| `Textinput/Textfield` | `TextField`(`@wanteddev/wds`) | 메인 컴포넌트 Node ID `445:8591` + [공식 문서](https://montage.wanted.co.kr/docs/components/selection-and-input/text-field/design). radius 12px·padding 12px 실측 일치 |

`Switch/Switch`·`Icon/Normal/Setting`·`Divider(new)` 8px은 위 "알림" 절에서 이미 확정한 매핑을 그대로 쓴다.

**`TextField`는 입력 박스만 그린다** — Figma `Textinput/Textfield`는 라벨(Heading) + 입력칸 + 안내 문구를 한 컴포넌트로 묶고 있지만, 코드 쪽 `TextField`에는 label·helper 슬롯이 없다. 그래서 "새 전화번호" 라벨과 "행사 신청 시 사용돼요." 안내는 Figma 구조대로 형제 요소로 따로 그린다. WDS `Label`은 required `*`만 더해주는 `Typography` 래퍼라 쓸 이유가 없다(행사 신청 폼 절의 선례와 같은 판단). 값이 있을 때 뜨는 지움(X) 버튼은 `TextField`가 기본으로 그려서 Figma 입력 중 상태(`3524:152465`)와 그대로 맞는다.

### 설정 행의 `Arrow`는 WDS가 아니다

설정 화면 모든 행 끝의 화살표(`445:12456` "Arrow")는 `search_design_system`으로 WDS를 뒤져도 같은 이름이 없다(WDS는 `Icon/Normal/Arrow *`·`Icon/Normal/Chevron *` 네이밍). 133번째 줄 "제외됨" 목록의 `Icon/Arrow`와 같은 Stream 전용 아이콘이라 SVG를 받아 `src/assets/icons/settings/arrow-right.svg`로 커밋했다. 색(`#C2C4C8` = `Atomic/Cool Neutral/90`)이 에셋에 구워져 있어 토큰은 새로 추가하지 않았다.

**에셋은 12×12인데 슬롯은 8×12다.** Figma도 12×12 뷰박스를 `width: 8px; height: 12px` 자리에 `preserveAspectRatio="none"`으로 넣어 가로를 눌러 쓴다. 내려받은 SVG를 그대로 `className="h-3 w-2"`로 쓰는 게 Figma와 같은 결과다 — 8×12로 다시 내보내거나 종횡비를 맞추려 들면 오히려 어긋난다.

### Figma 노드 ID가 통째로 갈린 적이 있다

설정 섹션은 한 번 통째로 다시 만들어졌다. 옛 ID(`1799:85920` 섹션, 설정 `3013:116135`, 알림 설정 `3013:116182`, 전화번호 변경 `1799:87220`, 로그아웃 모달 `1799:87183`)는 **파일에서 삭제되어 조회되지 않는다.** 탈퇴 계열(`3524:152473`·`3524:152505`·`3524:152517`)만 그대로다. 주석의 nodeId가 `get_design_context`에서 "not found"로 나오면 먼저 섹션이 다시 만들어졌는지 확인한다.
41 changes: 41 additions & 0 deletions src/app/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ import NoticesListScreen from "@/features/notices/NoticesListScreen";
import NotificationsScreen from "@/features/notifications/NotificationsScreen";
import NotificationsSettingsScreen from "@/features/notifications/NotificationsSettingsScreen";
import SearchScreen from "@/features/search/SearchScreen";
import PhoneChangeScreen from "@/features/settings/PhoneChangeScreen";
import SettingsScreen from "@/features/settings/SettingsScreen";
import WithdrawalCompleteScreen from "@/features/settings/WithdrawalCompleteScreen";
import WithdrawalScreen from "@/features/settings/WithdrawalScreen";

// 앱의 모든 라우트는 이 객체 배열 한곳에서 정의한다 — 새 화면은 여기에 라우트를 추가한다.
// satisfies로 선언 시점에 RouteObject 형태를 검사한다.
Expand Down Expand Up @@ -194,6 +198,43 @@ const routes = [
} satisfies ScreenRouteHandle,
path: "/notices/:noticeId",
},
{
element: <SettingsScreen />,
// 흰 카드가 회색 배경 위에 쌓이는 화면이라 background는 기본값(alternative)을 쓴다.
// 설정은 뒤로가기로만 빠져나가는 흐름이라 Bottom Nav를 안 보여준다(Figma 3524:152322).
// 설정의 "알림 설정" 행은 알림 화면이 이미 가진 /notifications/settings로 보낸다 —
// Figma는 설정·알림 두 섹션에 같은 화면을 복제해 뒀지만 코드에서는 한 벌만 둔다.
handle: { hasBottomNav: false } satisfies ScreenRouteHandle,
path: "/settings",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[c] settings가 terminology.md 용어 사전에 없는 것 같아서 확인 부탁드립니다! coding-style.md에 "사전에 없는 새 도메인이면 먼저 그 문서에 추가한 뒤 코드에 반영한다"는 규칙이 있어서요. 계정 정보, 전화번호 변경, 탈퇴는 백엔드에서 users 쪽 엔드포인트일 가능성이 커 보이는데, 라우트와 폴더를 settings로 둘지 백엔드와 한번 맞춰보면 좋을 것 같습니다.

사소하지만 경로는 /withdraw(동사), 컴포넌트는 Withdrawal*(명사)로 형태가 달라서 하나로 맞추면 찾기 편할 것 같아요.

},
{
element: <PhoneChangeScreen />,
// 입력칸 하나 + 하단 고정 버튼(Action Area)이 있는 흰 배경 화면(Figma 3524:152450)
handle: {
background: "normal",
hasBottomNav: false,
} satisfies ScreenRouteHandle,
path: "/settings/phone",
},
{
element: <WithdrawalScreen />,
// 안내 카드가 회색이라 화면은 흰 면이어야 한다(Figma 3524:152473).
// 하단 고정 버튼(Action Area)이 있어 Bottom Nav는 없다.
handle: {
background: "normal",
hasBottomNav: false,
} satisfies ScreenRouteHandle,
path: "/settings/withdrawal",
},
{
element: <WithdrawalCompleteScreen />,
// 완료 화면 — 하단 탭 없이 흰 배경 전체 화면이다(Figma 3524:152505)
handle: {
background: "normal",
hasBottomNav: false,
} satisfies ScreenRouteHandle,
path: "/settings/withdrawal/complete",
},
{
element: <LockersApplyScreen />,
// 시트만 있는 화면이라 뒤에 Bottom Nav가 비쳐도 Figma(홈 위에 뜨는 시트)와 같다
Expand Down
5 changes: 5 additions & 0 deletions src/assets/icons/settings/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/components/ui/ConfirmModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,12 @@ function ConfirmModal({
{title}
</Typography>
{description && (
// Figma 모달 설명은 줄바꿈 위치까지 디자인에 포함돼 있어서(예: 탈퇴 확인
// 3524:152535, K스마트멘토 이동 확인 3562:162972) `\n`을 그대로 살린다.
// 기존 사용처는 모두 한 줄 문구라 영향이 없다.
<Typography
as="p"
className="whitespace-pre-line"
color="semantic.label.alternative"
variant="label1-reading"
weight="regular"
Expand Down
15 changes: 15 additions & 0 deletions src/entities/users/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// 설정 화면 계정 정보 카드(Figma 3524:152329)가 보여 주는 내 계정 정보.
// 용어 사전(terminology.md)의 `사용자 → users` 도메인이다.
export interface MyAccount {
name: string;
email: string;
/** `010-1234-5678` 형태. 전화번호 변경 화면이 바꾸는 값이다. */
phone: string;
}

// Figma는 "26.0.1 · 최신버전"처럼 한 줄로 보여 주지만, 버전과 최신 여부는 서버가 내려 주는
// 별개 값이라 나눠서 받는다 — 문구 조합은 화면이 한다.
export interface AppVersion {
version: string;
isLatest: boolean;
}
17 changes: 17 additions & 0 deletions src/entities/users/usersApi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { AppVersion, MyAccount } from "@/entities/users/types";
import { APP_VERSION, MY_ACCOUNT } from "@/entities/users/usersMock";
import { mockupApi } from "@/lib/mockupApi";

// 실 API가 붙으면 함수 안쪽만 요청 코드로 바꾼다 — 화면은 이 함수로만 데이터를 받는다.
//
// 백엔드 연동 시 확인할 것: 설정 화면은 묶음 이름이고 데이터는 `users` 도메인이라고 보고
// 여기에 뒀다(terminology.md에 `settings`는 없다). 엔드포인트가 `/api/users/me`가 아니라
// 설정 전용으로 따로 나오면 도메인 폴더와 라우트(`/settings`)를 그때 맞춘다.
export function fetchMyAccount(): Promise<MyAccount> {
return mockupApi("users/me", () => MY_ACCOUNT);
}

// 앱 버전은 계정과 다른 요청이라 key를 나눈다 — 설정 화면이 둘을 한 카드에 섞어 쓰지 않는다.
export function fetchAppVersion(): Promise<AppVersion> {
return mockupApi("users/app-version", () => APP_VERSION);
}
13 changes: 13 additions & 0 deletions src/entities/users/usersMock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { AppVersion, MyAccount } from "@/entities/users/types";

// Figma 설정 화면(3524:152322)에 적힌 값 그대로. 실 API가 붙으면 이 파일은 사라진다.
export const MY_ACCOUNT: MyAccount = {
email: "pog454@kookmin.ac.kr",
name: "이예담",
phone: "010-1234-5678",
};

export const APP_VERSION: AppVersion = {
isLatest: true,
version: "26.0.1",
};
9 changes: 8 additions & 1 deletion src/features/home/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
import { LOCKER_ASSIGNMENT_PATH } from "@/features/lockers/constants/lockers";
import { NOTIFICATIONS_PATH } from "@/features/notifications/constants/notifications";
import { getSearchPath } from "@/features/search/constants/search";
import { SETTINGS_PATHS } from "@/features/settings/constants/settings";

// Figma: 홈 2건 이하 (nodeId 3147:146240), 3건 이상 (3147:146297), empty (3147:146366)
// 챗봇 FAB(Figma nodeId 2443:178457 등, 홈 화면 variant마다 우하단에 고정) —
Expand Down Expand Up @@ -61,7 +62,13 @@ function HomeScreen() {
}
trailing={
<>
<TopNavigationButton aria-label="설정" variant="icon">
<TopNavigationButton
aria-label="설정"
onClick={() =>
navigate(SETTINGS_PATHS.root, { viewTransition: true })
}
variant="icon"
>
<IconSetting />
</TopNavigationButton>
<TopNavigationButton
Expand Down
120 changes: 120 additions & 0 deletions src/features/settings/PhoneChangeScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import {
ActionArea,
ActionAreaButton,
TextField,
TopNavigationButton,
Typography,
} from "@wanteddev/wds";
import { IconChevronLeft } from "@wanteddev/wds-icon";
import { useState } from "react";
import { useNavigate } from "react-router-dom";

import ScreenHeader from "@/components/ui/ScreenHeader";
import ScreenToast from "@/components/ui/ScreenToast";
import { useScreenHeader } from "@/components/ui/useScreenHeader";
import {
formatPhoneNumber,
isValidPhoneNumber,
PHONE_NUMBER_MAX_LENGTH,
} from "@/lib/phone";

// Figma: 전화번호 변경 (nodeId 3524:152450), 입력 중 (3524:152465), 완료 토스트 (3524:152457).
// 입력칸은 Figma `Textinput/Textfield`(445:8591, WDS 공식 문서 링크 확인)라 WDS `TextField`를
// 그대로 쓴다. 다만 WDS `TextField`는 입력 박스만 그려서, 위 라벨("새 전화번호")과 아래 안내
// 문구는 Figma 구조대로 형제 요소로 따로 그린다 — WDS `Label`은 required `*` 처리만 더해주는
// Typography 래퍼라 여기선 쓸 이유가 없다(wds-component-usage.md의 행사 신청 폼 선례와 같다).
//
// "변경하기" 버튼은 번호를 형식에 맞게 다 입력했을 때만 활성화된다(Figma 비활성 #F4F4F5 /
// 활성 #0066FF). 높이 56px은 ActionAreaButton 기본(48px)과 달라 sx로 세로 padding만 보정한다.
// 실제 변경 API가 없어서 누르면 Figma처럼 완료 토스트만 띄운다.
//
// 하이픈 포맷과 유효성 판정은 온보딩 연락처 입력(#110)과 같은 로직이라 `lib/phone.ts`에 있다.
//
function PhoneChangeScreen() {
const navigate = useNavigate();
const [phone, setPhone] = useState("");
const [toastOpen, setToastOpen] = useState(false);
// 토스트가 떠 있는 중에 다시 저장해도 스크린리더가 재안내하도록 매번 새로 마운트한다
// (EventsApplicationScreen·BililgeReturnSection과 같은 패턴).
const [toastToken, setToastToken] = useState(0);

useScreenHeader(
<ScreenHeader
leading={
<TopNavigationButton
aria-label="뒤로가기"
onClick={() => navigate(-1)}
variant="icon"
>
<IconChevronLeft />
</TopNavigationButton>
}
title="전화번호 변경"
variant="normal"
/>,
);

const handleSave = () => {
setToastOpen(true);
setToastToken((token) => token + 1);
};

return (
<div className="flex h-full flex-col">
<div className="flex flex-1 flex-col gap-2 px-5 pt-2">
<Typography
as="label"
color="semantic.label.neutral"
htmlFor="phone"
variant="label1"
weight="bold"
>
새 전화번호
</Typography>
<TextField
id="phone"
inputMode="tel"
maxLength={PHONE_NUMBER_MAX_LENGTH}
onChange={(event) => setPhone(formatPhoneNumber(event.target.value))}
placeholder="010-1234-5678"
type="tel"
value={phone}
/>
<Typography
as="p"
color="semantic.label.alternative"
variant="caption1"
weight="regular"
>
행사 신청 시 사용돼요.
</Typography>
</div>

<div className="shrink-0">
<ActionArea>
{/* Figma Main Action은 56px인데 ActionAreaButton(size="large")은 48px이라 세로 padding만 보정 */}
<ActionAreaButton
disabled={!isValidPhoneNumber(phone)}
onClick={handleSave}
sx={{ paddingBlock: "16px" }}
>
변경하기
</ActionAreaButton>
</ActionArea>
{/* Figma Action Area(110px)의 버튼 아래 34px 중 WDS가 주는 padding 20px을 뺀 14px을 더한다
(EventsApplicationScreen과 같은 보정) */}
<div className="h-safe-bottom-extra bg-background-elevated-normal sm:h-[14px]" />
</div>

<ScreenToast
key={toastToken}
message="전화번호를 변경했어요."
onOpenChange={setToastOpen}
open={toastOpen}
variant="positive"
/>
</div>
);
}

export default PhoneChangeScreen;
Loading