-
Notifications
You must be signed in to change notification settings - Fork 23
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
Enum + event added for commandUsageValues
#211
Enum + event added for commandUsageValues
#211
Conversation
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
/// The custom dimensions from each implementation are grouped by sharing | ||
/// the same prefix. The [workflow] indicates which implementation is being | ||
/// sent, for example, "create". | ||
Event.commandUsageValues({ |
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.
This is a non-obvious name to me (that doesn't mean it isn't the best, just that it's not obvious to my brain). What about just Event.command
?
Or, do we need to namespace this by the flutter tool somehow? Even though I can see other tools wanting to track its sub-commands, these fields are specific to the flutter tool.
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.
I actually had the same thought myself. I'm open to changing the constructor name though, i just tried to make it reflect what it was doing.
But I agree, as we start adding several more events, it's going to be a bit harder to know which event belongs to which dash tool so i created the issue below to at least add the tool it belongs to in the top line in the dartdoc
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.
It's your call as to the name
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
Related to tracker issue:
package:unified_analytics
implementation in flutter tool flutter/flutter#128251This is a migration for the flutter
Usage.command
static method. When calling this method fromFlutterCommand
or a child class, it will fetch the necessaryCustomDimensions
for that command. There are a few child classes ofFlutterCommand
that override theusageValues
getter to provide their own custom dimensions.As a result, this means that parameters we need to send for each of those classes varies. So instead of creating a separate
Event
constructor for each of these child classes, we will instead have just one constructor that contains a superset of all possible custom dimension parameters. This makes the parameter count for thisEvent
large (even larger than the maximum 25 parameters allowed). However, when sending this class from the flutter tool, we will ensure that the number of parameters used is going to be below the max (25) parameter count.Snippet of what the Event below
Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.