fix: 주제가 없는 기록이 죽은 링크를 달지 않게 한다
주제 없이 게시된 기록이 있는데, 화면이 그것을 모르고 `/topics/` 로 가는 이름 없는 링크를 만들고 있었다 — 문서 머리말의 breadcrumb 과 탐색의 「주제 없음」 묶음 둘 다. 프로젝트 조각은 처음부터 조건부였는데 주제 쪽만 아니었다. 관계 목록의 제목도 기본값으로 옮긴다. 부르는 쪽마다 적게 했더니 다섯 자리 중 둘만 고쳐졌고, 같은 목록이 화면에 따라 두 이름으로 나왔다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ
This commit is contained in:
co-authored by
Claude Opus 5
parent
b89a54feb6
commit
23efcf095c
@@ -45,7 +45,9 @@ export function publicRenderModelBase(
|
||||
주제 셋만 열어 두어 나머지가 404 였기 때문이다 — 그 목록이 없어졌으므로 이제 어떤
|
||||
주제든 자기 화면이 있다.
|
||||
*/
|
||||
publicPath: `/topics/${encodeURIComponent(record.topicSlug)}`,
|
||||
publicPath: record.topicSlug
|
||||
? `/topics/${encodeURIComponent(record.topicSlug)}`
|
||||
: null,
|
||||
},
|
||||
project: {
|
||||
id: `project-${record.projectSlug}`,
|
||||
|
||||
@@ -73,10 +73,13 @@ export function ExplorePage() {
|
||||
{/*
|
||||
주제 이름은 그 주제 화면으로 가는 링크다. 목록에서 한 주제가 눈에 들면 그 주제가
|
||||
무엇에 답하는지로 바로 갈 수 있어야 한다.
|
||||
|
||||
주제가 없는 기록도 한 묶음으로 모이는데, 그쪽은 갈 곳이 없다 — 링크로 만들면
|
||||
`/topics/` 라는 죽은 주소가 된다.
|
||||
*/}
|
||||
<div className="public-result-heading">
|
||||
<h3>
|
||||
<Link to={`/topics/${group.slug}`}>{group.name}</Link>
|
||||
{group.slug ? <Link to={`/topics/${group.slug}`}>{group.name}</Link> : group.name}
|
||||
</h3>
|
||||
<p>{`${group.records.length}개`}</p>
|
||||
</div>
|
||||
|
||||
+6
-2
@@ -24,8 +24,12 @@ export type PublicRelation = Readonly<{
|
||||
|
||||
export function PublicDocumentRelations({
|
||||
relations,
|
||||
kicker = "Relations",
|
||||
title = "이 기록과 연결된 맥락",
|
||||
/*
|
||||
기본값이 곧 이 목록의 뜻이다. 부르는 쪽마다 제목을 적게 했더니 다섯 자리 중 둘만 고쳐졌고,
|
||||
같은 목록이 화면에 따라 「이 기록과 연결된 맥락」과 「다음에 읽을 것」 두 이름으로 나왔다.
|
||||
*/
|
||||
kicker = "Next",
|
||||
title = "다음에 읽을 것",
|
||||
}: {
|
||||
relations: ReadonlyArray<PublicRelation>;
|
||||
kicker?: string;
|
||||
|
||||
+12
-12
@@ -76,8 +76,16 @@ function ModelDocumentHeader({
|
||||
<header className="public-document-header">
|
||||
<nav aria-label="문서 경로">
|
||||
<Link to={explorePath(model.kind)}>{DOCUMENT_KIND_LABELS[model.kind]}</Link>
|
||||
<span aria-hidden="true">/</span>
|
||||
<TargetLink target={model.topic} />
|
||||
{/*
|
||||
주제가 없는 기록도 있다. 이름 없는 조각이 `/topics/` 로 가는 죽은 링크로 남았었다 —
|
||||
프로젝트 조각은 처음부터 조건부였는데 주제 쪽만 아니었다.
|
||||
*/}
|
||||
{model.topic.label ? (
|
||||
<>
|
||||
<span aria-hidden="true">/</span>
|
||||
<TargetLink target={model.topic} />
|
||||
</>
|
||||
) : null}
|
||||
{model.project ? (
|
||||
<>
|
||||
<span aria-hidden="true">/</span>
|
||||
@@ -217,11 +225,7 @@ function CaseDocument({
|
||||
blocks={model.bodyBlocks}
|
||||
resolveEvidenceAsset={resolveEvidenceAsset}
|
||||
/>
|
||||
<PublicDocumentRelations
|
||||
relations={publicRelations(model.relations)}
|
||||
kicker="Next"
|
||||
title="다음에 읽을 것"
|
||||
/>
|
||||
<PublicDocumentRelations relations={publicRelations(model.relations)} />
|
||||
</article>
|
||||
<DocumentToc headings={headings} variant="desktop" />
|
||||
</div>
|
||||
@@ -296,11 +300,7 @@ function ConceptDocument({
|
||||
blocks={model.bodyBlocks}
|
||||
resolveEvidenceAsset={resolveEvidenceAsset}
|
||||
/>
|
||||
<PublicDocumentRelations
|
||||
relations={publicRelations(model.relations)}
|
||||
kicker="Next"
|
||||
title="다음에 읽을 것"
|
||||
/>
|
||||
<PublicDocumentRelations relations={publicRelations(model.relations)} />
|
||||
</article>
|
||||
<DocumentToc headings={headings} variant="desktop" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user