OCTO-11559 - #409
Merged
Merged
Conversation
…t negative sizes and viewport units
🟢 PR Compliance ReviewRisk Level: LOW
SAFE TO MERGE - No critical issues found Full report available in workflow artifacts |
panasicov
approved these changes
Aug 10, 2026
lorandvarga
approved these changes
Aug 10, 2026
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.
fit_to_screen()producing negative/zero extent when origin is at or beyond 90% horizontal / 95% vertical — adds an early-return guard that preserves the layout unchangedSize.from_string()rejecting negative values like"-5%"by adding optional minus sign to the regexVW/VHviewport units toUnitEnumso DFXP files withtts:origin="10vw 10vh"parse without error;as_percentage_of()converts them to%so they never leak into outputlayout_info(div region), fixing duplicate regions in outputTest plan
Size.from_string("-5%")→Size(-5, PERCENT)Size.from_string("-2.5px")→Size(-2.5, PIXEL)Size.from_string("80vw")→Size(80, VW)Size.from_string("50vh")→Size(50, VH)fit_to_screen()returns layout unchanged when origin.x >= 90% or origin.y >= 95%fit_to_screenwithout crashposition:95% line:95%→ DFXP writer → DFXP reader round-trip succeedstts:extent="80vw 50vh"reads without error, writes as%with relativize