posthog icon indicating copy to clipboard operation
posthog copied to clipboard

feat: add a load more button in the heatmap

Open pauldambra opened this issue 2 years ago • 2 comments

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

2023-01-12 21 45 07

How did you test this code?

locally with 👀

pauldambra avatar Jan 12 '23 21:01 pauldambra

Hmm... I'm not a graphics designer... but this also doesn't look that slick :D.

2023-01-13 10 29 26

  • 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 avatar Jan 13 '23 09:01 mariusandra

@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

pauldambra avatar Jan 13 '23 11:01 pauldambra

@mariusandra this now has the paging we added together and some refactored tests

pauldambra avatar Jan 13 '23 18:01 pauldambra