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(experiments): holdout groups UI #25772

Merged
merged 25 commits into from
Oct 28, 2024
Merged

Conversation

jurajmajerik
Copy link
Contributor

@jurajmajerik jurajmajerik commented Oct 23, 2024

Changes

  • Add UI for managing holdout groups
  • Add the holdout to test variants in the results calculation

1. List holdouts

image

2. Create/edit holdout

image

3. Edit holdout during experiment creation

image

4. Edit holdout in the Draft mode

image

5. Show holdout in the Launched mode (no longer editable)

image

6. Show results for the holdout

image

How did you test this code?

👀

@jurajmajerik jurajmajerik marked this pull request as draft October 23, 2024 19:05
Copy link
Contributor

github-actions bot commented Oct 23, 2024

Size Change: +44 B (0%)

Total Size: 1.15 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.15 MB +44 B (0%)

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

8 snapshot changes in total. 0 added, 8 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

4 snapshot changes in total. 0 added, 4 modified, 0 deleted:

  • chromium: 0 added, 4 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@jurajmajerik jurajmajerik marked this pull request as ready for review October 25, 2024 09:37
Copy link
Collaborator

@neilkakkar neilkakkar left a comment

Choose a reason for hiding this comment

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

haven't tried running locally yet, not sure if you've incorporated changes with my latest holdout_id pr.

}
size="xsmall"
options={holdoutOptions}
value={experiment.holdout || null}
Copy link
Collaborator

Choose a reason for hiding this comment

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

wouldn't this be the entire holdout object?

@@ -52,8 +52,23 @@ export function VariantTag({
}): JSX.Element {
const { experimentResults, getIndexForVariant } = useValues(experimentLogic({ experimentId }))

if (variantKey.startsWith('holdout-')) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

i guess we should disable user created variants starting with holdout- 🙈

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this check should be good enough for now: https://github.com/PostHog/posthog/pull/25772/files#diff-ac20870bd5fba7ae95bc9fde57e9108900e26f210382221cc1466059172748f3R55

Can add validation later if we run into issues

onChange={(rollout_percentage) =>
setHoldout({
filters: {
groups: [{ properties: [], rollout_percentage }],
Copy link
Collaborator

Choose a reason for hiding this comment

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

groups seem extra

@jurajmajerik
Copy link
Contributor Author

Feedback addressed :)

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@jurajmajerik jurajmajerik merged commit c61b3a9 into master Oct 28, 2024
94 checks passed
@jurajmajerik jurajmajerik deleted the experiment-holdouts-ui branch October 28, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants