posthog icon indicating copy to clipboard operation
posthog copied to clipboard

fix(experiments): render LoadingState when changing experiment goal

Open jurajmajerik opened this issue 1 year ago • 2 comments

Problem

Fixes https://posthoghelp.zendesk.com/agent/tickets/9620

The issue wasn't that the results were not refreshing, but that the loader was not showing. Because it took a long time for Raquel's results to load, it looked as though the results were not refreshing.

This was happening because we were showing the loader based on whether experimentResults existed. This value doesn't exist on the initial load but is always present thereafter.

Changes

Render LoadingState at the top level if experimentResultsLoading is true.

Before: https://github.com/PostHog/posthog/assets/22996112/43b747b1-69b2-45a2-99cf-0b227c5fc079

After: https://github.com/PostHog/posthog/assets/22996112/f1e84732-b15f-4fd9-8736-8a898f3b54cf

This code could be cleaned up further, but might as well leave it for the UI revamp :)

How did you test this code?

👀

jurajmajerik avatar Feb 14 '24 15:02 jurajmajerik

github not embedding the videos for some reason 🤔

jurajmajerik avatar Feb 14 '24 15:02 jurajmajerik

Size Change: +134 B (0%)

Total Size: 2.22 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 2.22 MB +134 B (0%)

compressed-size-action

github-actions[bot] avatar Feb 14 '24 15:02 github-actions[bot]