-
Notifications
You must be signed in to change notification settings - Fork 160
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
chore: Adds feature metrics for collection prefs and button group #3180
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3180 +/- ##
=======================================
Coverage 96.41% 96.41%
=======================================
Files 784 784
Lines 22168 22178 +10
Branches 7206 7207 +1
=======================================
+ Hits 21373 21383 +10
Misses 788 788
Partials 7 7 ☔ View full report in Codecov by Sentry. |
expect(useBaseComponent).toHaveBeenCalledWith('ButtonGroup', { | ||
props: { | ||
variant: 'icon', | ||
dropdownExpandToViewport: undefined, |
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.
should this be false instead? Not sure how the metrics handle undefined values here
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.
Metrics use JSON.stringify
. When you serialise undefined, it disappears completely, same as this key did not exist before.
Explicit casting is recommended
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.
Yeah, I was thinking about that too, but decided not touch it just yet. I think it would be nice to align within the team if we want to cast or not and how do we want to treat properties that have defaults: should we pass the default value or the missing one, as it directly affects the actual metrics we gather.
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.
In all other cases, we track resolved values after defaulting.
For dropdownExpandToViewport
there is an implicit default false
which we should be tracking.
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.
After the team discussion we settled on passing the default property values to metrics. I added a new commit that implements that for dropdownExpandToViewport.
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.
The comment thread is about existing behavior, not new.
Approving, but fixing that reporting would be nice follow up
11d5861
to
d931b64
Compare
d931b64
to
eae6af7
Compare
Description
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md
.CONTRIBUTING.md
.Security
checkSafeUrl
function.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.