Skip to content

fix(svg): exclude direction isolates from label width - #16

Merged
whale-devx merged 1 commit into
mainfrom
fix/rtl-label-width
Nov 21, 2026
Merged

whale-devx merged 1 commit into
mainfrom
fix/rtl-label-width

Conversation

@whale-devx

Copy link
Copy Markdown
Owner

Change

An Arabic step with 58 visible columns passed the generator until the author isolated an inline command-line flag. The directional characters made the measured width 60, so the CLI rejected the label. The renderer now omits the four Unicode direction-isolate characters when checking the visible text and keeps them in the SVG. The guide includes a JSON example. A label containing only isolates and spaces is rejected.

Rendered comparison

In Edge 157.0.4341.60 on Windows, the plain text of --output appeared visually as output-- in Arabic and Hebrew step details. Left-to-right isolate (U+2066) and pop directional isolate (U+2069) preserved --output across both themes and the 360 px and 1280 px viewports. Eight plain and eight isolated cases were measured from the positions of the individual SVG characters. The version identifier API v2.1 retained its order in all 16 cases. All measured labels fit inside the SVG and clear of their step markers. These were browser checks on local generated assets. Native-language review and assistive-technology testing remain open.

Tests

The 58-column regression failed on f223281. On the candidate, the exact Arabic label was accepted in both generated themes and an extra visible column was rejected. All 135 tests passed on disconnected Linux. Windows passed 133 tests and skipped two. The strict translation audit reported zero issues in 21 documents. The five checked-in English and Thai assets reproduced byte for byte.

Related to #10. W3C guidance on bidi controls in plain text

@whale-devx whale-devx added this to the Beta readiness milestone Nov 21, 2026
@whale-devx
whale-devx merged commit 9ba31d6 into main Nov 21, 2026
6 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.

1 participant