pageTool plugins with toc and page-index references #77

Closed
opened 2026-07-04 14:52:41 +02:00 by fable-5 · 1 comment
Collaborator

Context

Read-only widgets over page/pond data cover the vision's TOC and page-index examples.

Scope

Implement the pageTool surface: tools panel on the page (list of active pageTool plugins, lazy-loaded iframes) and embeddable as a plugin_block; ship reference plugins toc (renders the outline of the current page via readCurrentPage, click scrolls to heading) and page-index (filtered page list by label via readPond, links navigate); both localized (de/en) via manifest i18n.

Acceptance criteria

  • toc reflects live heading edits (outline updates after persistence debounce)
  • page-index respects the viewer's permissions (restricted fixture test)
  • heading click scrolls; page click navigates via the ui capability
  • both plugins work as panel tools and as embedded blocks

Technical notes

  • plugin-architecture.md §Reference plugins.

Dependencies

Depends on #74, #76.

Size: ~1.5 days


Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add de and en), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.

## Context Read-only widgets over page/pond data cover the vision's TOC and page-index examples. ## Scope Implement the `pageTool` surface: tools panel on the page (list of active pageTool plugins, lazy-loaded iframes) and embeddable as a `plugin_block`; ship reference plugins `toc` (renders the outline of the current page via `readCurrentPage`, click scrolls to heading) and `page-index` (filtered page list by label via `readPond`, links navigate); both localized (de/en) via manifest i18n. ## Acceptance criteria - [ ] toc reflects live heading edits (outline updates after persistence debounce) - [ ] page-index respects the viewer's permissions (restricted fixture test) - [ ] heading click scrolls; page click navigates via the `ui` capability - [ ] both plugins work as panel tools and as embedded blocks ## Technical notes - plugin-architecture.md §Reference plugins. ## Dependencies Depends on #74, #76. **Size**: ~1.5 days --- *Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add `de` **and** `en`), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.*
fable-5 added this to the M7 — Plugins milestone 2026-07-04 14:52:41 +02:00
fable-5 added the
frontend
plugins
labels 2026-07-04 14:52:41 +02:00
Author
Collaborator

Umgesetzt in 0003063 (CI grün, alle 8 Kontexte — der e2e-Job fährt jetzt auch die Packs section-styles [in #75 versäumt], plugin-blocks und page-tools).

Akzeptanzkriterien (e2e page-tools.spec.ts):

  • toc folgt Live-Überschriften-Änderungen (Persistenz-Debounce 2 s + 5-s-Poll des Plugins)
  • page-index respektiert Viewer-Permissions (label-restricted Reader sieht die verbotene Seite nie; Owner sieht beide und kann per Label-Chip filtern)
  • Überschriften-Klick scrollt (neue ui.scrollToHeading-Capability, Host löst Outline-Id → Heading-Position auf), Seiten-Klick navigiert via ui.openPage
  • Beide Plugins laufen als Panel-Tool (lazy gemountete iframes) und als eingebetteter plugin_block

Referenz-Plugins: packages/plugins/toc und packages/plugins/page-index sind echte SDK-Konsumenten (createPlugin + windowTransport), per esbuild gebündelt; i18n de/en wird beim Build inline gebündelt (Sandbox-CSP verbietet Laufzeit-Fetches — die i18n/-Dateien bleiben die Quelle). readPond.listPages liefert jetzt Label-Namen pro Summary (pluginPageSummaries).

Umgesetzt in `0003063` (CI grün, alle 8 Kontexte — der e2e-Job fährt jetzt auch die Packs section-styles [in #75 versäumt], plugin-blocks und page-tools). **Akzeptanzkriterien (e2e `page-tools.spec.ts`):** - [x] toc folgt Live-Überschriften-Änderungen (Persistenz-Debounce 2 s + 5-s-Poll des Plugins) - [x] page-index respektiert Viewer-Permissions (label-restricted Reader sieht die verbotene Seite nie; Owner sieht beide und kann per Label-Chip filtern) - [x] Überschriften-Klick scrollt (neue `ui.scrollToHeading`-Capability, Host löst Outline-Id → Heading-Position auf), Seiten-Klick navigiert via `ui.openPage` - [x] Beide Plugins laufen als Panel-Tool (lazy gemountete iframes) und als eingebetteter plugin_block **Referenz-Plugins:** `packages/plugins/toc` und `packages/plugins/page-index` sind echte SDK-Konsumenten (createPlugin + windowTransport), per esbuild gebündelt; i18n de/en wird beim Build inline gebündelt (Sandbox-CSP verbietet Laufzeit-Fetches — die `i18n/`-Dateien bleiben die Quelle). `readPond.listPages` liefert jetzt Label-Namen pro Summary (`pluginPageSummaries`).
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stwaidele/dorfteich#77
No description provided.