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): secondary metrics table #21164

Merged
merged 13 commits into from
Apr 1, 2024
Merged

Conversation

jurajmajerik
Copy link
Contributor

@jurajmajerik jurajmajerik commented Mar 26, 2024

Changes

  • Display statistical info for secondary metrics
  • Show the graph for each metric
  • Sneaked in some small UI changes for the View page
image
  • Put the progress bar in a column next to Goal - no need to have it span the entire width
image

Notes:

  • Showing the graph in the table is not possible due to how the axes are arranged. Opted for showing the graph in a modal, reusing the secondary metric form. Another option was a tooltip, but not viable, since it wouldn't allow for analyzing the graph.

How did you test this code?

👀

Copy link
Contributor

github-actions bot commented Mar 26, 2024

Size Change: 0 B

Total Size: 824 kB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 824 kB

compressed-size-action

@jurajmajerik jurajmajerik removed the request for review from neilkakkar March 26, 2024 16:50
@jurajmajerik jurajmajerik marked this pull request as draft March 26, 2024 16:51
@jurajmajerik
Copy link
Contributor Author

Needs more work..

@jurajmajerik jurajmajerik marked this pull request as ready for review March 27, 2024 08:09
>
{isModalReadOnly ? (
<div>
<ExperimentInsightCreator insightProps={insightProps} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here we need -> https://github.com/PostHog/posthog/blob/secondary-metrics-table/frontend/src/scenes/experiments/ExperimentResult.tsx#L215 the valid metric. Potentially worth refactoring ExperimentResults component that you're using for the primary metric to make it work here

openModalToEditSecondaryMetric: (
metric: SecondaryExperimentMetric,
metricIdx: number,
readOnly: boolean = false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of readOnly I think better to have a showResults param, because its not read only version of the metric selector, but a completely different insight - to avoid confusion

@@ -17,3 +17,21 @@ export const transformResultFilters = (filters: Partial<FilterType>): Partial<Fi
display: ChartDisplayType.ActionsLineGraphCumulative,
}),
})

export function findKeyWithHighestNumber(obj: Record<string, number> | null): string | null {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be nice to consolidate all highest probability calculations into one

>
{showResults && targetResults ? (
<div>
<Query
Copy link
Collaborator

Choose a reason for hiding this comment

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

consider extracting this into its own component in a follow up

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.

after we push the pairing changes, LGTM! :)

@jurajmajerik jurajmajerik merged commit db30fef into master Apr 1, 2024
83 checks passed
@jurajmajerik jurajmajerik deleted the secondary-metrics-table branch April 1, 2024 09:59
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.

2 participants