fix: stabilize Toolbox navigation layout

This commit is contained in:
2026-07-23 01:10:18 +02:00
parent a058858b50
commit c296281f89
12 changed files with 750 additions and 251 deletions

View File

@@ -5,7 +5,7 @@ tools. An app always works by itself. When it receives a trusted same-origin
catalog URL, the same app gains a toolbox home link and an app switcher without
becoming coupled to a portal or client-side router.
Version `0.2.0` contains three publish-ready packages:
Version `0.2.1` contains three publish-ready packages:
- `@add-ideas/toolbox-contract` — types, strict v1 runtime parsing, context
discovery/loading, resolved URLs, and contextual link helpers.
@@ -167,13 +167,26 @@ import "@add-ideas/toolbox-shell-react/styles.css";
</AppShell>;
```
The shell always renders a centered app identity, version, derived privacy
facts, standard Help and source controls, Personalize, Apps, manifest actions,
and legacy `appActions`. With valid context it additionally renders the catalog
brand/home and available app destinations. Destinations are ordinary links, so
switching performs full-page navigation. On missing, cross-origin, invalid, or
unavailable context the shell quietly remains usable in standalone mode;
`onContextError` is optional observability.
The shell's fixed top row renders Personalize, Apps, source, and Help controls
in that order, a geometrically centered text identity, and the Toolbox
brand/home at the far right. Personalize and Apps have labeled desktop controls
and retain their accessible names when compact. The mutually exclusive popovers
close on Escape, outside interaction, and link selection.
`AppShell` moves version, derived privacy facts, manifest actions, and legacy
`appActions` into its standard footer, keeping the top row stable in connected
and standalone modes. With valid context it supplies the catalog home, favicon,
and available app destinations. Destinations are ordinary links, so switching
performs full-page navigation. On missing, cross-origin, invalid, or unavailable
context the shell quietly remains usable in standalone mode; `onContextError` is
optional observability.
For a custom portal-style header, `ToolboxHeader` accepts `personalizeContent`
for content hosted inside the shared controlled popover and `brandIconUrl` for
the Toolbox mark. `onPersonalize` remains available for callback-only
integrations. The deprecated `iconUrl`, `leadingActions`, and `metadata` props
are retained for source compatibility; the centered app icon is intentionally no
longer rendered.
CSS custom properties prefixed with `--toolbox-` are the v1 theme surface. The
user's `light`, `dark`, or `system` preference is shared with same-origin apps