-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
feat: count number of combinations from playground #4077
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
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
@@ -0,0 +1,12 @@ | |||
import { AdvancedPlaygroundFeatureSchema } from 'openapi'; | |||
|
|||
export const countCombinations = ( |
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.
Maybe backend should return it?
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.
(For future visibility; as mentioned in the slack discussion)
That's a good point! I put it in the frontend for now because that’s where we track events. Seemed sensible to do the calculations as close to where we track them as possible instead of sending them over the wire. That said, we could update the advanced playground response schema to include the count instead, but this seems like it would incur more complexity. I think the best reason for not doing it in the frontend is to reduce the amount of computation client side (and the bundle size, I suppose). That might be a worthwhile tradeoff, but how about we see whether it causes any performance problems first?
This PR adds plausible tracking of the number of feature combinations that we get from the advanced playground API.
The event type has been added to plausible
Relates to #3545