fix: 축 화면에서 결론을 빼고, 홈에서 다른 주제로 갈 길을 낸다

축 화면이 요약과 결론을 함께 실었다. 이 화면이 답하는 것은 「이 접근이 무엇이고 그 기록이
어디 있나」이고, 무엇을 알게 됐는지는 주제 화면의 비교표가 네 축을 나란히 놓고 답한다 —
같은 문장을 두 자리에 두면 비교표를 볼 이유가 없어진다.

홈의 비교 구역은 기록이 가장 많은 주제 하나만 펼친다. 그래서 나머지 주제는 최근 기록에
우연히 걸릴 때만 보였고, 그 주제가 무엇을 견줬는지는 홈 어디에서도 닿을 수 없었다 —
JPA 주제가 실제로 그랬다. 「다른 주제」 한 줄을 둔다. 펼치지는 않는다; 견주는 자리는 한
번에 하나여야 읽힌다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ
This commit is contained in:
DongHyeonka
2026-09-02 00:34:47 +09:00
co-authored by Claude Opus 5
parent a71c588d01
commit 69eabc7d6c
4 changed files with 60 additions and 41 deletions
@@ -134,16 +134,23 @@ function dateLabel(isoTimestamp: string): string {
* <p>요청은 둘이다(목록 하나 + 상세 하나). 주제마다 상세를 부르면 주제 수만큼 늘어난다 —
* 홈의 최근 기록이 프로젝트마다 요청을 보내던 시절에 겪은 것과 같은 모양이다.
*/
async function getFeaturedTopic(
publicContent: PublicContentQueries,
): Promise<PublicTopicDetail | null> {
async function getTopics(publicContent: PublicContentQueries) {
const topics = await publicContent.listTopics();
// 목록의 순서는 서버가 정한다. 「가장 많이 다룬」은 여기서 직접 골라야 하는 것이고,
// 첫 항목을 쓰면 기록 3편짜리 주제가 18편짜리를 제치고 홈에 오른다.
const featured = [...topics].sort((left, right) => right.recordCount - left.recordCount)[0];
if (!featured) return null;
const detail = await publicContent.getTopicDetail(featured.slug);
return detail && detail.variants.length > 1 ? detail : null;
const byWeight = [...topics].sort((left, right) => right.recordCount - left.recordCount);
const featuredSlug = byWeight[0]?.slug;
const detail = featuredSlug ? await publicContent.getTopicDetail(featuredSlug) : undefined;
return {
/** 비교표를 펼쳐 둘 주제. 축이 둘 이상이어야 견줄 것이 있다. */
featured: detail && detail.variants.length > 1 ? detail : null,
/*
나머지 주제. 홈이 주제 하나만 펼쳐 두던 동안 나머지 주제는 최근 기록에 우연히 걸릴 때만
보였고, 그 주제가 무엇을 견줬는지는 어디에도 나오지 않았다 — 실제로 JPA 의 비교표는 홈
어디에서도 닿을 수 없었다.
*/
others: byWeight.filter((topic) => topic.slug !== featuredSlug),
};
}
/**
@@ -166,16 +173,17 @@ export function HomePage() {
const requestedKey = optionalString(search.focus);
const requestedState = optionalString(search.state);
const view = usePublicContent(["tech-log", "home"], async (queries) => {
const [focusItems, latestEntries, featuredTopic] = await Promise.all([
const [focusItems, latestEntries, topics] = await Promise.all([
queries.getHomeFocusItems(),
getLatestEntries(queries),
getFeaturedTopic(queries),
getTopics(queries),
]);
return { focusItems, latestEntries, featuredTopic };
return { focusItems, latestEntries, topics };
});
if (!view.ready) return view.fallback;
const { focusItems, latestEntries, featuredTopic } = view.data;
const { focusItems, latestEntries, topics } = view.data;
const featuredTopic = topics.featured;
const availableFocusItems = requestedState === "focus-empty" ? [] : focusItems;
const normalizedKey = normalizeFocus(
requestedKey,
@@ -245,6 +253,22 @@ export function HomePage() {
</li>
))}
</ul>
{/*
나머지 주제. 하나만 펼쳐 두면 그 주제가 이 기록의 전부인 것처럼 보인다 — 실제로
JPA 주제는 최근 기록에 우연히 걸릴 때만 보였고, 무엇을 견줬는지는 홈 어디에서도
닿을 수 없었다. 펼치지는 않는다; 견주는 자리는 한 번에 하나여야 읽힌다.
*/}
{topics.others.length > 0 ? (
<p className="home-other-topics">
<span>다른 주제</span>
{topics.others.map((topic) => (
<Link key={topic.slug} to={`/topics/${topic.slug}`}>
{`${topic.name} (${topic.recordCount})`}
</Link>
))}
</p>
) : null}
</section>
) : null}
@@ -53,7 +53,11 @@ export function TopicVariantPage() {
{/*
머리말은 문서 화면과 같은 것을 쓴다. 자기 것을 따로 만들었더니 breadcrumb 이 규칙을
하나도 못 받아 「탐색/OAuth/OIDC 인증 경계」로 붙어 버렸고 — 주제 이름 안에도 슬래시가
있어 한 덩어리로 읽혔다 — 요약은 각주 크기로 결론 아래에 밀려 있었다.
있어 한 덩어리로 읽혔다.
결론은 여기 두지 않는다. 이 화면이 답하는 것은 「이 접근이 무엇이고 그 기록이 어디
있나」이고, 무엇을 알게 됐는지는 주제 화면의 비교표가 네 축을 나란히 놓고 답한다.
같은 문장을 두 자리에 두면 비교표를 볼 이유가 없어진다.
*/}
<header className="public-document-header">
<nav aria-label="문서 경로">
@@ -66,19 +70,6 @@ export function TopicVariantPage() {
<ProseText text={variant.summary || variant.conclusion} />
</header>
{/*
결론이 이 축의 값어치다. 각주로 흘리지 않고 자기 블록을 준다 — Case 가 결론을 스냅샷
블록에 두는 것과 같은 자리다.
*/}
{variant.conclusion ? (
<section className="variant-conclusion" aria-labelledby="variant-conclusion-title">
<p className="section-kicker" id="variant-conclusion-title">
{`이 ${axisLabel}에서 알게 된 것`}
</p>
<ProseText text={variant.conclusion} />
</section>
) : null}
<div className="public-result-heading">
<h2>{`이 ${axisLabel}의 기록`}</h2>
<p>{`${ordered.length}개`}</p>
@@ -3042,24 +3042,28 @@ textarea.studio-control { min-height: 118px; resize: vertical; line-height: 1.65
word-break: break-word;
}
/*
축이 무엇을 알게 됐는지. Case 의 스냅샷과 같은 시각 언어를 쓰되 한 단이다 — `.document-snapshot`
은 두 칸 격자라 한 칸만 넣으면 글이 화면 반쪽에 갇힌다.
각주로 흘리지 않는 이유: 이 문장이 이 축의 값어치다. 요약은 이것이 무엇인가만 말한다.
홈의 「다른 주제」 한 줄. 비교표는 한 번에 한 주제만 펼치되, 나머지가 있다는 사실과 그리로
가는 길은 남긴다 — 하나만 보이면 그 주제가 이 기록의 전부인 것처럼 읽힌다.
*/
.variant-conclusion {
width: min(100%, var(--body-copy));
max-width: var(--body-copy);
margin: 0 0 56px;
padding: 28px 0 31px;
border-top: 1px solid var(--line-strong);
border-bottom: 1px solid var(--line);
.home-other-topics {
display: flex;
flex-wrap: wrap;
gap: 6px 18px;
margin: 22px 0 0;
color: var(--faint);
font-size: 13px;
}
.variant-conclusion p:not(.section-kicker) {
margin: 11px 0 0;
color: var(--ink-soft);
font-size: 17px;
line-height: 1.75;
.home-other-topics > span {
font-weight: 600;
}
.home-other-topics a {
color: var(--muted);
}
.home-other-topics a:hover {
color: var(--signal);
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB