posthog
posthog copied to clipboard
feat: add a load more button in the heatmap
Problem
In https://github.com/PostHog/posthog/pull/13643 I added auto-paging within the heatmap.
Locally this was fine, but in production the API calls were slow enough that it just took too long. And the processing of the pages as they arrived takes long enough that the loading was jerky.
The antithesis of slick. Trying to be too clever 🤦
Changes
- Adds a load more button inside the heatmap popover
- gives the user feedback when all of the data for a date range has been loaded
How did you test this code?
locally with 👀
Hmm... I'm not a graphics designer... but this also doesn't look that slick :D.
- Can we only show the button if we're sure that there are more results to download? Right now it looks very broken with my 1 returned results :).
- The box looks way too crowded. Some whitespace between e.g. the button and the error would already help.
@mariusandra sorted the margin
Ideally we'd have https://github.com/PostHog/posthog/pull/13690 merged and then we can just have the button and let people know why it's disabled. Then I can remove the alert message entirely.
Ideally ideally I'd remove the limit/paging entirely https://github.com/PostHog/posthog/pull/13700
@mariusandra this now has the paging we added together and some refactored tests