Skip to content

OCTO-11559 - #409

Merged
OlteanuRares merged 1 commit into
mainfrom
OCTO-11559
Aug 10, 2026
Merged

OCTO-11559 #409
OlteanuRares merged 1 commit into
mainfrom
OCTO-11559

Conversation

@OlteanuRares

@OlteanuRares OlteanuRares commented Aug 10, 2026

Copy link
Copy Markdown
Contributor
  • Fix 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 unchanged
  • Fix Size.from_string() rejecting negative values like "-5%" by adding optional minus sign to the regex
  • Add VW/VH viewport units to UnitEnum so DFXP files with tts:origin="10vw 10vh" parse without error; as_percentage_of() converts them to % so they never leak into output
  • DFXP writer now relativizes the language-level layout_info (div region), fixing duplicate regions in output

Test 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%
  • Origins below thresholds still get extent adjustment (regression guard)
  • Non-percent units (VW/VH) bypass fit_to_screen without crash
  • VTT position:95% line:95% → DFXP writer → DFXP reader round-trip succeeds
  • DFXP with tts:extent="80vw 50vh" reads without error, writes as % with relativize

@OlteanuRares
OlteanuRares requested a review from a team as a code owner August 10, 2026 14:26
@github-actions

Copy link
Copy Markdown

🟢 PR Compliance Review

Risk Level: LOW

  • Compliance Issues: 0 (0 critical)
  • Regressions: 0

SAFE TO MERGE - No critical issues found

Full report available in workflow artifacts

@OlteanuRares
OlteanuRares merged commit 351313e into main Aug 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants