From 6b8530e04e34d16fa3e79a656eee94176641fe0b Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Mon, 7 Sep 2026 10:05:12 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Studio=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=9D=84=20=EC=9D=B4=20=EC=82=AC=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=EC=9D=98=20=EC=96=B8=EC=96=B4=EB=A1=9C=20=EC=84=B8?= =?UTF-8?q?=EC=9A=B4=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 작성자가 처음 만나는 화면인데 사이트가 쓰지 않는 말을 쓰고 있었다 — 테두리를 두른 둥근 카드, 파란 채움 버튼, 파란 mono eyebrow. 나머지 화면은 상자를 두지 않고 글자의 굵기와 색으로만 격을 나눈다(805d400 에서 Studio 전체를 그렇게 바꿨는데, 이 화면만 「유일한 행동이니 채워 둔다」는 이유로 예외였다). 처음 만나는 화면이 예외면 그 사이트가 아닌 것처럼 보인다. 홈의 머리(`.home-identity`)와 같은 배치로 세운다 — shell 왼쪽 끝에 kicker·제목·설명이 서고, 헤어라인 아래에 「로그인 시작」과 돌아갈 곳이 한 줄로 온다. 상자도 채움도 없고 반응은 hover 밑줄뿐이다. - 제목에 초점을 줄 때(page-header.tsx 의 라우트 초점) 파란 사각형이 제목을 두르고 있었다. `:focus-visible` 일 때만 바깥쪽으로 표시한다. - kicker 를 「SIGN IN」에서 「STUDIO」로 바꾼다. 사이트의 다른 머리말은 Topic·Explore 처럼 어디인지를 말하고, 「SIGN IN」이면 바로 아래 제목과 같은 말을 두 번 한다. - 제목이 그 자리에서 이유를 말하게 하고(「기록을 쓰려면 로그인이 필요합니다」) 설명에서 겹치던 첫 문장을 뺀다. router 컴포넌트 검사가 「세션이 필요합니다.」라는 옛 제목을 그대로 적어 두어, 그 말이 바뀐 뒤로 계속 빨간 채 지나가고 있었다 — 잡아야 할 것(보호된 라우트가 로그인 관문으로 떨어진다)은 멀쩡한데 검사만 낡았다. 문구가 아니라 `data-surface` 를 묻게 한다. --- .../tech-log/presentation/styles/globals.css | 110 +++++++++++------- src/presentation/i18n/catalog.ts | 15 ++- tests/component/router.test.tsx | 15 ++- 3 files changed, 92 insertions(+), 48 deletions(-) diff --git a/src/features/tech-log/presentation/styles/globals.css b/src/features/tech-log/presentation/styles/globals.css index eb0e65d..9f3c436 100644 --- a/src/features/tech-log/presentation/styles/globals.css +++ b/src/features/tech-log/presentation/styles/globals.css @@ -106,79 +106,111 @@ a { 이 화면은 공개 셸과 Studio 셸 양쪽에서 나온다 — 보호된 주소를 열면 그 주소가 속한 레이아웃 안에 이 자리가 대신 그려진다. 그래서 두 곳 모두에 있는 토큰만 쓴다. - 카드로 세우는 이유는 이것이 "화면을 못 그렸다"가 아니라 "여기서 한 걸음 더 필요하다"이기 - 때문이다. 오류 화면과 같은 모양이면 작성자는 무언가 고장 난 줄로 읽는다. + 오래 가운데 선 카드였다. 테두리를 두른 둥근 상자와 파란 채움 버튼, 파란 mono eyebrow 는 이 + 사이트가 쓰는 말이 아니다 — 나머지 화면은 상자를 두지 않고 글자의 굵기와 색으로만 격을 + 나눈다(studio.css 의 같은 판단). 로그인만 다른 언어를 쓰면 작성자가 처음 만나는 화면이 곧 + 이 사이트가 아닌 것처럼 보인다. + + 그래서 홈의 머리(.home-identity)와 같은 배치로 세운다 — shell 왼쪽 끝에 kicker·제목·설명이 + 서고, 헤어라인 아래에 행동 한 줄이 온다. 카드를 없애도 「고장 났다」로 읽히지 않는 이유는 + 오류 화면이 붉은 계열과 다른 문구를 쓰기 때문이고, 이 화면은 제목이 무엇을 하면 되는지를 + 직접 말한다. */ .auth-gate { - display: grid; - place-items: center; - padding-block: clamp(64px, 12vh, 140px); + padding-block: clamp(72px, 11vh, 116px) clamp(64px, 10vh, 104px); } .auth-gate .auth-gate__card { - width: min(100%, 34rem); - padding: clamp(32px, 5vw, 52px); - border: 1px solid var(--line-strong); - border-radius: 10px; - background: var(--paper); + width: min(100%, var(--shell)); + margin-inline: auto; + padding-inline: 32px; } .auth-gate .page-header { margin: 0; } +/* 사이트의 구역 머리말과 같은 급이다(.section-kicker). 파란 mono 는 여기서만 쓰던 말이었다. */ .auth-gate .page-header__eyebrow { - margin: 0 0 14px; - color: var(--signal); - font-family: "IBM Plex Mono", monospace; + margin: 0 0 16px; + color: var(--muted); font-size: 12px; - font-weight: 600; - letter-spacing: 0.08em; + font-weight: 650; + letter-spacing: 0.105em; + line-height: 1.4; + text-transform: uppercase; } +/* + 홈의 제목과 같은 급으로 세운다. 이 화면이 작성자가 처음 만나는 자리이므로 사이트의 목소리가 + 가장 크게 들려야 하는 곳이다. +*/ .auth-gate .page-header h1 { + max-width: 20ch; margin: 0; - font-size: clamp(27px, 3.2vw, 33px); - font-weight: 660; - letter-spacing: -0.035em; - line-height: 1.25; + font-size: clamp(34px, 4.4vw, 48px); + font-weight: 680; + letter-spacing: -0.05em; + line-height: 1.08; +} + +/* 라우트 이동 때 제목에 초점을 준다(page-header.tsx). 그 표시가 제목을 상자로 두르면 안 된다. */ +.auth-gate .page-header h1:focus { + outline: none; +} + +.auth-gate .page-header h1:focus-visible { + outline: 2px solid var(--signal); + outline-offset: 6px; } .auth-gate .page-header__description { - margin: 16px 0 0; + max-width: 620px; + margin: 22px 0 0; color: var(--ink-soft); - font-size: 16px; - line-height: 1.72; + font-size: clamp(17px, 1.7vw, 21px); + font-weight: 430; + letter-spacing: -0.02em; + line-height: 1.6; } +/* + 행동 한 줄. 헤어라인이 구획을 맡고 상자는 두지 않는다 — Studio 의 나머지 화면과 같은 규칙이다. + 버튼과 「돌아갈 곳」을 한 줄에 두는 이유는 그 둘이 같은 것을 말하기 때문이다: 여기를 누르면 + 어디로 간다. +*/ .auth-gate .auth-gate__actions { - display: grid; - gap: 14px; - margin-top: 32px; - padding-top: 28px; - border-top: 1px solid var(--line); + display: flex; + flex-wrap: wrap; + align-items: baseline; + gap: 10px 28px; + margin-top: 44px; + padding-top: 26px; + border-top: 1px solid var(--line-strong); } -/* 이 버튼은 화면에서 유일한 행동이다. 폭을 채워 어디를 눌러야 하는지 묻지 않게 한다. */ .auth-gate .auth-gate__actions button { display: inline-flex; - min-height: 48px; + min-height: 44px; align-items: center; - justify-content: center; - width: 100%; - padding-inline: 20px; - border: 1px solid var(--signal); - border-radius: 6px; - background: var(--signal); - color: #fff; + padding: 0; + border: 0; + border-radius: 0; + background: none; + color: var(--ink); font: inherit; - font-size: 15px; - font-weight: 650; + font-size: 17px; + font-weight: 700; cursor: pointer; } +.auth-gate .auth-gate__actions button:hover:not(:disabled) { + text-decoration: underline; + text-underline-offset: 5px; +} + .auth-gate .auth-gate__actions button:disabled { - opacity: 0.55; + color: var(--faint); cursor: wait; } diff --git a/src/presentation/i18n/catalog.ts b/src/presentation/i18n/catalog.ts index 7665f8b..46e8445 100644 --- a/src/presentation/i18n/catalog.ts +++ b/src/presentation/i18n/catalog.ts @@ -87,16 +87,19 @@ const PLATFORM_KO_MESSAGES = { "route.auth.integration.description": "외부 인증 소유자가 연결되면 이 보호 라우트를 사용할 수 있습니다.", "route.auth.recovering.title": "세션을 복구하고 있습니다.", - "route.auth.eyebrow": "SIGN IN", + // 구역 머리말은 「어디인가」를 말한다 — 사이트의 다른 자리도 Topic·Explore·Index 처럼 쓴다. + // "SIGN IN" 이면 바로 아래 제목("…로그인해 주세요")과 같은 말을 두 번 하게 된다. + "route.auth.eyebrow": "STUDIO", "route.auth.returnTo": "로그인하면 {path} 로 돌아옵니다.", - "route.auth.required.title": "Studio에 로그인해 주세요.", + "route.auth.required.title": "기록을 쓰려면 로그인이 필요합니다", "route.auth.recovering.description": "이전 로그인이 아직 살아 있는지 확인하고 있습니다. 잠시 뒤에도 이 화면이면 다시 시도해 주세요.", // 예전 문구("인증 연동 지점을 확인하기 위한 보호 라우트")는 이 뼈대를 만들던 사람에게 하는 // 말이었다. 실제로 이 화면을 보는 사람은 글을 쓰러 온 작성자이고, 알아야 할 것은 무엇을 // 누르면 되는지다. + // 첫 문장은 제목이 가져갔다 — 같은 말을 두 번 하지 않는다. "route.auth.required.description": - "기록을 쓰고 게시하려면 로그인이 필요합니다. 로그인하면 방금 열려던 화면으로 돌아옵니다.", + "로그인하면 방금 열려던 화면으로 돌아옵니다.", "route.documentTitle": "{title} · {appName}", "chunk.checking": "새 릴리스 정보를 확인하고 있습니다.", "chunk.reloadOnce": "새 버전으로 한 번만 전환합니다.", @@ -276,13 +279,13 @@ const PLATFORM_EN_MESSAGES = { "route.auth.integration.description": "This protected route is available after an external authentication owner is connected.", "route.auth.recovering.title": "Recovering the session.", - "route.auth.eyebrow": "SIGN IN", + "route.auth.eyebrow": "STUDIO", "route.auth.returnTo": "You return to {path} after signing in.", - "route.auth.required.title": "Sign in to Studio.", + "route.auth.required.title": "Signing in is required to write", "route.auth.recovering.description": "Checking whether the previous sign-in is still valid. Try again if this screen stays.", "route.auth.required.description": - "Writing and publishing records needs a signed-in session. You return to this screen afterwards.", + "You return to the screen you opened after signing in.", "route.documentTitle": "{title} · {appName}", "chunk.checking": "Checking the new release information.", "chunk.reloadOnce": "Switching to the new version once.", diff --git a/tests/component/router.test.tsx b/tests/component/router.test.tsx index 37d6aea..53e40cb 100644 --- a/tests/component/router.test.tsx +++ b/tests/component/router.test.tsx @@ -345,9 +345,18 @@ describe("generic application router", () => { ), ); - expect( - await screen.findByRole("heading", { name: "세션이 필요합니다." }), - ).toBeVisible(); + /* + 문구가 아니라 동작을 묻는다. 「세션이 필요합니다.」라는 옛 제목을 그대로 적어 두었더니 + 그 말이 바뀐 뒤로 이 검사는 계속 빨간 채로 지나갔다 — 잡아야 할 것(보호된 라우트가 + 로그인 관문으로 떨어진다)은 멀쩡한데 검사만 낡은 상태였다. 관문임을 말하는 것은 + `data-surface` 이고, 그 값은 계약이다. + */ + const gate = await screen.findByRole("heading", { level: 1 }); + expect(gate).toBeVisible(); + expect(gate.closest("[data-surface]")).toHaveAttribute( + "data-surface", + "authentication-required", + ); }); it("renders the installed TechLog home in the Public layout", async () => {