fix(home): 홈이 StandardPage와 LinkButton을 쓴다

홈(`src/presentation/pages/home-page.tsx`)이 페이지 템플릿 대신 자기
`section.ui-page`와 `PageHeader`를 쓰고, 시작 링크를
`<Link className="ui-button …">`으로 `LinkButton`을 손으로 다시 만든다.
`PRODUCT.md`는 홈이 파생 서비스에 남는다고 적는다. 그래서 그대로 복제되고
개발자가 따라 하는 예가 된다. `LinkButton`의 variant·size가 바뀌면 홈만
어긋난다.

고른 방법: `StandardPage`(heading 슬롯에 eyebrow·제목·설명)와
`LinkButton variant="primary"/"secondary"`로 바꾼다. 준비 목록, 런타임 요약,
시작 링크는 템플릿의 본문 자리에 `home-page__sections`(블록 사이 `--space-6`)로
묶어 둔다. 템플릿 본문 자리에는 간격이 없어, 묶지 않으면 런타임 요약이 카드에
붙는다(첫 골든에서 보고 고쳤다). component 시험이 홈의 링크가
standard 템플릿 안의 `ui-button ui-button--primary`인지 본다.

위험·한계: 머리말과 본문 사이는 템플릿 간격(`--space-5`)이라 홈의 세로 간격이
조금 바뀐다. 시각 골든은 이 커밋에서 다시 찍고 이유를
PR 본문에 적는다.

홈이 템플릿과 `LinkButton`을 쓰면서 번들러가 청크 둘을 합쳤다. 초기 JS는
파일 17 → 15개, gzip 194,397 → 194,143 B, Service Worker precache 자산은
24 → 22개다. `config/scale/feature-shape-ceilings.json`은 측정 스크립트
(`node scripts/scale/measure-feature-shape-growth.ts --initial-baseline
--write`, desktop)가 쓴 그대로다.

검증: `tests/component/starter-pages.test.tsx`와 시각 골든은 desktop에서
돌린다(PR 본문).

Refs: 1112/04-06
This commit is contained in:
DongHyeonka
2026-11-13 23:27:47 +09:00
parent f948aa67c3
commit d5083f862d
6 changed files with 73 additions and 55 deletions
+11
View File
@@ -45,6 +45,17 @@ describe("starter home page", () => {
).toBeVisible();
});
// 1112/04-06. The home page a product keeps is an example of the page
// templates and primitives, not of hand-made copies of them.
it("lays the home page out with the standard template and link buttons", async () => {
const { container } = renderApp("/");
const action = await screen.findByRole("link", { name: "플랫폼 구성 보기" });
expect(action.closest("article.page-template--standard")).not.toBeNull();
expect(action).toHaveClass("ui-button", "ui-button--primary");
expect(container.querySelectorAll("section.ui-page")).toHaveLength(0);
});
it("reaches the platform overview from the starter actions", async () => {
const user = userEvent.setup();
renderApp("/");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB