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 replaces all instances of deleteWithUndo for insights with a deleteInsightWithUndo that take a query based insight and conditionally restores it with filters.
How did you test this code?
With flag disabled:
[x] Deleted (and restored!) an insight on the insights page (list view)
[x] ~... on the insights page (card view)~ no button for that
[x] ... on the insight page
With flag enabled:
[x] Deleted (and restored!) an insight on the insights page (list view)
[x] ~... on the insights page (card view)~ no button for that
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 replaces all instances of
deleteWithUndo
for insights with adeleteInsightWithUndo
that take a query based insight and conditionally restores it with filters.How did you test this code?
With flag disabled:
With flag enabled: