Skip to content

feat: add FormatTabs multi-format viewer#2

Merged
eddie-knight merged 1 commit into
mainfrom
feat/format-tabs
Jun 3, 2026
Merged

feat: add FormatTabs multi-format viewer#2
eddie-knight merged 1 commit into
mainfrom
feat/format-tabs

Conversation

@eddie-knight

Copy link
Copy Markdown
Contributor

Add a headless, client-only FormatTabs component to the interactive subpath: a tabbed viewer that pairs a consumer-supplied Preview node with code-block tabs for an artifact's machine-readable projections (OSCAL, Markdown, SARIF).

Conversions are produced by go-gemara server-side and passed in as strings; the component does no fetching or conversion, preserving the package's decoupled + headless contracts. Implements the ARIA tabs pattern with automatic activation and Arrow/Home/End keyboard nav.

DOM ids and selection are keyed by tab position (useId + index), so the ARIA wiring stays valid under duplicate tab ids; dev-mode warnings flag duplicate ids, an unmatched defaultTabId, and a missing accessible name.

Add a headless, client-only FormatTabs component to the interactive subpath:
a tabbed viewer that pairs a consumer-supplied Preview node with code-block
tabs for an artifact's machine-readable projections (OSCAL, Markdown, SARIF).

Conversions are produced by go-gemara server-side and passed in as strings;
the component does no fetching or conversion, preserving the package's
decoupled + headless contracts. Implements the ARIA tabs pattern with
automatic activation and Arrow/Home/End keyboard nav.

DOM ids and selection are keyed by tab position (useId + index), so the ARIA
wiring stays valid under duplicate tab ids; dev-mode warnings flag duplicate
ids, an unmatched defaultTabId, and a missing accessible name.

Signed-off-by: Eddie Knight <knight@linux.com>
@eddie-knight eddie-knight merged commit d3d3608 into main Jun 3, 2026
4 checks passed
@eddie-knight eddie-knight deleted the feat/format-tabs branch June 22, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant