PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
19.45k stars 1.14k forks source link

refactor(insights): query based `renameInsight` #23471

Open thmsobrmlr opened 4 days ago

thmsobrmlr commented 4 days ago

Problem

We want to have only query based insights frontend side, but we still need to send them to the backend with filters. The bigger goal of the coming PRs is to adapt all instances where we send insights to the backend for persistance with a wrapper function, so that the frontend can happily live with query based insights only.

Changes

This PR lets all instances of renameInsight take a query based insight and conditionally:

How did you test this code?

github-actions[bot] commented 4 days ago

Size Change: +68 B (+0.01%)

Total Size: 1.07 MB

ℹ️ View Unchanged | Filename | Size | Change | | :--- | :---: | :---: | | `frontend/dist/toolbar.js` | 1.07 MB | +68 B (+0.01%) |

compressed-size-action