Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[two_dimensional_scrollables] Fix pinned row painting when one axis is reversed #5187

Merged
merged 5 commits into from
Oct 27, 2023

Conversation

Piinks
Copy link
Contributor

@Piinks Piinks commented Oct 19, 2023

Fixes flutter/flutter#136897

There are a bunch of changes out for TableView right now, so I will update the changelog/pubspec when I have a better idea of which ones are landing before this.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@@ -803,7 +803,7 @@ class RenderTableViewport extends RenderTwoDimensionalViewport {
axisDirectionIsReversed(horizontalAxisDirection)
? 0.0
: _pinnedColumnsExtent,
axisDirectionIsReversed(horizontalAxisDirection)
axisDirectionIsReversed(verticalAxisDirection)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alas! A typo from #5038 😅

Copy link
Member

Choose a reason for hiding this comment

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

Ups, and I didn't catch it in my review 😝

Thanks for adding a test for this case!

@Piinks
Copy link
Contributor Author

Piinks commented Oct 26, 2023

Version override: I have two other PRs out. Will update the version to include all of them in one release.

@Piinks Piinks added the override: no versioning needed Override the check requiring version bumps for most changes label Oct 26, 2023
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -803,7 +803,7 @@ class RenderTableViewport extends RenderTwoDimensionalViewport {
axisDirectionIsReversed(horizontalAxisDirection)
? 0.0
: _pinnedColumnsExtent,
axisDirectionIsReversed(horizontalAxisDirection)
axisDirectionIsReversed(verticalAxisDirection)
Copy link
Member

Choose a reason for hiding this comment

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

Ups, and I didn't catch it in my review 😝

Thanks for adding a test for this case!

@@ -1365,10 +1365,11 @@ void main() {

testWidgets('paint rects are correct when reversed and pinned',
(WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/135386
Copy link
Member

Choose a reason for hiding this comment

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

nit: want to maybe move this to line 1422 where the actual regression test for this begins to keep the context? The first few things in the test are unrelated, right?

Or maybe we should just have a file that contains all the screenshot tests as a separate test case and the whole file gets the comment that it should be deleted and migrated to mock_canvas once available? It seems like this text case is getting pretty large and I am afraid we will miss cases when we migrate the monolith over to mock_canvas...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I must've missed this in the merge. I added links to each issue this test was covering for that very reason to have references for the rewrite. Let me go find them again

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 27, 2023
@auto-submit auto-submit bot merged commit 64ae77f into flutter:main Oct 27, 2023
79 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 30, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 30, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 30, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 31, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 31, 2023
flutter/packages@2af6954...c9fec61

2023-10-31 stuartmorgan@google.com [image_picker] Prevent multiple active calls on iOS (flutter/packages#5272)
2023-10-30 34871572+gmackall@users.noreply.github.com [in_app_purchase_android] Add missing response code to BillingResponse enum (flutter/packages#5120)
2023-10-30 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.4 to 2.22.5 (flutter/packages#5263)
2023-10-30 john@johnmccutchan.com Bump play-service-maps dependency from version 18.1.0 to 18.2.0 (flutter/packages#5243)
2023-10-30 engine-flutter-autoroll@skia.org Roll Flutter from a4ec627 to e12d1a7 (3 revisions) (flutter/packages#5267)
2023-10-30 43054281+camsim99@users.noreply.github.com [camerax] Loosen restrictions of fallback strategies for choosing resolutions (flutter/packages#5239)
2023-10-30 stuartmorgan@google.com [pigeon] Don't wrap non-nullable primitives in Obj-C (flutter/packages#5214)
2023-10-30 1838962+tatsuyafujisaki@users.noreply.github.com [flutter_lints] Replace "flutter pub add --dev" with "dev:" (flutter/packages#5260)
2023-10-28 engine-flutter-autoroll@skia.org Roll Flutter from 5907c97 to a4ec627 (18 revisions) (flutter/packages#5255)
2023-10-27 hrkadam.92@gmail.com [go_router] Fixes deep-link with no path on cold start (flutter/packages#5113)
2023-10-27 katelovett@google.com [two_dimensional_scrollables] Fix pinned row painting when one axis is reversed (flutter/packages#5187)
2023-10-27 engine-flutter-autoroll@skia.org Roll Flutter from c555599 to 5907c97 (45 revisions) (flutter/packages#5252)

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,rmistry@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
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Oct 31, 2023
flutter/packages@2af6954...c9fec61

2023-10-31 stuartmorgan@google.com [image_picker] Prevent multiple active calls on iOS (flutter/packages#5272)
2023-10-30 34871572+gmackall@users.noreply.github.com [in_app_purchase_android] Add missing response code to BillingResponse enum (flutter/packages#5120)
2023-10-30 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.4 to 2.22.5 (flutter/packages#5263)
2023-10-30 john@johnmccutchan.com Bump play-service-maps dependency from version 18.1.0 to 18.2.0 (flutter/packages#5243)
2023-10-30 engine-flutter-autoroll@skia.org Roll Flutter from a4ec627 to e12d1a7 (3 revisions) (flutter/packages#5267)
2023-10-30 43054281+camsim99@users.noreply.github.com [camerax] Loosen restrictions of fallback strategies for choosing resolutions (flutter/packages#5239)
2023-10-30 stuartmorgan@google.com [pigeon] Don't wrap non-nullable primitives in Obj-C (flutter/packages#5214)
2023-10-30 1838962+tatsuyafujisaki@users.noreply.github.com [flutter_lints] Replace "flutter pub add --dev" with "dev:" (flutter/packages#5260)
2023-10-28 engine-flutter-autoroll@skia.org Roll Flutter from 5907c97 to a4ec627 (18 revisions) (flutter/packages#5255)
2023-10-27 hrkadam.92@gmail.com [go_router] Fixes deep-link with no path on cold start (flutter/packages#5113)
2023-10-27 katelovett@google.com [two_dimensional_scrollables] Fix pinned row painting when one axis is reversed (flutter/packages#5187)
2023-10-27 engine-flutter-autoroll@skia.org Roll Flutter from c555599 to 5907c97 (45 revisions) (flutter/packages#5252)

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,rmistry@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
HugoOlthof pushed a commit to moneybird/packages that referenced this pull request Dec 13, 2023
…s reversed (flutter#5187)

Fixes flutter/flutter#136897

There are a bunch of changes out for TableView right now, so I will update the changelog/pubspec when I have a better idea of which ones are landing before this.
@reidbaker reidbaker mentioned this pull request Jan 12, 2024
auto-submit bot pushed a commit that referenced this pull request Jan 22, 2024
… are reversed (#5916)

Fixes flutter/flutter#141704

This fixes the rect computation for TableSpanDecorations when one or both axes are reversed.
We previously fixed similar issues when the clipRects applied to areas of the table did not account for reversed. This is another similar case.
- #5187
- #5038

![image](https://github.com/flutter/packages/assets/16964204/ae7c6872-c740-4617-95a4-8302a3085d59)
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 override: no versioning needed Override the check requiring version bumps for most changes p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package
Projects
None yet
2 participants