Skip to content

[ Widget Preview ] Refactor the flutter widget-preview command #170467

New issue

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

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

Already on GitHub? # to your account

Merged
merged 3 commits into from
Jun 12, 2025

Conversation

bkonyi
Copy link
Contributor

@bkonyi bkonyi commented Jun 11, 2025

No functional changes.

@bkonyi bkonyi requested a review from jyameo June 11, 2025 18:59
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 11, 2025
Copy link
Contributor

@jyameo jyameo left a comment

Choose a reason for hiding this comment

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

LGTM!

});

final PubOutputMode outputMode = verbose ? PubOutputMode.all : PubOutputMode.failuresOnly;
await pub.interactively(
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider wrapping this in a try-catch block to handle pub command failures gracefully.

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 think pub invokes throwToolExit in most situations, which we wouldn't want to catch.

// - stack_trace, which is used to generate terse stack traces for displaying errors thrown
// by widgets being previewed.
// - url_launcher, which is used to open a browser to the preview documentation.
await pub.interactively(
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above

@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 11, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 11, 2025
Copy link
Contributor

auto-submit bot commented Jun 11, 2025

autosubmit label was removed for flutter/flutter/170467, because - The status or check suite Linux gradle_plugin_light_apk_test has failed. Please fix the issues identified (or deflake) before re-applying this label.

@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 12, 2025
Copy link
Contributor

auto-submit bot commented Jun 12, 2025

autosubmit label was removed for flutter/flutter/170467, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 12, 2025
@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 12, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Jun 12, 2025
Merged via the queue into master with commit 05d341e Jun 12, 2025
150 checks passed
@auto-submit auto-submit bot deleted the refactor_widget_preview_command branch June 12, 2025 22:28
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 13, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 16, 2025
flutter/flutter@f79452e...8303a96

2025-06-13 codefu@google.com infa: linux_android_emulator_tests to bringup (bad kvm config) (flutter/flutter#170607)
2025-06-13 engine-flutter-autoroll@skia.org Roll Skia from 70455b7c74dd to 438ea4e05e15 (1 revision) (flutter/flutter#170570)
2025-06-13 sokolovskyi.konstantin@gmail.com [web] Add Paint dithering. (flutter/flutter#170362)
2025-06-13 jhy03261997@gmail.com Reland (#167738)  but with some flags updated to use enum  (flutter/flutter#170505)
2025-06-13 engine-flutter-autoroll@skia.org Roll Dart SDK from ac589dba5282 to 1a6f6d7c6f2c (4 revisions) (flutter/flutter#170566)
2025-06-13 engine-flutter-autoroll@skia.org Roll Skia from 22018eab8c1f to 70455b7c74dd (1 revision) (flutter/flutter#170564)
2025-06-13 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from Dueykg3VpLT5D_jSG... to lVfYTWxB0rTTuW_k3... (flutter/flutter#170557)
2025-06-13 737941+loic-sharma@users.noreply.github.com [Windows] Use ANGLE blit extension on GLES 2.0 (flutter/flutter#170298)
2025-06-12 codefu@google.com chore: move experimental setup steps to composite action (flutter/flutter#170496)
2025-06-12 jonahwilliams@google.com [Impeller] fix mask filter application to Vertices. (flutter/flutter#170548)
2025-06-12 engine-flutter-autoroll@skia.org Roll Skia from b41e7017658e to 22018eab8c1f (2 revisions) (flutter/flutter#170551)
2025-06-12 737941+loic-sharma@users.noreply.github.com Add CupertinoSheetRoute widget of the week video (flutter/flutter#170026)
2025-06-12 matanlurey@users.noreply.github.com Fix stray `--packages` argument from `workspace` refactor; add a test. (flutter/flutter#170449)
2025-06-12 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#170522)
2025-06-12 47866232+chunhtai@users.noreply.github.com Navigator should call didpop when popping page based route (flutter/flutter#170376)
2025-06-12 47866232+chunhtai@users.noreply.github.com Relax RadioGroup semantics to allow non-radio children (flutter/flutter#170273)
2025-06-12 bkonyi@google.com [ Widget Preview ] Refactor the `flutter widget-preview` command (flutter/flutter#170467)
2025-06-12 15619084+vashworth@users.noreply.github.com Pause UIScene migration (flutter/flutter#170490)
2025-06-12 engine-flutter-autoroll@skia.org Roll Dart SDK from 9f741ef8a689 to ac589dba5282 (3 revisions) (flutter/flutter#170519)
2025-06-12 engine-flutter-autoroll@skia.org Roll Packages from 0b322a2 to 6d3aaf4 (2 revisions) (flutter/flutter#170528)
2025-06-12 matanlurey@users.noreply.github.com Fix the path to `packages_autoroller`. (flutter/flutter#170538)

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 bmparr@google.com,stuartmorgan@google.com 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
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
…r#9433)

flutter/flutter@f79452e...8303a96

2025-06-13 codefu@google.com infa: linux_android_emulator_tests to bringup (bad kvm config) (flutter/flutter#170607)
2025-06-13 engine-flutter-autoroll@skia.org Roll Skia from 70455b7c74dd to 438ea4e05e15 (1 revision) (flutter/flutter#170570)
2025-06-13 sokolovskyi.konstantin@gmail.com [web] Add Paint dithering. (flutter/flutter#170362)
2025-06-13 jhy03261997@gmail.com Reland (#167738)  but with some flags updated to use enum  (flutter/flutter#170505)
2025-06-13 engine-flutter-autoroll@skia.org Roll Dart SDK from ac589dba5282 to 1a6f6d7c6f2c (4 revisions) (flutter/flutter#170566)
2025-06-13 engine-flutter-autoroll@skia.org Roll Skia from 22018eab8c1f to 70455b7c74dd (1 revision) (flutter/flutter#170564)
2025-06-13 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from Dueykg3VpLT5D_jSG... to lVfYTWxB0rTTuW_k3... (flutter/flutter#170557)
2025-06-13 737941+loic-sharma@users.noreply.github.com [Windows] Use ANGLE blit extension on GLES 2.0 (flutter/flutter#170298)
2025-06-12 codefu@google.com chore: move experimental setup steps to composite action (flutter/flutter#170496)
2025-06-12 jonahwilliams@google.com [Impeller] fix mask filter application to Vertices. (flutter/flutter#170548)
2025-06-12 engine-flutter-autoroll@skia.org Roll Skia from b41e7017658e to 22018eab8c1f (2 revisions) (flutter/flutter#170551)
2025-06-12 737941+loic-sharma@users.noreply.github.com Add CupertinoSheetRoute widget of the week video (flutter/flutter#170026)
2025-06-12 matanlurey@users.noreply.github.com Fix stray `--packages` argument from `workspace` refactor; add a test. (flutter/flutter#170449)
2025-06-12 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#170522)
2025-06-12 47866232+chunhtai@users.noreply.github.com Navigator should call didpop when popping page based route (flutter/flutter#170376)
2025-06-12 47866232+chunhtai@users.noreply.github.com Relax RadioGroup semantics to allow non-radio children (flutter/flutter#170273)
2025-06-12 bkonyi@google.com [ Widget Preview ] Refactor the `flutter widget-preview` command (flutter/flutter#170467)
2025-06-12 15619084+vashworth@users.noreply.github.com Pause UIScene migration (flutter/flutter#170490)
2025-06-12 engine-flutter-autoroll@skia.org Roll Dart SDK from 9f741ef8a689 to ac589dba5282 (3 revisions) (flutter/flutter#170519)
2025-06-12 engine-flutter-autoroll@skia.org Roll Packages from 0b322a2 to 6d3aaf4 (2 revisions) (flutter/flutter#170528)
2025-06-12 matanlurey@users.noreply.github.com Fix the path to `packages_autoroller`. (flutter/flutter#170538)

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 bmparr@google.com,stuartmorgan@google.com 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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Jul 21, 2025
vashworth pushed a commit to vashworth/packages that referenced this pull request Jul 30, 2025
…r#9433)

flutter/flutter@f79452e...8303a96

2025-06-13 codefu@google.com infa: linux_android_emulator_tests to bringup (bad kvm config) (flutter/flutter#170607)
2025-06-13 engine-flutter-autoroll@skia.org Roll Skia from 70455b7c74dd to 438ea4e05e15 (1 revision) (flutter/flutter#170570)
2025-06-13 sokolovskyi.konstantin@gmail.com [web] Add Paint dithering. (flutter/flutter#170362)
2025-06-13 jhy03261997@gmail.com Reland (#167738)  but with some flags updated to use enum  (flutter/flutter#170505)
2025-06-13 engine-flutter-autoroll@skia.org Roll Dart SDK from ac589dba5282 to 1a6f6d7c6f2c (4 revisions) (flutter/flutter#170566)
2025-06-13 engine-flutter-autoroll@skia.org Roll Skia from 22018eab8c1f to 70455b7c74dd (1 revision) (flutter/flutter#170564)
2025-06-13 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from Dueykg3VpLT5D_jSG... to lVfYTWxB0rTTuW_k3... (flutter/flutter#170557)
2025-06-13 737941+loic-sharma@users.noreply.github.com [Windows] Use ANGLE blit extension on GLES 2.0 (flutter/flutter#170298)
2025-06-12 codefu@google.com chore: move experimental setup steps to composite action (flutter/flutter#170496)
2025-06-12 jonahwilliams@google.com [Impeller] fix mask filter application to Vertices. (flutter/flutter#170548)
2025-06-12 engine-flutter-autoroll@skia.org Roll Skia from b41e7017658e to 22018eab8c1f (2 revisions) (flutter/flutter#170551)
2025-06-12 737941+loic-sharma@users.noreply.github.com Add CupertinoSheetRoute widget of the week video (flutter/flutter#170026)
2025-06-12 matanlurey@users.noreply.github.com Fix stray `--packages` argument from `workspace` refactor; add a test. (flutter/flutter#170449)
2025-06-12 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#170522)
2025-06-12 47866232+chunhtai@users.noreply.github.com Navigator should call didpop when popping page based route (flutter/flutter#170376)
2025-06-12 47866232+chunhtai@users.noreply.github.com Relax RadioGroup semantics to allow non-radio children (flutter/flutter#170273)
2025-06-12 bkonyi@google.com [ Widget Preview ] Refactor the `flutter widget-preview` command (flutter/flutter#170467)
2025-06-12 15619084+vashworth@users.noreply.github.com Pause UIScene migration (flutter/flutter#170490)
2025-06-12 engine-flutter-autoroll@skia.org Roll Dart SDK from 9f741ef8a689 to ac589dba5282 (3 revisions) (flutter/flutter#170519)
2025-06-12 engine-flutter-autoroll@skia.org Roll Packages from 0b322a2 to 6d3aaf4 (2 revisions) (flutter/flutter#170528)
2025-06-12 matanlurey@users.noreply.github.com Fix the path to `packages_autoroller`. (flutter/flutter#170538)

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 bmparr@google.com,stuartmorgan@google.com 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 Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants