-
Notifications
You must be signed in to change notification settings - Fork 1
feat(settings): add gallery sidebar with cover image selection #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
MOTIVATION: - Users need an easy way to share translations with the community - Current export flow requires manual file management - No clear workflow for updating existing books in the library APPROACH: - Add 'Publish to Library' button to existing export modal - Use File System Access API to pick local git repo folder - Auto-detect existing metadata.json for update vs new scenarios - Auto-compute stats from IndexedDB data CHANGES: - docs/plans/2025-12-28-publish-to-library-design.md: Full design spec 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
MOTIVATION: - Users can now select a cover image in the Gallery panel - The cover needs to flow through to the final EPUB file - EPUB3 spec requires specific cover handling (manifest properties, cover.xhtml) APPROACH: - Add coverImage field to EpubMeta and EpubExportOptions types - Update EPUB packager to handle cover images: - Extract base64 data from cover image - Create cover.xhtml with full-screen cover display - Add cover to manifest with properties="cover-image" - Add cover page to spine (first position) - Add meta name="cover" reference for EPUB2 compatibility - Update exportSlice to fetch cover from Cache API using ImageCacheStore - Convert blob to base64 data URL for embedding in EPUB CHANGES: - services/epubService/types.ts: Added coverImage to EpubMeta and EpubExportOptions - services/epubService/packagers/epubPackager.ts: Full cover image processing - services/epubService.ts: Pass coverImage to packager - store/slices/exportSlice.ts: Fetch cover from ImageCacheStore before export IMPACT: - EPUBs now include cover image when selected in Gallery - Cover displays as first page in e-readers - Graceful fallback if cover fetch fails TESTING: - TypeScript compilation passes - Build succeeds - Settings tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
MOTIVATION: - GalleryPanel and ImageLightbox lacked unit test coverage - Tests ensure component behavior is verified before merging CHANGES: - components/settings/GalleryPanel.test.tsx: 6 tests - Empty state display - Chapter sections with images - Cover status indicator - Collapse/expand functionality - Filtering chapters without images - components/settings/ImageLightbox.test.tsx: 12 tests - Image and info panel rendering - Cover button states - Close button and Escape key - Arrow navigation (buttons and keys) - Wrap-around at boundaries - Set as cover callback - Single image (no arrows) - Backdrop click to close TESTING: - All 18 tests passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
MOTIVATION: - Users confused by "File" and "Load" buttons doing different things - Clicking "Load" with empty input silently did nothing CHANGES: - Rename "📁 File" → "📁 Import" (import from local file) - Rename "Load" → "🔗 Fetch" (fetch from URL) - Disable Fetch button when input is empty - Add dynamic tooltip explaining what each button does IMPACT: - Clearer UX - users understand what each button does - Fetch button visually disabled when no URL entered - Hover tooltips provide additional context 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
Changes
New Components
SettingsSidebar.tsxGalleryPanel.tsxImageLightbox.tsxModified Files
SettingsModal.tsxhooks/useNovelMetadata.tssetCoverImage()functioncomponents/settings/types.tsCoverImageReftypeservices/epubService/types.tscoverImageto exportsservices/epubService/packagers/epubPackager.tsstore/slices/exportSlice.tsTest plan
Screenshots
To be added during review
🤖 Generated with Claude Code