[two_dimensional_scrollables] Fix span border decorations in flipped cross axes#11334
[two_dimensional_scrollables] Fix span border decorations in flipped cross axes#11334auto-submit[bot] merged 6 commits intoflutter:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request fixes an issue where TableSpan borders were flipped when one or both axis directions were reversed. The fix involves introducing a crossAxisDirection parameter to SpanDecorationPaintDetails and updating the SpanBorder.paint method to use this new parameter for accurate border rendering. The RenderTableViewport and RenderTreeViewport classes were updated to pass the appropriate cross-axis direction. A new test case was added to verify the fix for a reversed horizontal axis. The reviewer suggests adding an additional test case for a row span with a reversed vertical axis to improve test coverage.
packages/two_dimensional_scrollables/test/table_view/table_span_test.dart
Show resolved
Hide resolved
Oh good call! I will add the regression test references, thanks! |
Fixes flutter/flutter#177117
Fixes an issue in two_dimensional_scrollables where TableSpan vertical borders were incorrectly flipped when ScrollableDetails.horizontal was reversed.
The SpanBorder.paint method previously used its own axisDirection to determine leading and trailing edge flipping for a cross-axis border component. This works in natural scrolling directions, but creates an inverted orientation assumption when the perpendicular axis is reversed.
Does not affect TreeView, since that widget does not allow for reversed axes.
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
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.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2