feat: 본문을 읽는 동안에도 조사 안의 위치가 보인다

레일에는 「이 글에서」만 있었다. 이 글 안의 위치는 알아도 이 조사 안의 위치는 알 수
없었고, 제목 아래의 맥락 덩어리는 화면을 몇 번 넘기면 사라진다. 레일 아래 칸에
프로젝트·주제·종류를 짧게 붙여 따라오게 한다. 관계 목록은 두지 않는다 — 제목 아래에
이미 있고, 같은 목록이 한 화면에 두 번 있으면 목록이 아니라 소음이다.

레일이 둘을 담게 되었으므로 이름도 갈랐다. 「이 글에서」와 「맥락」은 서로 다른 질문에
답한다.

작성자가 확대를 끈 도식도 좁은 화면에서는 확대할 수 있게 했다. 390px 화면에서 폭
1,200px 짜리 도식은 3분의 1 로 눌려 덩어리만 보이고 글자는 읽히지 않는다 — 설명하는
일을 하지 못한다. 기준은 치수다: 본문 폭(720px)보다 넓은 그림은 어디선가 반드시 줄어든다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015c8cBFUaVr7KLVUx6ujz7D
This commit is contained in:
DongHyeonka
2026-09-15 20:20:43 +09:00
co-authored by Claude Opus 5
parent d3bf3925cf
commit db4450fe00
7 changed files with 146 additions and 24 deletions
@@ -273,7 +273,9 @@ describe("TechLog canonical Public documents", () => {
"href",
"#observed-values",
);
// 좁은 화면의 목차 하나. 넓은 화면의 레일은 「이 글에서」와 「맥락」으로 나뉜다.
expect(screen.getAllByRole("navigation", { name: "문서 목차" })).toHaveLength(1);
expect(screen.getByRole("navigation", { name: "이 글에서" })).toBeInTheDocument();
expect(container.querySelectorAll('[aria-label="코드 복사"]')).toHaveLength(3);
const image = screen.getByRole("img", {
+10 -3
View File
@@ -380,9 +380,15 @@ describe("shared Public record renderer", () => {
expect(screen.getByText("실험 조건 · 검증 환경과 데이터")).toBeVisible();
expect(screen.getByText("수정 중인 데이터셋")).toBeInTheDocument();
expect(screen.getByText(/게시 2026\.08\.14 · 마지막 검증 2030\.01\.02/)).toBeInTheDocument();
/*
좁은 화면의 목차 하나. 넓은 화면의 레일은 「이 글에서」와 「맥락」 둘을 담는 별도 이름을
쓴다 — 이 글의 어디인지와 이 조사의 어디인지는 서로 다른 질문이다.
*/
expect(screen.getAllByRole("navigation", { name: "문서 목차" })).toHaveLength(
1,
);
expect(screen.getByRole("navigation", { name: "이 글에서" })).toBeInTheDocument();
expect(screen.getByRole("navigation", { name: "지금 위치" })).toBeInTheDocument();
expect(screen.getByText("목차 · 강조 강함 코드")).toBeVisible();
expect(screen.getByRole("link", { name: "강조 강함 코드 바로가기" })).toBeVisible();
/*
@@ -432,8 +438,9 @@ describe("shared Public record renderer", () => {
"문제문제결론결론",
);
expect(screen.getByText("일반 본문")).toBeVisible();
// 제목이 없는 본문에는 목차를 그리지 않는다 — 빈 레일만 남는다.
expect(screen.queryByLabelText("문서 목차")).toBeNull();
// 제목이 없는 본문에는 목차를 그리지 않는다. 맥락은 그대로 남는다.
expect(screen.queryByRole("navigation", { name: "문서 목차" })).toBeNull();
expect(screen.queryByRole("navigation", { name: "이 글에서" })).toBeNull();
});
it("renders supplied Reference and Question preview fields and empty copy", () => {
@@ -651,7 +658,7 @@ describe("shared renderer interactions", () => {
variant="desktop"
/>,
);
expect(screen.getByRole("complementary", { name: "문서 목차" })).toHaveTextContent(
expect(screen.getByRole("complementary", { name: "문서 안내" })).toHaveTextContent(
"이 글에서첫째둘째",
);
expect(screen.getByRole("link", { name: "첫째" })).toHaveAttribute(