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): Create a dashboard in one click #27503

Merged
merged 6 commits into from
Jan 15, 2025

Conversation

danielbachhuber
Copy link
Contributor

See #26934

Changes

A basic implementation that lets a customer create a dashboard for an experiment in one-click:

CleanShot.2025-01-14.at.06.10.24.mp4

I deliberately didn't store the dashboard id in the database to avoid schema modifications until we have a good sense of how this feature should work. We can continue to iterate based on usage and feedback.

How did you test this code?

I created many dashboards from an experiment.

@danielbachhuber danielbachhuber requested a review from a team January 14, 2025 14:11
Copy link
Contributor

github-actions bot commented Jan 14, 2025

Size Change: +239 B (+0.02%)

Total Size: 1.13 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.13 MB +239 B (+0.02%)

compressed-size-action

Copy link
Contributor

@andehen andehen left a comment

Choose a reason for hiding this comment

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

Nice feature!

I experienced two issues when running this locally:

  • the toast did not show
  • no metrics were added to the dashboard

Could be a local issue on my end, but I didn't see any obvious reasons for that, and no errors in console or log 🤔

Screen.Recording.2025-01-15.at.12.37.26.mov

frontend/src/scenes/experiments/experimentLogic.tsx Outdated Show resolved Hide resolved
@danielbachhuber
Copy link
Contributor Author

I experienced two issues when running this locally:

* the toast did not show

* no metrics were added to the dashboard

@andehen Hm, it seems like the code didn't execute fully. Did it reproduce multiple times? Can you look at your network requests and see what's happening there?

Because there's no intermediate UX while the dashboard is being created, I tried showing a "Creating experiment dashboard..." toast but didn't love it.

Comment on lines 968 to 970
if (metrics.length === 0) {
return
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@andehen Hm, it seems like the code didn't execute fully. Did it reproduce multiple times? Can you look at your network requests and see what's happening there?

Here is the bug. It only works if you have both a primary and a secondary metric defined here due to the early return

Copy link
Contributor

Choose a reason for hiding this comment

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

The one I tested with had only a primary metric. Adding a secondary metric and it works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good catch! That should be a continue but we can remove it entirely 6129425

@danielbachhuber danielbachhuber requested a review from a team January 15, 2025 13:10
Copy link
Contributor

@andehen andehen left a comment

Choose a reason for hiding this comment

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

Works now!

There is a null in the description. Do you see that as well?

Screenshot 2025-01-15 at 14 15 44

@danielbachhuber
Copy link
Contributor Author

There is a null in the description. Do you see that as well?

Ah, yeah. Fixed with bb099f8

@danielbachhuber danielbachhuber requested a review from a team January 15, 2025 14:21
@danielbachhuber danielbachhuber merged commit 2cfe828 into master Jan 15, 2025
99 checks passed
@danielbachhuber danielbachhuber deleted the experiments/create-dashboard branch January 15, 2025 14:32
@jurajmajerik
Copy link
Contributor

Very cool!

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