fix(landing): demo viewer renders documents like the real app - #14
Merged
Conversation
The demo's document viewer showed every file type as the same monospace text dump. It now mirrors view.js's type-specific rendering: - PDFs open in the paged viewer — controls bar (Previous / Next, zoom 50-200%, "Page: 1 / N"), a brief loading flash, and a white "paper" page typeset with the document's content (finance docs get real tables), with working page navigation and zoom. - Word docs render as a typeset white page with the zoom control. - Markdown renders as rich text (headings, lists, code) matching the app's markdown-content styling. - ZIM/Wikipedia articles render as actual wiki-style pages with an infobox (reusing the CSS-art thumbnails), matching how the app shows them via iframe. - Plain text and spreadsheets keep the extracted-text view — which is exactly what the real app does for those types. All styles mirror view.css (.pdf-viewer/.pdf-controls/.docx-* values); page content generation is deterministic so paging never flickers.
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 demo's document viewer previously showed every file type as the same monospace text dump. It now mirrors
view.js's type-specific rendering:Styles mirror
view.css(.pdf-viewer/.pdf-controls/.docx-*values). Verified in-browser: 15/15 functional checks (controls, paging bounds, zoom transform, tables, md/article/image/pre branches), zero console errors.🤖 Generated with Claude Code