-
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
fix(insights): Improve load more for breakdowns #24231
Conversation
It was only working if you selected "display other" presumably this was because of the filter conversion?
📸 UI snapshots have been updated62 snapshot changes in total. 0 added, 62 modified, 0 deleted:
Triggered by this commit. |
Size Change: +34 B (0%) Total Size: 1.07 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
frontend/__snapshots__/scenes-app-experiments--running-trend-experiment--dark.png
Show resolved
Hide resolved
frontend/__snapshots__/scenes-app-insights--trends-area-breakdown--dark--webkit.png
Show resolved
Hide resolved
# Conflicts: # frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit--dark--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit--dark.png # frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit--light--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit--light.png # frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit--dark--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit--dark.png # frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit--light--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit--light.png # frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit--dark--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit--dark.png # frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit--light--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit--light.png # frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit--dark--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit--dark.png # frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit--light--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit--light.png # frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit--dark--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit--dark.png # frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit--light--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit--light.png # frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit--dark--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit--dark.png # frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit--light--webkit.png # frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit--light.png
Derive from breakdown other option, which we always query for and then just discard later on.
@thmsobrmlr I've added a relatively quick approach/workaround to tell if there are actually more values. Can you check again? Also for experiments, I checked one and now the load more isn't there. But maybe that depends on certain conditions, so would be great if you can also check that. |
📸 UI snapshots have been updated62 snapshot changes in total. 0 added, 62 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 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.
Thanks for the follow-up @webjunkie! Works great now.
Did a couple of stylistic changes, hope you don't mind.
There's only one thing blocking this from merging now: The button only appears on a new insight, but not after saving. I'm assuming this has something to do with the insight serializer not returning the hasMore
or similar.
This was just an artifact of the previous implementation where we would always display the button regardless if there are more values. Experiments only have two values and as such it's working there now. |
Okay fixed this now. The |
Yeah it's quite annoying. We did have other insights with problems here and probably still have some edge cases that are unhandled.. |
Problem
It was only working if you selected "display other", because presumably you otherwise couldn't tell if more breakdown values are available.
Fixes #23554
Changes
hasMore
flag that is derived from "other" breakdowns being available. For this to work we ignore thehide_other
flag and always calculate them, but hide the label+value later.How did you test this code?
Tested locally