Uh oh!
There was an error while loading. Please reload this page.
[two_dimensional_scrollables] trailing pinned row/col for TableView - #11519
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for trailing pinned columns and rows in the TableView widget, including updates to the render viewport, delegates, and associated tests. The feedback identifies several issues with the layout and clipping logic where alignment offsets were either omitted or incorrectly applied, potentially leading to misaligned cells or incorrect clipping when the table is not top-left aligned within the viewport.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…r#185897) flutter/packages@cde5b36...daf30f8 2026-04-30 mdebbar@google.com [url_launcher_web] Re-enable flaky test (not flaky anymore) (flutter/packages#11478) 2026-04-30 stuartmorgan@google.com [in_app_purchase] Switch to Kotlin Pigeon (flutter/packages#11608) 2026-04-29 katelovett@google.com [two_dimensional_scrollables] Fix mouse event loop when calling setState in TableSpan.onEnter (flutter/packages#11606) 2026-04-29 katelovett@google.com [two_dimensional_scrollables] trailing pinned row/col for TableView (flutter/packages#11519) 2026-04-29 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Tear down ProxyAPIRegistrar in `applicationWillTerminate` (flutter/packages#11567) 2026-04-29 stuartmorgan@google.com [google_maps_flutter] Replace use of zIndex in examples and tests (flutter/packages#11572) 2026-04-29 stuartmorgan@google.com [tool] Remove --against-pub flag (flutter/packages#11550) 2026-04-29 47866232+chunhtai@users.noreply.github.com [ci] Update branch management for batch release (flutter/packages#11575) 2026-04-29 spkhalad@gmail.com [webview_flutter] Platform implementations for getCookies flutter#11037 (flutter/packages#11386) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com 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
…lutter#11519) This PR implements the requested feature to allow pinning rows and columns to the trailing edges of the TableView (bottom and right in LTR). Previously, only leading pinning was supported. This implementation allows for use cases such as a "delete" button pinned to the right of every row, or a summary footer pinned to the bottom of the table. - Added trailingPinnedRowCount and trailingPinnedColumnCount to TableView.builder, TableView.list, and their associated delegates (TableCellBuilderDelegate, TableCellListDelegate). - Updated RenderTableViewport to calculate and track extents for trailing pinned spans. The indices for these spans are calculated from the end of the specified rowCount or columnCount. - Extended layoutChildSequence in RenderTableViewport to handle all 9 regions of the resulting grid (intersections of leading-pinned, regular, and trailing-pinned rows/columns). - Updated the paint method to correctly clip and layer trailing pinned areas, ensuring they stay at the viewport edges and that regular content scrolls underneath them correctly. - Adjusted maxScrollExtent calculations to account for both leading and trailing pinned extents, ensuring the scrollable area is correctly sized. - Updated the table alignment logic to correctly position the entire table (including pinned areas) when it is smaller than the viewport. Technical Details - Trailing pinned elements are logically positioned based on the viewport dimension minus their cumulative extent. - Merged cells are supported within trailing pinned areas, with safety assertions to ensure they do not span across pinned and unpinned boundaries. - The implementation maintains compatibility with existing leading pinning and supports various combinations of both. Fixesflutter/flutter#133238 [Design Doc](https://docs.google.com/document/d/1TYqmQFot4TcwiddQdNW6YHeO0F_89nqTYOZOgrULJRw/edit?usp=sharing) ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). 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. [^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.
This PR implements the requested feature to allow pinning rows and columns to the trailing edges of the TableView (bottom and right in LTR). Previously, only leading pinning was supported.
This implementation allows for use cases such as a "delete" button pinned to the right of every row, or a summary footer pinned to the bottom of the table.
Technical Details
Fixesflutter/flutter#133238
Design Doc
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