Repository navigation
Add regression tests for WidgetSpan ordering in bidirectional text - #193894
molchanovia wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds comprehensive tests to verify that logical placeholder and WidgetSpan order is preserved during bidirectional text layout, reflow, and direction changes. The feedback suggests removing redundant type annotations in loop variables across several test files to leverage Dart's type inference. Additionally, it recommends rounding vertical coordinates to integers when grouping lines by their top position to avoid fragile floating-point comparisons.
Cover mixed Latin, Cyrillic, Hebrew, and Arabic text in LTR and RTL paragraphs, including nested spans, direction changes, soft wrapping, and explicit line breaks. Verify visual ordering, logical placeholder identity, selection geometry, text hit testing, and widget tap targets. Related to flutter#54400. Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2085166 to
8af4f0a
Compare
|
Thanks for adding these tests, but from the looks of it, the fix is on skia side so I think the tests should live there an run on their CI? |
@LongCatIsLooong I was simply planning to close the relevant issue, and I decided to add the tests as proof of the work done. If you think the tests are sufficient, let's just close this PR and the issue. |
Adds regression coverage for the Skia placeholder ordering fix associated
with #54400.
The tests verify that bidi reordering preserves the correspondence between
each WidgetSpan and its logical placeholder, selection box, and hit target.
Coverage includes:
Related to #54400.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.