Skip to content

[two_dimensional_scrollables] Fix span border decorations in flipped cross axes#11334

Merged
auto-submit[bot] merged 6 commits intoflutter:mainfrom
Piinks:twoD-177117
Mar 25, 2026
Merged

[two_dimensional_scrollables] Fix span border decorations in flipped cross axes#11334
auto-submit[bot] merged 6 commits intoflutter:mainfrom
Piinks:twoD-177117

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Mar 23, 2026

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

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-assist bot 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

  1. 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

@github-actions github-actions bot added p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package triage-framework Should be looked at in framework triage labels Mar 23, 2026
@Piinks Piinks added CICD Run CI/CD and removed p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package triage-framework Should be looked at in framework triage labels Mar 23, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions bot added p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package triage-framework Should be looked at in framework triage labels Mar 23, 2026
@Piinks Piinks added CICD Run CI/CD and removed CICD Run CI/CD labels Mar 23, 2026
@Piinks Piinks added CICD Run CI/CD and removed CICD Run CI/CD labels Mar 23, 2026
Copy link
Contributor

@AbdeMohlbi AbdeMohlbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM, do we need to link to the issue from that test ie: test for issue177777 for example ?

@Piinks
Copy link
Contributor Author

Piinks commented Mar 23, 2026

SGTM, do we need to link to the issue from that test ie: test for issue177777 for example ?

Oh good call! I will add the regression test references, thanks!

@Piinks Piinks added autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD and removed autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD labels Mar 23, 2026
@auto-submit auto-submit bot merged commit 5a51924 into flutter:main Mar 25, 2026
81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[two_dimensional_scrollables] TableSpan vertical borders are flipped when ScrollableDetails.horizontal is reversed

2 participants