-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[CP-beta][ Widget Preview ] Add analytic event that's reported when the previewer is opened #177960
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
[CP-beta][ Widget Preview ] Add analytic event that's reported when the previewer is opened #177960
Conversation
…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
|
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. |
|
@bkonyi please fill out the PR description above, afterwards the release team will review this request. |
There was a problem hiding this comment.
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.
...tools/test/widget_preview_scaffold.shard/widget_preview_scaffold/test/dtd_services_test.dart
Show resolved
Hide resolved
camsim99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
db95cb7
into
flutter:flutter-3.38-candidate.0
…ted when the previewer is opened (flutter/flutter#177960)
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 startImpact 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 startwon't give an accurate representation of usage as IDE plugins will start launching the widget previewer by default. This will result inwidget-previewanalytics 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?
Test Coverage:
Are you confident that your fix is well-tested by automated tests?
Validation Steps:
What are the steps to validate that this fix works?
N/A