Skip to content

[CP-beta][ Widget Preview ] Add analytic event that's reported when the previewer is opened - #177960

Merged
auto-submit[bot] merged 1 commit into
flutter:flutter-3.38-candidate.0from
flutteractionsbot:cp-beta-0359d52908134a9691c184ab5ab12773eab9bcd6
Nov 11, 2025
Merged

auto-submit[bot] merged 1 commit into
flutter:flutter-3.38-candidate.0from
flutteractionsbot:cp-beta-0359d52908134a9691c184ab5ab12773eab9bcd6

Conversation

@flutteractionsbot

@flutteractionsbot flutteractionsbot commented Nov 4, 2025 •

Copy link
Copy Markdown
Contributor

This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

Issue Link:

What is the link to the issue this cherry-pick is addressing?

#177948

Changelog Description:

Explain this cherry pick in one line that is accessible to most Flutter developers. See best practices for examples

Add additional analytics for flutter widget-preview start

Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)

Analytics collected for flutter widget-preview start won't give an accurate representation of usage as IDE plugins will start launching the widget previewer by default. This will result in widget-preview analytics effectively tracking the number of IDE users rather than actual usage of the widget previewer.

Workaround:

Is there a workaround for this issue?

No

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

What are the steps to validate that this fix works?

N/A

…wer is opened (flutter#177949)

With the addition of IDE support, the widget previewer is often started
by default by IDE plugins, even if users don't open the previewer. This
change adds an additional analytics event which is reported once the
widget preview application is loaded and connects to the DTD instance.

Fixes flutter#177948
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Nov 4, 2025
@flutter-dashboard

Copy link
Copy Markdown

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@flutteractionsbot

Copy link
Copy Markdown
Contributor Author

@bkonyi please fill out the PR description above, afterwards the release team will review this request.

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 4, 2025

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds an analytics event that is reported when the widget previewer is opened. This is achieved by having the widget preview scaffold send a DTD event upon connection, which the Flutter tool listens for and then reports to the analytics service. The changes involve passing the analytics handler to the DTD service, adding the new event logic, and updating tests to accommodate these changes. My review includes a suggestion for adding documentation to new public constants to adhere to the style guide and a comment on refactoring duplicated code in tests to improve maintainability.

Comment thread packages/flutter_tools/lib/src/widget_preview/dtd_services.dart

@camsim99 camsim99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 11, 2025
@auto-submit
auto-submit Bot merged commit db95cb7 into flutter:flutter-3.38-candidate.0 Nov 11, 2025
147 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
This was referenced Jan 23, 2026
@flutteractionsbot
flutteractionsbot deleted the cp-beta-0359d52908134a9691c184ab5ab12773eab9bcd6 branch July 20, 2026 17:01
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 cp: review Cherry-picks in the review queue tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants