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

[ios_platform_images] Adopt code-excerpts #5682

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

stuartmorgan
Copy link
Contributor

Replaces the Dart example code with a code excerpt.

Part of flutter/flutter#102679

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.

Replaces the Dart example code with a code excerpt.

Part of flutter/flutter#102679
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@text-exemption-reviewers" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@stuartmorgan
Copy link
Contributor Author

test-exempt: code refactor with no semantic change

Copy link
Contributor

@tarrinneal tarrinneal left a comment

Choose a reason for hiding this comment

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

optional nit

}
<?code-excerpt "example/lib/main.dart (Usage)"?>
```dart
// "flutter" is a resource in Assets.xcassets.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should rename the asset rather than explain the name with a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What would we name it that wouldn't require an explanation of where the asset lives?

Copy link
Contributor

Choose a reason for hiding this comment

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

"asset"?

Copy link
Contributor

Choose a reason for hiding this comment

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

or something more descriptive

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the context of Flutter code, an asset is usually a Flutter asset, which is a similar concept but in Flutter-land (specifically, in pubspec.yaml) rather than Xcode-project-land; that's why there's a comment explaining it precisely. I guess we could name it 'assetFromAssets.xcassets', but I think that's harder to read than the comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

Whatever you think is best, that's why it's optional :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't come up with anything that I find clearer than the comment, so I'll land as-is.

@@ -28,17 +28,20 @@ class _MyAppState extends State<MyApp> {

@override
Widget build(BuildContext context) {
// #docregion Usage
// "flutter" is a resource in Assets.xcassets.
Copy link
Contributor

Choose a reason for hiding this comment

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

same

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 14, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 14, 2023
Copy link
Contributor

auto-submit bot commented Dec 14, 2023

auto label is removed for flutter/packages/5682, due to - The status or check suite Windows_x64 dart_unit_tests_shard_1 master has failed. Please fix the issues identified (or deflake) before re-applying this label.

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 14, 2023
@auto-submit auto-submit bot merged commit d30bdd9 into flutter:main Dec 14, 2023
79 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 15, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Dec 15, 2023
flutter/packages@1151191...3f2e16b

2023-12-15 [email protected] Swap some iOS package CODEOWNERS (flutter/packages#5667)
2023-12-14 [email protected] [in_app_purchase_storekit]add storekit configuration to the example app (flutter/packages#5411)
2023-12-14 [email protected] [camera_platform_interface] Adds support for setting the image file format (flutter/packages#5593)
2023-12-14 [email protected] [path_provider_android] Re-enable getExternalStorageDirectories test (flutter/packages#5668)
2023-12-14 [email protected] [go_router] fix(docs): typo in example extra_codec.dart (flutter/packages#5570)
2023-12-14 [email protected] [ios_platform_images] Adopt code-excerpts (flutter/packages#5682)
2023-12-14 [email protected] [camera] Fix typo "intialize" in doc comments (flutter/packages#4949)
2023-12-14 [email protected] Roll Flutter from 11a9cb7 to a51e33a (30 revisions) (flutter/packages#5680)
2023-12-14 [email protected] [two_dimensional_scrollables] Post 3.16 stable tech debt clean up (flutter/packages#5671)

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 [email protected],[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
@reidbaker reidbaker mentioned this pull request Jan 12, 2024
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
Replaces the Dart example code with a code excerpt.

Part of flutter/flutter#102679
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 p: ios_platform_images
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants