Skip to content

Conversation

@chunhtai
Copy link
Contributor

@chunhtai chunhtai commented Apr 12, 2023

deprecates the these strings since they are now moved into widgetslocalizations

migration guide https://github.com/flutter/website/pull/8543/files

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.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Apr 12, 2023
@chunhtai
Copy link
Contributor Author

@Piinks I can't think of a way to write dart fixes.

I think there are two cases

MaterialLocalizations.of(context).reorderItemToStart

to

WidgetsLocalizations.of(context).reorderItemToStart
final MaterialLocalizations localizations = MaterialLocalizations.of(context);

localizations.reorderItemToStart;
localizations.expandedIconTapHint;

to

final MaterialLocalizations localizations = MaterialLocalizations.of(context);
final WidgetsLocalizations widgetsLocalizations = WidgetsLocalizations.of(context);

widgetsLocalizations.reorderItemToStart;
localizations.expandedIconTapHint;

I don't think 2 is possible given there may be a lot of corner cases.

but even for 1, I am not sure how to correctly capture it

@chunhtai chunhtai requested a review from Piinks April 12, 2023 22:39
@chunhtai chunhtai marked this pull request as ready for review April 12, 2023 22:41
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.

I agree, this one is difficult to reliably capture with dart fix, but simple enough with a migration guide.
You may be able to fix case 1 by using replacedBy, this dart fix feature has not been used a lot, but was added for this case.

The .of method of MaterialLocalizations would be replacedBy WidgetsLocalizations.

Probably like:

# Changes made in https://github.com/flutter/flutter/pull/124711
  - title: "Migrate to ..."
    date: ...
    element:
      uris: [ ...]
      method: 'of'
      inClass: 'MaterialLocalizations'
    changes:
      - kind: 'replacedBy'
        newElement:
          uris: [ ...]
          method: 'of'
          inClass: 'WidgetLocalizations'

@chunhtai
Copy link
Contributor Author

For case one, I need to make sure they are accessing the deprecating string after the .of(context). For example

MaterialLocalizations.of(context).reorderItemToStart

Is there a condition API for this?

@Piinks
Copy link
Contributor

Piinks commented Apr 13, 2023

Oh right! 🤦‍♀️
This one always gets me.

Nope, dart fix cannot do this. We just examined this with the window deprecations.

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 since it is not dart fixable. In that case, we should definitely add a simple migration guide to the website.

Also, I am surprised the bot did not ask for tests. I reached out in the infra channel to see if the bot is ok or OOO. ;)

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2023
@auto-submit auto-submit bot merged commit 7424f34 into flutter:master Apr 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 17, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 18, 2023
Manual roll requested by [email protected]

flutter/flutter@50171bb...15cb1f8

2023-04-17 [email protected] Fix Chip highlight color isn't drawn on top of the background color (flutter/flutter#124673)
2023-04-17 [email protected] Deprecates string for reorderable list in material_localizations (flutter/flutter#124711)
2023-04-17 [email protected] Fix a null crash in SelectableRegion Widget  (flutter/flutter#124736)
2023-04-17 [email protected] Customize color and thickness of connected lines in Stepper.dart (flutter/flutter#122485)
2023-04-17 [email protected] Roll Flutter Engine from 30e1c4308213 to b2d07388ceb6 (7 revisions) (flutter/flutter#124987)
2023-04-17 [email protected] Remove token permissions for coverage. (flutter/flutter#124909)
2023-04-17 [email protected] Roll Packages from e4ec155 to 0277f2a (9 revisions) (flutter/flutter#124972)
2023-04-17 [email protected] Roll Flutter Engine from 360ca05311c8 to 30e1c4308213 (3 revisions) (flutter/flutter#124963)
2023-04-17 [email protected] Roll Flutter Engine from 4a998b73a2df to 360ca05311c8 (2 revisions) (flutter/flutter#124952)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
sfshaza2 added a commit to flutter/website that referenced this pull request Apr 20, 2023
flutter/flutter#124711


## Presubmit checklist
- [ ] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [ ] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [ ] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/master/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.

---------

Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
Co-authored-by: Anthony Sansone <[email protected]>
Co-authored-by: Khanh Nguyen <[email protected]>
atsansone added a commit to flutter/website that referenced this pull request Apr 21, 2023
flutter/flutter#124711


## Presubmit checklist
- [ ] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [ ] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [ ] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/master/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.

---------

Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
Co-authored-by: Anthony Sansone <[email protected]>
Co-authored-by: Khanh Nguyen <[email protected]>
@reidbaker reidbaker mentioned this pull request Apr 21, 2023
8 tasks
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
Manual roll requested by [email protected]

flutter/flutter@50171bb...15cb1f8

2023-04-17 [email protected] Fix Chip highlight color isn't drawn on top of the background color (flutter/flutter#124673)
2023-04-17 [email protected] Deprecates string for reorderable list in material_localizations (flutter/flutter#124711)
2023-04-17 [email protected] Fix a null crash in SelectableRegion Widget  (flutter/flutter#124736)
2023-04-17 [email protected] Customize color and thickness of connected lines in Stepper.dart (flutter/flutter#122485)
2023-04-17 [email protected] Roll Flutter Engine from 30e1c4308213 to b2d07388ceb6 (7 revisions) (flutter/flutter#124987)
2023-04-17 [email protected] Remove token permissions for coverage. (flutter/flutter#124909)
2023-04-17 [email protected] Roll Packages from e4ec155 to 0277f2a (9 revisions) (flutter/flutter#124972)
2023-04-17 [email protected] Roll Flutter Engine from 360ca05311c8 to 30e1c4308213 (3 revisions) (flutter/flutter#124963)
2023-04-17 [email protected] Roll Flutter Engine from 4a998b73a2df to 360ca05311c8 (2 revisions) (flutter/flutter#124952)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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 f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants