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(insights): Add cumulative retention #24240

Merged
merged 18 commits into from
Aug 12, 2024
Merged

Conversation

webjunkie
Copy link
Contributor

@webjunkie webjunkie commented Aug 7, 2024

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?

image

Does this work well for both Cloud and self-hosted?

How did you test this code?

@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

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@webjunkie webjunkie requested a review from a team August 8, 2024 09:27
Copy link
Contributor

github-actions bot commented Aug 8, 2024

Size Change: 0 B

Total Size: 1.07 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.07 MB

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.

# 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
@webjunkie webjunkie force-pushed the feature/retention-cumulative branch from 64f743e to aadb03a Compare August 9, 2024 09:23
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor

@thmsobrmlr thmsobrmlr left a 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:

@@ -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,
Copy link
Contributor

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.

@webjunkie webjunkie merged commit 531eb54 into master Aug 12, 2024
93 checks passed
@webjunkie webjunkie deleted the feature/retention-cumulative branch August 12, 2024 08:12
@annaszell annaszell mentioned this pull request Sep 6, 2024
@aspicer aspicer mentioned this pull request Sep 12, 2024
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.

Retention insight should support "On or after" logic
3 participants