posthog icon indicating copy to clipboard operation
posthog copied to clipboard

fix(insights): Make query based insights show better

Open webjunkie opened this issue 1 year ago • 2 comments

Problem

Insights that are query based directly from the start show up with additional controls on the dashboard.

Changes

  • pass down embedded prop better and handle it accordingly
  • add snapshots for this type of insight
  • fix loading in certain states: when cache is available but no filters present, one util was preventing the insight from showing up without any additional requests

Before

image

After

Screenshot 2024-05-07 at 16 14 15

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

n/a

How did you test this code?

  • added snapshots
  • how to test:
    • create insight with query based structure and no filters at all
    • edit it via database if necessary
    • look at dashboard

webjunkie avatar May 07 '24 14:05 webjunkie

Size Change: 0 B

Total Size: 1.05 MB

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

compressed-size-action

github-actions[bot] avatar May 07 '24 14:05 github-actions[bot]

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

posthog-bot avatar May 15 '24 07:05 posthog-bot

@thmsobrmlr Maybe you also check this here, since you have a PR on a similar topic.

webjunkie avatar May 30 '24 08:05 webjunkie

@thmsobrmlr Maybe you also check this here, since you have a PR on a similar topic.

Oh yeah, this does look pretty much like it's the same as https://github.com/PostHog/posthog/pull/22400. Will have a deeper look tomorrow, but likely only one of them should go in. There shouldn't be any query based insights in prod, so I don't think we need to rush it.

thmsobrmlr avatar May 30 '24 08:05 thmsobrmlr

Closing in favor of #22400

webjunkie avatar Jun 04 '24 10:06 webjunkie