Skip to content

[two_dimensional_scrollables] Fix pinned cells hit test - #13376

Merged
auto-submit[bot] merged 7 commits into
flutter:mainfrom
nurullahturkoglu:fix/table-pinned-hit-test-186876
Nov 2, 2026
Merged

auto-submit[bot] merged 7 commits into
flutter:mainfrom
nurullahturkoglu:fix/table-pinned-hit-test-186876

Conversation

@nurullahturkoglu

@nurullahturkoglu nurullahturkoglu commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

This picks up #11777 by @beroso, which was closed while review comments were still open. It keeps the original commits and adds one on top.

TableView hit-tested each cell against its full rect, so a regular cell scrolled under a trailing pinned row or column could take taps meant for the pinned cell, like a menu button in a pinned last column. The change from #11777 limits each cell's hit test to the viewport band of its own section (leading pinned, regular or trailing pinned) and accounts for the alignment offsets.

My commit adds the tests asked for in review: reversed vertical axis, both axes reversed, a vertically reversed table with alignment, and RTL with directional alignment. It also disposes the scroll controllers in the hit test tests, which failed leak tracking once it was enabled for this package in #11653. The CHANGELOG entry uses the suggested wording.

Without the change in table.dart, six of the twelve hit test tests fail, including the two new reversed-axis ones. The alignment and RTL tests pass either way, since they cover the alignment offset case raised in review.

On Flutter 3.47.6 stable, flutter test passes for the package (182 tests) and the hit test group also passes with --platform chrome. flutter analyze and the repo tool's validate report no issues.

Fixes flutter/flutter#186876

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 the p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package label Oct 22, 2026

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

Copy link
Copy Markdown
Contributor

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 resolves an issue where trailing pinned cells in TableView lost hit tests to underlying non-pinned cells by validating hit test positions against the section's clip rect. The review feedback suggests optimizing this check to perform direct coordinate comparisons instead of allocating Rect objects on every iteration, which improves hit-testing performance.

@loic-sharma
loic-sharma requested a review from Piinks October 27, 2026 20:41

@Piinks Piinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for picking this up, adding the remaining reversed-axis and RTL test coverage, and cleaning up the controller disposals! LGTM.

@Piinks Piinks added the CICD Run CI/CD label Nov 2, 2026

@AbdeMohlbi AbdeMohlbi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SGTM

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 2, 2026
@auto-submit
auto-submit Bot merged commit f895ad5 into flutter:main Nov 2, 2026
13 checks passed
RamyAkin pushed a commit to RamyAkin/flutter that referenced this pull request Nov 3, 2026
flutter/packages@3f34a6f...1df8447

2026-11-03 [email protected] [webview_flutter] Convert iOS impl
example app to Swift (flutter/packages#13538)
2026-11-03 [email protected] [material_ui]
Temporarily exclude material_ui from non-Wasm web unit tests
(flutter/packages#13537)
2026-11-02 [email protected] [material_ui]
Removes list semantics in some a11y_assessment samples
(flutter/packages#13257)
2026-11-02 [email protected] [material_ui] Use named uniforms
instead of setFloat in InkSparkle (flutter/packages#13445)
2026-11-02 [email protected] [VPAT] Fix contrast and reflow in
three a11y_assessments demos (flutter/packages#13409)
2026-11-02 [email protected]
[two_dimensional_scrollables] Fix pinned cells hit test
(flutter/packages#13376)
2026-11-02 [email protected] [tool] Let the OS pick a port for
chromedriver and wait for exit (flutter/packages#13355)
2026-11-02 [email protected] [vector_graphics] Draw <text> under an RTL ambient
direction (flutter/packages#13408)
2026-11-02 [email protected] [VPAT] Keep a11y_assessments
snackbars open until closed (flutter/packages#13451)
2026-11-02 [email protected] [pigeon] Fix race in event channel
handler removal integration test (flutter/packages#13528)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[two_dimensional_scrollables] TableView trailing pinned columns lose hit tests to underlying cells

4 participants