Skip to content

Conversation

@LongCatIsLooong
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong commented Jan 30, 2024

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 Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • 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.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. c: tech-debt Technical debt, code quality, testing, etc. labels Jan 30, 2024
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Thanks for getting this ready! We have not announced any of these yet, so please do not land these until we have done so.

Can you separate the KeepAliveHandle and the InteractiveViewer parts into different PRs?
If there is a customer issue with one, it will end up affecting the other.

// The fontSize to use for computing the heuristic UI scaling factor.
const double defaultFontSize = 14.0;
final double containerScaingFactor = MediaQuery.textScalerOf(context).scale(defaultFontSize) / defaultFontSize;
final double containerScalingFactor = MediaQuery.textScalerOf(context).scale(defaultFontSize) / defaultFontSize;
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like there are some unrelated text scaling changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I was trying to smuggle a typo fix. Will do that in a different PR then.

version: 1
transforms:
# Change made in https://github.com/flutter/flutter/pull/109014
- title: "Migrate to 'panAxis'"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think alignPanAxis = false => PanAxis.free and alignPanAxis = true => PanAxis.aligned.
Dart fix can do this, look for examples with oneOf:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right but alignPanAxis is already a no-op. Converting it to the new parameter changes the current behavior (see the PR description about the other dartfix).

Copy link
Contributor

Choose a reason for hiding this comment

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

It's unfortunate that we did not maintain backwards compatibility during the deprecation period and instead made a hard break going no-op, but the intention is for users to migrate to PanAxis. So we should absolutely provide a fix for this.

/// This method does not call [dispose]. When the handle is not needed
/// anymore, it must be [dispose]d regardless of whether notifying listeners.
@Deprecated(
'Use dispose instead. '
Copy link
Contributor

Choose a reason for hiding this comment

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

If we've told users they should replace this with dispose, we should have a dart fix for it. The original author should be able to confirm. I think it was @dnfield?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

KeepAliveHandle.release and KeepAliveHandle.dispose seem to have different semantics as the latter also releases all resources, and typically shouldn't be called a second time (see the example below). The closer alternative seems to be notifyListeners but it's protected.

handler.release();
handler.dispose();

would be migrated to:

handler.dispose();
handler.dispose();

and the second dispose call is redundant and it's probably going to assert in debug mode.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the motivation to deprecate was that folks were only calling release, and not calling dispose, but this one might be ok without a fix. We typically provide a fix in every case we can. Even if it is not a perfect fix, it helps users get to the final result.

@LongCatIsLooong LongCatIsLooong marked this pull request as draft February 22, 2024 19:12
@LongCatIsLooong LongCatIsLooong changed the title Remove deprecated InteractiveViewer.alignPanAxis and KeepAliveHandle.release Remove deprecated InteractiveViewer.alignPanAxis Feb 23, 2024
@LongCatIsLooong LongCatIsLooong marked this pull request as ready for review February 23, 2024 01:28
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding a fix!

@LongCatIsLooong LongCatIsLooong added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 23, 2024
@auto-submit auto-submit bot merged commit fcd154b into flutter:master Feb 23, 2024
@LongCatIsLooong LongCatIsLooong deleted the deprecation branch February 23, 2024 04:25
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 23, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 23, 2024
flutter/flutter@41581c9...39585e6

2024-02-23 [email protected] Re-enable Impeller goldens blocking. (flutter/flutter#144023)
2024-02-23 [email protected] Roll Flutter Engine from 0f3ad23b84ed to 5f99a6c3289e (16 revisions) (flutter/flutter#144028)
2024-02-23 [email protected] Roll Packages from 078c2a3 to 7df2085 (3 revisions) (flutter/flutter#144030)
2024-02-23 [email protected] Run tests on iOS 17 exclusively (flutter/flutter#144022)
2024-02-23 [email protected] Retry button tap in [FlutterUITests testFlutterViewWarm] (flutter/flutter#143967)
2024-02-23 [email protected] Remove deprecated `InteractiveViewer.alignPanAxis` (flutter/flutter#142500)
2024-02-23 [email protected] Remove deprecated `KeepAliveHandle.release` (flutter/flutter#143961)
2024-02-23 [email protected] Remove deprecated AnimatedListItemBuilder, AnimatedListRemovedItemBuilder (flutter/flutter#143974)
2024-02-23 [email protected] Manual roll Flutter Engine from 06448ee8165f to 0f3ad23b84ed (16 revisions) (flutter/flutter#143989)
2024-02-23 [email protected] Remove deprecated TimelineSummary.writeSummaryToFile (flutter/flutter#143983)
2024-02-23 [email protected] Remove unused drone_dimension field (flutter/flutter#143984)
2024-02-23 [email protected] Remove deprecated MediaQuery.boldTextOverride (flutter/flutter#143960)
2024-02-22 [email protected] Revert engine back to 06448ee8165f4ff6579ef9510ac69322eda896ac (flutter/flutter#143986)
2024-02-22 [email protected] Remove deprecated FlutterDriver.enableAccessibility (flutter/flutter#143979)
2024-02-22 [email protected] Roll Flutter Engine from cb6115d3a6ab to c5d2e011652b (3 revisions) (flutter/flutter#143980)
2024-02-22 [email protected] Revert "Introduce tone-based surfaces and accent color add-ons - Part 2" (flutter/flutter#143973)
2024-02-22 [email protected] Add CloseButtonTooltip to the 'X' button on a SnackBar (flutter/flutter#143934)
2024-02-22 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.24.3 to 3.24.4 (flutter/flutter#143971)
2024-02-22 [email protected] Roll Flutter Engine from 06448ee8165f to cb6115d3a6ab (10 revisions) (flutter/flutter#143972)
2024-02-22 [email protected] Use inlining annotations on important methods for all targets (flutter/flutter#143923)
2024-02-22 [email protected] Add missing `TextPainter.strutStyle` to paragraph style (flutter/flutter#143771)
2024-02-22 [email protected] Shift Moto G4 staging tests to A02s (flutter/flutter#143957)
2024-02-22 [email protected] Add CurvedAnimation disposals in some widgets (flutter/flutter#143790)
2024-02-22 [email protected] Fix documentation typo in basic.dart (flutter/flutter#143887)
2024-02-22 [email protected] Fixed Small Typo in Emulators Test Name (flutter/flutter#143578)
2024-02-22 [email protected] Support using lightweight Flutter Engines to run tests (flutter/flutter#141726)
2024-02-22 [email protected] Roll Flutter Engine from 9250bfdb38c5 to 06448ee8165f (1 revision) (flutter/flutter#143943)
2024-02-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reland Add UI Benchmarks (#143542) (#143799)" (flutter/flutter#143946)
2024-02-22 [email protected] Roll Packages from 48048f6 to 078c2a3 (11 revisions) (flutter/flutter#143935)
2024-02-22 [email protected] Roll Flutter Engine from 7777480eb94d to 9250bfdb38c5 (8 revisions) (flutter/flutter#143933)
2024-02-22 [email protected] Reland Add UI Benchmarks (#143542) (flutter/flutter#143799)

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
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
LouiseHsu pushed a commit to LouiseHsu/packages that referenced this pull request Mar 7, 2024
flutter/flutter@41581c9...39585e6

2024-02-23 [email protected] Re-enable Impeller goldens blocking. (flutter/flutter#144023)
2024-02-23 [email protected] Roll Flutter Engine from 0f3ad23b84ed to 5f99a6c3289e (16 revisions) (flutter/flutter#144028)
2024-02-23 [email protected] Roll Packages from 078c2a3 to 7df2085 (3 revisions) (flutter/flutter#144030)
2024-02-23 [email protected] Run tests on iOS 17 exclusively (flutter/flutter#144022)
2024-02-23 [email protected] Retry button tap in [FlutterUITests testFlutterViewWarm] (flutter/flutter#143967)
2024-02-23 [email protected] Remove deprecated `InteractiveViewer.alignPanAxis` (flutter/flutter#142500)
2024-02-23 [email protected] Remove deprecated `KeepAliveHandle.release` (flutter/flutter#143961)
2024-02-23 [email protected] Remove deprecated AnimatedListItemBuilder, AnimatedListRemovedItemBuilder (flutter/flutter#143974)
2024-02-23 [email protected] Manual roll Flutter Engine from 06448ee8165f to 0f3ad23b84ed (16 revisions) (flutter/flutter#143989)
2024-02-23 [email protected] Remove deprecated TimelineSummary.writeSummaryToFile (flutter/flutter#143983)
2024-02-23 [email protected] Remove unused drone_dimension field (flutter/flutter#143984)
2024-02-23 [email protected] Remove deprecated MediaQuery.boldTextOverride (flutter/flutter#143960)
2024-02-22 [email protected] Revert engine back to 06448ee8165f4ff6579ef9510ac69322eda896ac (flutter/flutter#143986)
2024-02-22 [email protected] Remove deprecated FlutterDriver.enableAccessibility (flutter/flutter#143979)
2024-02-22 [email protected] Roll Flutter Engine from cb6115d3a6ab to c5d2e011652b (3 revisions) (flutter/flutter#143980)
2024-02-22 [email protected] Revert "Introduce tone-based surfaces and accent color add-ons - Part 2" (flutter/flutter#143973)
2024-02-22 [email protected] Add CloseButtonTooltip to the 'X' button on a SnackBar (flutter/flutter#143934)
2024-02-22 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.24.3 to 3.24.4 (flutter/flutter#143971)
2024-02-22 [email protected] Roll Flutter Engine from 06448ee8165f to cb6115d3a6ab (10 revisions) (flutter/flutter#143972)
2024-02-22 [email protected] Use inlining annotations on important methods for all targets (flutter/flutter#143923)
2024-02-22 [email protected] Add missing `TextPainter.strutStyle` to paragraph style (flutter/flutter#143771)
2024-02-22 [email protected] Shift Moto G4 staging tests to A02s (flutter/flutter#143957)
2024-02-22 [email protected] Add CurvedAnimation disposals in some widgets (flutter/flutter#143790)
2024-02-22 [email protected] Fix documentation typo in basic.dart (flutter/flutter#143887)
2024-02-22 [email protected] Fixed Small Typo in Emulators Test Name (flutter/flutter#143578)
2024-02-22 [email protected] Support using lightweight Flutter Engines to run tests (flutter/flutter#141726)
2024-02-22 [email protected] Roll Flutter Engine from 9250bfdb38c5 to 06448ee8165f (1 revision) (flutter/flutter#143943)
2024-02-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reland Add UI Benchmarks (#143542) (#143799)" (flutter/flutter#143946)
2024-02-22 [email protected] Roll Packages from 48048f6 to 078c2a3 (11 revisions) (flutter/flutter#143935)
2024-02-22 [email protected] Roll Flutter Engine from 7777480eb94d to 9250bfdb38c5 (8 revisions) (flutter/flutter#143933)
2024-02-22 [email protected] Reland Add UI Benchmarks (#143542) (flutter/flutter#143799)

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
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 14, 2024
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 c: tech-debt Technical debt, code quality, testing, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants