Repository navigation
feat: landscape page layout for wide views - #582
Merged
Merged
Conversation
transitrix
force-pushed
the
methodology/540-landscape-pages
branch
2 times, most recently
from
September 2, 2026 21:09
150ccd2 to
e445cd1
Compare
Adds automatic detection and CSS generation for wide views (width > height), applying landscape page layout without manual class assignment. - Extend generatePagedMediaCss() to accept view specifications - Detect wide views and generate `page: landscape` CSS rules - Sanitize view IDs for safe CSS identifier generation - Add 9 new comprehensive tests for landscape page handling Landscape pages use correct A4 rotated dimensions (842 × 595 pt) with adjusted margins. Running footer adapts to landscape page width. Acceptance criteria: - Wide views automatically use landscape pages ✓ - Portrait views stay portrait ✓ - Page size correctly declared (landscape A4: 842 x 595 pt) ✓ - Layout is stable across renders ✓ Signed-off-by: transitrix <automation@transitrix.com>
transitrix
force-pushed
the
methodology/540-landscape-pages
branch
from
September 2, 2026 21:23
e445cd1 to
0b6132d
Compare
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.
Summary
Implements automatic detection and CSS generation for wide views, applying landscape page layout without manual CSS class assignment.
What's new
Wide view detection in CSS generation:
generatePagedMediaCss(metadata)to accept view specifications with width/height dimensionswidth > heightand automatically appliespage: landscapeCSS ruleLandscape page handling:
Tests:
Architecture
Wide view detection happens at CSS generation time:
generatePagedMediaCss()width > height) and generates CSS selectorsidautomatically render on landscape pagesIntegration example
Acceptance criteria met
✓ Wide views automatically use landscape pages
✓ Portrait views stay portrait
✓ Page size correctly declared (landscape A4: 842 × 595 pt)
✓ Layout is stable across renders
Part of larger work
This implements automatic landscape page detection for wide diagram views:
Testing
cd packages/document-renderer node tests/test_paged_media_css.mjs