2 Commits
Author SHA1 Message Date
zemion 8cbab781bf Release v0.1.16
Module Package Release / publish-packages (push) Successful in 12s
2026-08-05 19:52:06 +02:00
zemion 2d18ecc9b6 feat: document contextual and temporal help 2026-08-05 00:03:32 +02:00
7 changed files with 86 additions and 13 deletions
+7
View File
@@ -70,6 +70,13 @@ cd /mnt/DATA/git/govoplan
Feature content remains in the owning module. Docs indexes and renders the Feature content remains in the owning module. Docs indexes and renders the
contributions without importing feature implementations. contributions without importing feature implementations.
Pressing `F1` resolves the focused field or action first, then its containing
dialog or section, current page, and owning module. The shell sends the focused
context together with `fallback_context` and `module`; Docs selects the first
visible exact, page-level, or module-level topic after applying audience and
permission filtering. Modules announce exact route and control identities in
static topic `metadata.help_contexts`.
Capabilities can provide generic documentation without exposing their runtime Capabilities can provide generic documentation without exposing their runtime
provider implementation: provider implementation:
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@govoplan/docs-webui", "name": "@govoplan/docs-webui",
"version": "0.1.15", "version": "0.1.16",
"private": true, "private": true,
"type": "module", "type": "module",
"main": "webui/src/index.ts", "main": "webui/src/index.ts",
@@ -17,7 +17,7 @@
"README.md" "README.md"
], ],
"peerDependencies": { "peerDependencies": {
"@govoplan/core-webui": "^0.1.15", "@govoplan/core-webui": "^0.1.16",
"lucide-react": "^1.23.0", "lucide-react": "^1.23.0",
"react": ">=19.2.7 <20", "react": ">=19.2.7 <20",
"react-dom": ">=19.2.7 <20", "react-dom": ">=19.2.7 <20",
+3 -3
View File
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "govoplan-docs" name = "govoplan-docs"
version = "0.1.15" version = "0.1.16"
description = "GovOPlaN documentation module for configured-system, available, and evidence documentation." description = "GovOPlaN documentation module for configured-system, available, and evidence documentation."
readme = "README.md" readme = "README.md"
requires-python = ">=3.12" requires-python = ">=3.12"
authors = [{ name = "GovOPlaN" }] authors = [{ name = "GovOPlaN" }]
dependencies = [ dependencies = [
"govoplan-core>=0.1.15", "govoplan-core>=0.1.16",
"govoplan-access>=0.1.15", "govoplan-access>=0.1.16",
] ]
[tool.setuptools.packages.find] [tool.setuptools.packages.find]
+1 -1
View File
@@ -2,4 +2,4 @@
__all__ = ["__version__"] __all__ = ["__version__"]
__version__ = "0.1.15" __version__ = "0.1.16"
+65 -2
View File
@@ -84,7 +84,7 @@ def _route_factory(context: ModuleContext):
manifest = ModuleManifest( manifest = ModuleManifest(
id="docs", id="docs",
name="Docs", name="Docs",
version="0.1.15", version="0.1.16",
required_capabilities=( required_capabilities=(
CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PRINCIPAL_RESOLVER,
CAPABILITY_AUTH_PERMISSION_EVALUATOR, CAPABILITY_AUTH_PERMISSION_EVALUATOR,
@@ -263,6 +263,69 @@ manifest = ModuleManifest(
], ],
}, },
), ),
DocumentationTopic(
id="docs.pattern.contextual-help",
title="Context-sensitive help",
summary="Press F1 on a page, field, action, or dialog to open help for the current interface context.",
body=(
"GovOPlaN first resolves help for the focused field or action, then its dialog or section, "
"the current page, and the owning module. Exact documentation is shown when available; "
"otherwise the page or module documentation is used. The titlebar help button opens the "
"current page context. Documentation remains filtered by the current account's audience, "
"permissions, and configured modules."
),
layer="always",
documentation_types=("admin", "user"),
audience=("user", "tenant_admin", "operator", "module_admin"),
order=21,
i18n_key="docs.topic.pattern.contextual_help",
links=(
DocumentationLink(
label="Contextual help contract",
href="govoplan-core/docs/CONTEXTUAL_HELP_CONTRACT.md",
kind="repository",
),
),
metadata={
"kind": "pattern",
"pattern_id": "contextual-f1-help",
"help_contexts": [
"core.contextual-help",
"core.titlebar.language",
],
"component_refs": [
"govoplan-core/webui/src/layout/HelpMenu.tsx",
"govoplan-core/webui/src/utils/helpContext.ts",
],
},
),
DocumentationTopic(
id="docs.reference.temporal-data-context",
title="Temporal data context",
summary="Choose whether pages show currently valid records, records valid at a selected time, or all valid-time states.",
body=(
"The titlebar calendar controls valid time across participating modules. Current is the neutral "
"default. At time selects records valid at the chosen instant, while All includes historical and "
"future valid-time states. Recorded time remains separate: it describes when the platform learned "
"or stored a fact. Permissions are evaluated now, so temporal selection never restores historical access."
),
layer="always",
documentation_types=("admin", "user"),
audience=("user", "tenant_admin", "operator", "module_admin"),
order=22,
i18n_key="docs.topic.reference.temporal_data_context",
links=(
DocumentationLink(
label="Temporal data read contract",
href="govoplan-core/docs/TEMPORAL_DATA_CONTEXT.md",
kind="repository",
),
),
metadata={
"kind": "reference",
"help_contexts": ["core.temporal-data-context"],
},
),
DocumentationTopic( DocumentationTopic(
id="docs.reference.organization-identity-idm-access-boundary", id="docs.reference.organization-identity-idm-access-boundary",
title="Organization, identity, IDM, and access boundary", title="Organization, identity, IDM, and access boundary",
@@ -278,7 +341,7 @@ manifest = ModuleManifest(
documentation_types=("admin", "user"), documentation_types=("admin", "user"),
audience=("tenant_admin", "access_admin", "operator", "user"), audience=("tenant_admin", "access_admin", "operator", "user"),
related_modules=("organizations", "identity", "idm", "access"), related_modules=("organizations", "identity", "idm", "access"),
order=21, order=23,
conditions=( conditions=(
DocumentationCondition( DocumentationCondition(
required_modules=("organizations", "identity", "idm", "access"), required_modules=("organizations", "identity", "idm", "access"),
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@govoplan/docs-webui", "name": "@govoplan/docs-webui",
"version": "0.1.15", "version": "0.1.16",
"private": true, "private": true,
"type": "module", "type": "module",
"main": "src/index.ts", "main": "src/index.ts",
@@ -13,7 +13,7 @@
} }
}, },
"peerDependencies": { "peerDependencies": {
"@govoplan/core-webui": "^0.1.15", "@govoplan/core-webui": "^0.1.16",
"lucide-react": "^1.23.0", "lucide-react": "^1.23.0",
"react": ">=19.2.7 <20", "react": ">=19.2.7 <20",
"react-dom": ">=19.2.7 <20", "react-dom": ">=19.2.7 <20",
+6 -3
View File
@@ -857,9 +857,12 @@ function selectedPageFromSearch(search: string, pages: DocsPageNode[]): DocsPage
if (requested) return pages.find((page) => page.id === requested) ?? pages[0]; if (requested) return pages.find((page) => page.id === requested) ?? pages[0];
const helpContext = params.get("context") || ""; const helpContext = params.get("context") || "";
if (helpContext) { if (helpContext) {
const exact = pages.find((page) => page.kind === "topic" && metadataList(page.topic.metadata, "help_contexts").includes(helpContext)); const fallbackContext = params.get("fallback_context") || "";
if (exact) return exact; for (const contextId of [helpContext, fallbackContext].filter(Boolean)) {
const moduleId = helpContextModuleId(helpContext); const exact = pages.find((page) => page.kind === "topic" && metadataList(page.topic.metadata, "help_contexts").includes(contextId));
if (exact) return exact;
}
const moduleId = params.get("module") || helpContextModuleId(fallbackContext || helpContext);
const moduleTopic = pages.find((page) => page.kind === "topic" && page.topic.source_module_id === moduleId); const moduleTopic = pages.find((page) => page.kind === "topic" && page.topic.source_module_id === moduleId);
if (moduleTopic) return moduleTopic; if (moduleTopic) return moduleTopic;
} }