-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(insights): Add cumulative retention #24240
Conversation
It was tertiary but that is confusing - also some alignment of the side action was off
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated10 snapshot changes in total. 0 added, 10 modified, 0 deleted:
Triggered by this commit. |
Size Change: 0 B Total Size: 1.07 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated8 snapshot changes in total. 0 added, 8 modified, 0 deleted:
Triggered by this commit. |
# Conflicts: # frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit--dark--webkit.png # frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit--dark.png # frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit--light--webkit.png # frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit--light.png # frontend/__snapshots__/scenes-app-insights--retention-edit--dark--webkit.png # frontend/__snapshots__/scenes-app-insights--retention-edit--light--webkit.png # frontend/__snapshots__/scenes-app-insights--retention-edit--light.png
64f743e
to
aadb03a
Compare
📸 UI snapshots have been updated15 snapshot changes in total. 0 added, 15 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
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.
Great, thank you! Leaving a couple of comments:
- The new property can probably be added to the "frontend only" props here https://github.com/PostHog/posthog/blob/master/frontend/src/scenes/insights/utils/compareInsightQuery.ts#L53-L66, so that it doesn't trigger a new query request.
- The UI gets a bit squished for me. We might want to use the double-row layout or the advanced options menu here as well.
- I think "rolling retention" needs some more info to be understandable for the user
@@ -436,6 +436,7 @@ export const retentionFilterToQuery = (filters: Partial<RetentionFilterType>): R | |||
targetEntity: sanitizeRetentionEntity(filters.target_entity), | |||
period: filters.period, | |||
showMean: filters.show_mean, | |||
cumulative: filters.cumulative, |
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.
This needs to be added to the backend side filter_to_query
function as well.
Problem
Fixes #23661
Changes
Just added a flag that is UI only and sums the values.
Named in UI "Rolling retention". Or any better ideas?
Does this work well for both Cloud and self-hosted?
How did you test this code?