Add Comic Book Builder preview mode and shareable HTML export - #47
Merged
Merged
Conversation
Copilot created this pull request from a session on behalf of
driver727-pixel
June 4, 2026 13:58
View session
driver727-pixel
marked this pull request as ready for review
June 4, 2026 14:12
There was a problem hiding this comment.
Pull request overview
Adds an in-app “Preview” reading flow for Comic Book Builder projects and introduces a shareable standalone HTML export path (alongside existing JSON export), enabling page-by-page review and easy sharing of completed comics.
Changes:
- Added
buildComicHtmlDocument()HTML document generator with user-content escaping and panel/dialogue rendering. - Introduced a new Preview tab UI (
ComicPreview) to review pages/panels (including placeholders for unfinished panels). - Expanded export UI to support JSON export, HTML export, and native share (with download fallback), plus new preview/export styling.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/features/comic-builder/export-html.ts | New standalone HTML builder for comic previews, including escaping and styling. |
| src/features/comic-builder/export-html.test.ts | Vitest coverage for HTML generation and escaping behavior. |
| src/features/comic-builder/components/ComicPreview.tsx | New Preview tab component to render pages/panels and dialogue overlays in-app. |
| src/features/comic-builder/ComicBuilderStudio.tsx | Adds Preview tab, HTML export + share actions, and refactors download logic. |
| src/features/comic-builder/comic-builder.css | Adds preview/export layout styles for the new UI sections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+21
to
+28
| function downloadBlob(blob: Blob, filename: string) { | ||
| const url = URL.createObjectURL(blob); | ||
| const anchor = document.createElement("a"); | ||
| anchor.href = url; | ||
| anchor.download = filename; | ||
| anchor.click(); | ||
| URL.revokeObjectURL(url); | ||
| } |
Comment on lines
+205
to
+206
| downloadBlob(file, file.name); | ||
| setExportMessage("Native sharing is unavailable here, so the preview HTML was downloaded instead."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Comic Book Builder could generate panels and export raw project JSON, but it did not provide a read-through preview of the comic or a simple artifact for sharing completed work. This change adds an in-app preview flow and a standalone HTML export/share path.
Preview-first reading flow
Shareable comic output
Export generation
UI updates