diff --git a/src/app/estimates/received/page.tsx b/src/app/estimates/received/page.tsx index 1cac12df..08af4446 100644 --- a/src/app/estimates/received/page.tsx +++ b/src/app/estimates/received/page.tsx @@ -11,7 +11,13 @@ export const metadata: Metadata = { export default function ReceivedEstimatesPage() { return ( - }> + + + + } + > ); diff --git a/src/app/estimates/requests/[estimateRequestId]/page.tsx b/src/app/estimates/requests/[estimateRequestId]/page.tsx index d0ec2c33..89cfc003 100644 --- a/src/app/estimates/requests/[estimateRequestId]/page.tsx +++ b/src/app/estimates/requests/[estimateRequestId]/page.tsx @@ -2,6 +2,7 @@ import type { Metadata } from "next"; import { notFound } from "next/navigation"; import CustomerAuthGate from "@/components/auth/CustomerAuthGate"; +import { EstimateRequestDetailSkeleton } from "@/components/estimate/requests/EstimateRequestLoadingSkeletons"; import EstimateRequestDetailView from "@/components/estimate/requests/EstimateRequestDetailView"; import { parsePositiveIntId } from "@/lib/utils/parsePositiveIntId"; @@ -16,6 +17,7 @@ interface EstimateRequestDetailPageProps { // 2026.07.29 정슬기 - [추가] 보낸 견적 요청 상세 라우트 // 2026.07.31 정슬기 - [수정] notFound 시 AuthGate 미마운트 → 404 유지 +// 2026.08.10 정슬기 - [수정] 인증 확인 중에도 상세 Skeleton 노출 export default async function EstimateRequestDetailPage({ params, }: EstimateRequestDetailPageProps) { @@ -27,7 +29,7 @@ export default async function EstimateRequestDetailPage({ } return ( - + }> ); diff --git a/src/app/estimates/requests/page.tsx b/src/app/estimates/requests/page.tsx index 79fa130e..02b6aa1a 100644 --- a/src/app/estimates/requests/page.tsx +++ b/src/app/estimates/requests/page.tsx @@ -1,17 +1,25 @@ import type { Metadata } from "next"; import CustomerAuthGate from "@/components/auth/CustomerAuthGate"; +import { EstimateRequestListSkeleton } from "@/components/estimate/requests/EstimateRequestLoadingSkeletons"; import EstimateRequestsPageClient from "@/components/estimate/requests/EstimateRequestsPageClient"; -// 2026.07.29 정슬기 - [추가] 보낸 견적 요청 목록 페이지 export const metadata: Metadata = { title: "보낸 견적 요청", description: "내가 등록한 견적 요청 목록을 확인합니다.", }; +// 2026.07.29 정슬기 - [추가] 보낸 견적 요청 목록 페이지 +// 2026.08.10 정슬기 - [수정] 인증 확인 중에도 목록 Skeleton 노출 export default function EstimateRequestsPage() { return ( - + + + + } + > ); diff --git a/src/components/common/DetailHeroBanner.tsx b/src/components/common/DetailHeroBanner.tsx index 5baa99f4..777fe6af 100644 --- a/src/components/common/DetailHeroBanner.tsx +++ b/src/components/common/DetailHeroBanner.tsx @@ -8,6 +8,8 @@ interface DetailHeroBannerProps { showProfile?: boolean; imageUrl?: string | null; name?: string; + /** 첫 화면 LCP 프로필 이미지를 preload할지 여부 */ + preloadProfileImage?: boolean; } /** @@ -18,12 +20,13 @@ export default function DetailHeroBanner({ showProfile = true, imageUrl = null, name = "", + preloadProfileImage = false, }: DetailHeroBannerProps) { if (!showProfile) { return (
- - + +
); } @@ -36,15 +39,15 @@ export default function DetailHeroBanner({ {/* 2026.07.25 정슬기 - [수정] Figma hero-decoration SVG(캡슐 벡터)로 원형 CSS 대체 */} {/* 우측: AABB x=1112(50%+152), 주황 배너 하단에 맞춤 */} {/* 2026.07.26 정슬기 - [수정] Tailwind arbitrary calc 연산자 공백을 _로 표기 */} - - + + {/* 2026.07.24 정슬기 - [수정] margin 토큰 유틸(left-margin-*) 사용 */} {/* 2026.07.25 정슬기 - [수정] Desktop 아바타 x=359 (Figma 8091:47378), 129×137, r20, top=122 */} {/* 2026.07.26 정슬기 - [수정] Tablet 프로필 Figma 100×100·r12 (1:9171 / 1:11975) — size-25 */} {/* 프로필은 Figma처럼 둥근 네모(원형 X). 기본 아이콘도 사각 배경으로 맞춤 */} -
+
{imageUrl ? ( {`${name} ) : ( diff --git a/src/components/common/ScrollToTopButton.tsx b/src/components/common/ScrollToTopButton.tsx index 97446494..c3b503d5 100644 --- a/src/components/common/ScrollToTopButton.tsx +++ b/src/components/common/ScrollToTopButton.tsx @@ -11,7 +11,7 @@ import { cn } from "@/lib/utils/cn"; /** Auth/프로필 등에서 쓰는 공식 컬러 캐릭터 */ const CHARACTER_SRC = "/images/profile-character.png"; -/** 이 스크롤 위치(px) 이상이면 버튼 노출 (300~500 구간) */ +/** 이 스크롤 위치(px) 이상이면 버튼 노출 */ const SCROLL_SHOW_THRESHOLD_PX = 400; /** 로그인·회원가입·프로필·인증 화면 — Scroll To Top 미노출 */ @@ -29,6 +29,7 @@ function shouldHideScrollToTop(pathname: string): boolean { if (pathname.startsWith("/oauth/")) { return true; } + return SCROLL_TO_TOP_HIDDEN_PATHS.has(pathname); } @@ -37,20 +38,41 @@ function isMoverDetailPath(pathname: string): boolean { if (pathname === APP_ROUTES.MOVERS.ROOT || pathname === APP_ROUTES.MOVERS.FAVORITES) { return false; } + return pathname.startsWith(`${APP_ROUTES.MOVERS.ROOT}/`); } /** * 공통 Scroll To Top (캐릭터 + TOP) - * AppShell에서 1회 마운트 — 짧은 페이지·제외 경로에서는 자연스럽게 숨김 + * AppShell에서 1회 마운트 + * 짧은 페이지·제외 경로에서는 자연스럽게 숨김 + * * // 2026.08.03 정슬기 - [추가] + * // 2026.08.10 정슬기 - [수정] 포커스 접근성 및 라우트 전환 stale focus 방지 */ export default function ScrollToTopButton() { const pathname = usePathname(); + const [scrolledPastThreshold, setScrolledPastThreshold] = useState(false); + + /** + * 단순 boolean 대신 포커스를 얻은 pathname 저장. + * + * 라우트 이동으로 버튼 DOM이 제거되어 onBlur가 실행되지 않더라도 + * 현재 pathname과 다르면 포커스 상태로 취급하지 않습니다. + */ + const [focusedPathname, setFocusedPathname] = useState(null); + const hiddenByRoute = shouldHideScrollToTop(pathname); const raiseForStickyCta = isMoverDetailPath(pathname); - const show = !hiddenByRoute && scrolledPastThreshold; + + const isFocusedOnCurrentRoute = focusedPathname === pathname; + + /** + * 스크롤 기준을 넘었거나 현재 라우트에서 버튼이 포커스된 경우 노출. + * hiddenByRoute에서는 항상 숨김. + */ + const show = !hiddenByRoute && (scrolledPastThreshold || isFocusedOnCurrentRoute); useEffect(() => { if (hiddenByRoute) { @@ -62,11 +84,15 @@ export default function ScrollToTopButton() { }; updateVisibility(); - window.addEventListener("scroll", updateVisibility, { passive: true }); + + window.addEventListener("scroll", updateVisibility, { + passive: true, + }); + return () => { window.removeEventListener("scroll", updateVisibility); }; - }, [pathname, hiddenByRoute]); + }, [hiddenByRoute]); if (hiddenByRoute) { return null; @@ -78,20 +104,33 @@ export default function ScrollToTopButton() { aria-label="맨 위로" aria-hidden={!show} tabIndex={show ? 0 : -1} + onFocus={() => { + setFocusedPathname(pathname); + }} + onBlur={() => { + setFocusedPathname(null); + }} onClick={() => { - window.scrollTo({ top: 0, behavior: "smooth" }); + window.scrollTo({ + top: 0, + behavior: "smooth", + }); }} className={cn( "bg-background-surface shadow-toast rounded-20 fixed z-30 flex size-64 flex-col items-center justify-center gap-2", + // Mobile 16~20 / Desktop 24~32 + Safe Area "right-[max(1rem,env(safe-area-inset-right))] md:right-[max(1.5rem,env(safe-area-inset-right))] lg:right-[max(2rem,env(safe-area-inset-right))]", + raiseForStickyCta ? "bottom-[calc(7rem+env(safe-area-inset-bottom))] lg:bottom-[max(1.5rem,env(safe-area-inset-bottom))]" : "bottom-[max(1rem,env(safe-area-inset-bottom))] md:bottom-[max(1.5rem,env(safe-area-inset-bottom))] lg:bottom-[max(2rem,env(safe-area-inset-bottom))]", + "transition-[opacity,transform,box-shadow] duration-200 ease-out", "hover:shadow-notification hover:-translate-y-4", "active:translate-y-0 active:scale-95", "focus-visible:ring-border-brand focus-visible:ring-2 focus-visible:outline-none", + show ? "pointer-events-auto translate-y-0 opacity-100" : "pointer-events-none translate-y-8 opacity-0", @@ -100,12 +139,14 @@ export default function ScrollToTopButton() { - + + TOP diff --git a/src/components/estimate/detail/EstimateDetailLayout.tsx b/src/components/estimate/detail/EstimateDetailLayout.tsx index 9baabbcb..c9dad90f 100644 --- a/src/components/estimate/detail/EstimateDetailLayout.tsx +++ b/src/components/estimate/detail/EstimateDetailLayout.tsx @@ -18,6 +18,7 @@ interface EstimateDetailLayoutProps { heroImageUrl?: string | null; heroName?: string; showProfile?: boolean; + preloadProfileImage?: boolean; backFallbackHref?: string; main: ReactNode; aside?: ReactNode; @@ -34,6 +35,7 @@ export default function EstimateDetailLayout({ heroImageUrl = null, heroName = "", showProfile = true, + preloadProfileImage = false, backFallbackHref, main, aside, @@ -50,7 +52,12 @@ export default function EstimateDetailLayout({
- +
+ {secondaryAction}
@@ -154,7 +162,17 @@ export function EstimateDetailLoadingState({ - + {showProfile ? ( +
+
+ +
+ +
+
+ ) : ( + + )}
+
@@ -219,11 +238,13 @@ export function EstimateDetailLoadingState({ @@ -246,6 +267,7 @@ export function EstimateDetailLoadingState({
+
diff --git a/src/components/estimate/detail/EstimateDetailPageSkeleton.tsx b/src/components/estimate/detail/EstimateDetailPageSkeleton.tsx index 8f6de39b..cf7d98fe 100644 --- a/src/components/estimate/detail/EstimateDetailPageSkeleton.tsx +++ b/src/components/estimate/detail/EstimateDetailPageSkeleton.tsx @@ -21,7 +21,7 @@ export default function EstimateDetailPageSkeleton() { return (
+
{showInitialSkeleton ? : null} {showBlockingError ? ( diff --git a/src/components/estimate/received/ReceivedEstimatesPageClient.tsx b/src/components/estimate/received/ReceivedEstimatesPageClient.tsx index 25bf1704..b010099e 100644 --- a/src/components/estimate/received/ReceivedEstimatesPageClient.tsx +++ b/src/components/estimate/received/ReceivedEstimatesPageClient.tsx @@ -27,7 +27,7 @@ export default function ReceivedEstimatesPageClient() { return (
diff --git a/src/components/estimate/requests/EstimateRequestLoadingSkeletons.tsx b/src/components/estimate/requests/EstimateRequestLoadingSkeletons.tsx index b7e9d597..1018b338 100644 --- a/src/components/estimate/requests/EstimateRequestLoadingSkeletons.tsx +++ b/src/components/estimate/requests/EstimateRequestLoadingSkeletons.tsx @@ -66,7 +66,7 @@ export function EstimateRequestListSkeleton({ aria-label="보낸 견적 요청을 불러오는 중" > {showFilter ? ( -