Repository navigation
[pointer_interceptor] Adopt code-excerpts for README - #12641
auto-submit[bot] merged 22 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request adopts code-excerpt for the pointer_interceptor README's Dart snippets, moving the code examples into a new compilable file readme_excerpts.dart and updating the package version to 0.10.1+3. Additionally, it adds Swift unit tests to quick_actions_ios for setting shortcut items with multiple items or without an icon, and to url_launcher_ios for handling Safari view controller launch failures with invalid URLs. There are no review comments, and no feedback is provided.
915b93e to
1060435
Compare
Replaces the hand-written Dart snippets in the README with <?code-excerpt?> pragmas backed by example/lib/readme_excerpts.dart, so they're validated against compilable, analyzed source instead of being free-hand text (one of them had a stray trailing comma that made it invalid Dart). Also drops the package's ci_config.yaml, whose only purpose was opting it out of that validation. Part of flutter/flutter#102679. FPOCTSMP-9
…hange Converts the NEXT section into a real release since the README change needs to be published, and bumps pubspec.yaml to match.
9d49a6e to
44956cf
Compare
There was a problem hiding this comment.
Code Review
This pull request adopts code-excerpt for the pointer_interceptor package's README Dart snippets. It adds a new file readme_excerpts.dart containing compilable Dart snippets, updates the README to reference these excerpts, removes the exempt_from_excerpts configuration, and bumps the package version to 0.10.1+3. There are no review comments, and I have no feedback to provide.
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. 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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
No NEED for tests since it is just a plain documentation |
stuartmorgan-g
left a comment
There was a problem hiding this comment.
documentation-only change: the new readme_excerpts.dart is validated by dart analyze/dart format
This verifies that the code compiles, but there's no reason not to add very simple unit tests that call the source methods and verify that they return the expected element; this verifies that the code actually runs. While it's not going to catch issues very often, it's trivial to add, and there are cases where it could matter (e.g., imagine an example that accidentally shows a call with arguments that aren't actually valid, and throws an ArgumentError).
Per review feedback on the README code-excerpts PR: - Trims the WrapButton/WrapSubtree/InterceptingAfter excerpts back down to look like the original hand-written examples, by reopening each docregion around the ElevatedButton/Drawer arguments (eliding them to "// ..." like local_auth's README already does) and moving the enclosing `return`/`;` outside the extracted region. InterceptingBefore keeps its `return`s, since the if/else structure is the point of that example, but gets the same argument elision. - Adds example/test/readme_excerpts_test.dart, which actually pumps each snippet through a widget tree and asserts on the result, so the excerpts are verified to run correctly, not just compile.
Replaces the hand-written Dart snippets in `quick_actions`'s README with `<?code-excerpt?>` pragmas backed by `example/lib/readme_excerpts.dart`, so they're validated against compilable, analyzed source instead of free-hand text (the original used an untyped callback parameter and `print()`, which the repo's lint rules disallow). Also drops the package's `ci_config.yaml`, whose only purpose was opting it out of that validation. Follows the same pattern as #12641 ([pointer_interceptor] Adopt code-excerpts for README). Part of #102679. ## Pre-Review Checklist ## Test plan [^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. **Note**: The Flutter team is currently trialing [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from `gemini-code-assist[bot]` aren't authoritative Flutter-team feedback; I'll wait for a human reviewer's guidance on which automated comments (if any) should be addressed.
Replaces the hand-written Dart snippets in `quick_actions`'s README with `<?code-excerpt?>` pragmas backed by `example/lib/readme_excerpts.dart`, so they're validated against compilable, analyzed source instead of free-hand text (the original used an untyped callback parameter and `print()`, which the repo's lint rules disallow). Also drops the package's `ci_config.yaml`, whose only purpose was opting it out of that validation. Follows the same pattern as flutter#12641 ([pointer_interceptor] Adopt code-excerpts for README). Part of #102679. ## Pre-Review Checklist ## Test plan [^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. **Note**: The Flutter team is currently trialing [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from `gemini-code-assist[bot]` aren't authoritative Flutter-team feedback; I'll wait for a human reviewer's guidance on which automated comments (if any) should be addressed.
Replaces the hand-written Dart snippets in `quick_actions`'s README with `<?code-excerpt?>` pragmas backed by `example/lib/readme_excerpts.dart`, so they're validated against compilable, analyzed source instead of free-hand text (the original used an untyped callback parameter and `print()`, which the repo's lint rules disallow). Also drops the package's `ci_config.yaml`, whose only purpose was opting it out of that validation. Follows the same pattern as flutter#12641 ([pointer_interceptor] Adopt code-excerpts for README). Part of #102679. ## Pre-Review Checklist ## Test plan [^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. **Note**: The Flutter team is currently trialing [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from `gemini-code-assist[bot]` aren't authoritative Flutter-team feedback; I'll wait for a human reviewer's guidance on which automated comments (if any) should be addressed.
The excerpt validator (`readme_validator.dart`) only requires `<?code-excerpt?>` management for **Dart** code blocks, so the README's Java/Groovy/XML/sh snippets are left untouched. The one Dart block — the `test_driver/` script — used the deprecated `flutter_driver` `enableFlutterDriverExtension()` API, which no longer has a real, compilable counterpart in this repo now that the example app migrated to the `integration_test` package. Points the excerpt at the example's actual `test_driver/integration_test.dart` (`integrationDriver()`) instead, and updates the surrounding prose and the `./gradlew` command to match the real filename. Also drops the package's `ci_config.yaml`, whose only purpose was opting it out of that validation. Follows the same pattern as #12641 ([pointer_interceptor] Adopt code-excerpts for README) and #12643 ([quick_actions] Adopt code-excerpts for README). Part of flutter/flutter#102679. ## Pre-Review Checklist ## Test plan [^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. **Note**: The Flutter team is currently trialing [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from `gemini-code-assist[bot]` aren't authoritative Flutter-team feedback; I'll wait for a human reviewer's guidance on which automated comments (if any) should be addressed.
…r#192876) flutter/packages@bebbb57...c2b58e1 2026-09-15 [email protected] [local_auth] Convert implementation to Kotlin (flutter/packages#12635) 2026-09-15 [email protected] [pigeon] Treat NSNull as null for non-null Flutter API returns (flutter/packages#12531) 2026-09-15 [email protected] [espresso] Adopt code-excerpts for README (flutter/packages#12644) 2026-09-15 [email protected] [pointer_interceptor] Adopt code-excerpts for README (flutter/packages#12641) 2026-09-15 [email protected] [ci] Checks unmerged batch release sync back before next release (flutter/packages#12868) 2026-09-15 [email protected] [material_ui] Add sortIconBuilder to DataTable, PaginatedDataTable, and DataTableThemeData (flutter/packages#12645) 2026-09-15 [email protected] [cross_file_platform_interface] Platform interface implementation of `cross_file` (flutter/packages#12825) 2026-09-15 [email protected] [cross_file] Move cross_file into a federated cross_file directory (flutter/packages#12869) If this roll has caused a breakage, revert this CL and set the roller to dry run mode using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [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
Replaces the hand-written Dart snippets in
pointer_interceptor's README with<?code-excerpt?>pragmas backed by a newexample/lib/readme_excerpts.dart, so the README's examples are validated against compilable, analyzed source (update-excerpts --fail-on-change) instead of free-hand text. One of the previous snippets was actually invalid Dart (a stray trailing comma), which this now catches. Also removes the package'sci_config.yaml, whose only content wasexempt_from_excerpts: true, now that the excerpt validation actually runs and passes.Part of flutter/flutter#102679.
Pre-Review Checklist
[shared_preferences]0.10.1+3).///). — not applicable, no public API surface changed.readme_excerpts.dartis validated bydart analyze/dart formatand theupdate-excerpts --fail-on-changecheck itself, which is the point of this change; no runtime behavior changed.Test plan
dart run script/tool/bin/flutter_plugin_tools.dart update-excerpts --fail-on-change --packages pointer_interceptordart run script/tool/bin/flutter_plugin_tools.dart validate --packages pointer_interceptor/pointer_interceptor(excerpt validation now runs, not skipped)dart run script/tool/bin/flutter_plugin_tools.dart analyze --packages pointer_interceptor/pointer_interceptordart format --output=none --set-exit-if-changedon the new source fileNote: The Flutter team is currently trialing Gemini Code Assist for GitHub. Comments from
gemini-code-assist[bot]aren't authoritative Flutter-team feedback; I'll wait for a human reviewer's guidance on which automated comments (if any) 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. ↩