fix(ui): align contextual documentation with headings
Verified with the coordinated workspace changes by devkit full run 2026-09-08T225814-186389-0000-3e3ed7cd (all seven phases passed). This shared UI pass does not mark the individual module reviews complete.
This commit is contained in:
@@ -146,7 +146,7 @@ export default function WikiPage({ settings, auth }: PlatformRouteContext) {
|
||||
<FilterBar as="form" surface="control" wrap="never" width="default" className="wiki-search" onSubmit={submitSearch}><Search size={17} aria-hidden="true" /><input value={query} onChange={(event) => setQuery(event.target.value)} aria-label="Search Wiki pages" placeholder="Search pages in this space" /><Button type="submit" variant="primary">Search</Button></FilterBar>
|
||||
<label className="wiki-space-picker"><span>Space</span><select value={selectedSpaceId} onChange={(event) => setSelectedSpaceId(event.target.value)}>{spaces.map((space) => <option key={space.space_id} value={space.space_id}>{space.title}</option>)}</select></label>
|
||||
<span className="wiki-count">{pages.length} pages</span>
|
||||
</>} helpAction={<DocumentationHelpLink reference={{ topicId: "wiki.workflow.author-publish", documentationType: "user" }} label="Open Wiki documentation" />} createAction={<div className="wiki-create-actions">
|
||||
</>} title="Wiki" titleLevel={1} titleHelp={<DocumentationHelpLink reference={{ topicId: "wiki.workflow.author-publish", documentationType: "user" }} label="Open Wiki documentation" />} createAction={<div className="wiki-create-actions">
|
||||
{canAdmin && <Button type="button" onClick={() => { setDialogError(""); setSpaceDialog("new"); }} interfaceId="wiki.action.create-space"><Plus size={16} /> New space</Button>}
|
||||
{canWrite && selectedSpace && <Button type="button" variant="primary" onClick={() => { setDialogError(""); setPageDialog("new"); }} interfaceId="wiki.action.create-page"><FilePlus2 size={16} /> New page</Button>}
|
||||
</div>} />
|
||||
@@ -181,7 +181,7 @@ export default function WikiPage({ settings, auth }: PlatformRouteContext) {
|
||||
function WikiDetail({ record, revisions, comments, canWrite, canPublish, canComment, saving, onEdit, onPublish, onAddLink, onRemoveLink, onHistory, onComment, onArchive }: { record: WikiPageRecord; revisions: WikiRevision[]; comments: WikiComment[]; canWrite: boolean; canPublish: boolean; canComment: boolean; saving: boolean; onEdit: () => void; onPublish: () => void; onAddLink: () => void; onRemoveLink: (id: string) => Promise<void>; onHistory: () => void; onComment: (body: string) => Promise<void>; onArchive: () => void }) {
|
||||
const [comment, setComment] = useState("");
|
||||
return <article className="wiki-detail" data-interface-id="wiki.section.page">
|
||||
<header className="wiki-detail-header"><div><span className="wiki-eyebrow">{record.path} · revision {record.revision}</span><h1>{record.title}</h1><p>{record.summary}</p></div><div className="wiki-badges"><StatusBadge status={stateTone(record.state)} label={humanize(record.state)} /><StatusBadge status={record.effective_visibility === "restricted" ? "attention" : "neutral"} label={humanize(record.effective_visibility)} /></div></header>
|
||||
<header className="wiki-detail-header"><div><span className="wiki-eyebrow">{record.path} · revision {record.revision}</span><h2>{record.title}</h2><p>{record.summary}</p></div><div className="wiki-badges"><StatusBadge status={stateTone(record.state)} label={humanize(record.state)} /><StatusBadge status={record.effective_visibility === "restricted" ? "attention" : "neutral"} label={humanize(record.effective_visibility)} /></div></header>
|
||||
<div className="wiki-detail-actions" aria-label="Wiki page actions">
|
||||
{canWrite && record.state !== "archived" && <Button type="button" onClick={onEdit} interfaceId="wiki.action.edit"><Pencil size={16} /> Edit</Button>}
|
||||
{canWrite && record.state !== "archived" && <Button type="button" onClick={onAddLink}><Link2 size={16} /> Add reference</Button>}
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
import type { PlatformTranslations } from "@govoplan/core-webui";
|
||||
|
||||
/** Module-owned translations for contextual headings. */
|
||||
export const generatedTranslations: PlatformTranslations = {
|
||||
en: {
|
||||
"Wiki": "Wiki",
|
||||
},
|
||||
de: {
|
||||
"Wiki": "Wiki",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { createElement, lazy } from "react";
|
||||
import type { PlatformWebModule } from "@govoplan/core-webui";
|
||||
import { generatedTranslations } from "./i18n/generatedTranslations";
|
||||
import "./styles/wiki.css";
|
||||
|
||||
|
||||
const WikiPage = lazy(() => import("./features/wiki/WikiPage"));
|
||||
|
||||
export const wikiModule: PlatformWebModule = {
|
||||
translations: generatedTranslations,
|
||||
id: "wiki",
|
||||
label: "Wiki",
|
||||
version: "0.1.20",
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
.wiki-space-header h2,
|
||||
.wiki-space-header p,
|
||||
.wiki-detail-header h1,
|
||||
.wiki-detail-header h2,
|
||||
.wiki-detail-header p,
|
||||
.wiki-section h2,
|
||||
.wiki-section p,
|
||||
@@ -125,7 +125,7 @@
|
||||
border-block-end: 1px solid var(--border-subtle);
|
||||
}
|
||||
|
||||
.wiki-detail-header h1 {
|
||||
.wiki-detail-header h2 {
|
||||
margin-block-start: var(--space-1);
|
||||
font-size: var(--font-size-2xl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user