Skip to content

Add a Download button to the output dialogs#21

Open
namedgraph wants to merge 1 commit into
masterfrom
feature/output-downloads
Open

Add a Download button to the output dialogs#21
namedgraph wants to merge 1 commit into
masterfrom
feature/output-downloads

Conversation

@namedgraph

Copy link
Copy Markdown
Member

Source and Extract RDF now offer their output as a file download — content.xhtml (application/xhtml+xml) and content.rdf (application/rdf+xml).

  • local:show-output gains optional filename/media-type params; the Download button appears only when a caller passes them (the lint issues modal doesn't, so it stays view-only).
  • The download is fully client-side: the shown text becomes a Blob, clicked through an ephemeral object-URL anchor — no server endpoint, so it works on static hosting including GitHub Pages.
  • Tests: editor.mjs captures both downloads via Playwright's download event and asserts filename + byte-identical content against the dialog text; features.mjs asserts the lint modal hides the button. All 15 suites pass.

Stacked on #20 (feature/canonical-xml-c14n) — the view-source call site is shared.

🤖 Generated with Claude Code

Source and Extract RDF now offer the shown text as a file download
(content.xhtml / content.rdf): local:show-output takes optional
filename/media-type params and reveals the button only when a caller
passes them - the lint modal doesn't, so it keeps the plain view.
The download is a client-side Blob clicked through an ephemeral
object-URL anchor, so it works on any static hosting (gh-pages
included).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Base automatically changed from feature/canonical-xml-c14n to master July 14, 2026 22:41
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