Skip to content
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

Merged
merged 3 commits into from
Jun 23, 2023

Conversation

thomasheartman
Copy link
Contributor

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

@vercel
Copy link

vercel bot commented Jun 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 9:20am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Jun 23, 2023 9:20am

Copy link
Contributor

@andreas-unleash andreas-unleash left a comment

Choose a reason for hiding this comment

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

LGTM

@thomasheartman thomasheartman enabled auto-merge (squash) June 23, 2023 09:24
@thomasheartman thomasheartman merged commit 12c0073 into main Jun 23, 2023
14 of 17 checks passed
@thomasheartman thomasheartman deleted the #3545/plausible-track-combinations branch June 23, 2023 09:29
@@ -0,0 +1,12 @@
import { AdvancedPlaygroundFeatureSchema } from 'openapi';

export const countCombinations = (
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants