-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(insights): move to queries in new insight urls #24193
Conversation
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
Size Change: +241 B (+0.02%) Total Size: 1.07 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
afe447b
to
a5023d8
Compare
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
# Conflicts: # frontend/__snapshots__/exporter-exporter--user-paths-insight--light.png
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
@@ -1226,20 +1228,12 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([ | |||
if (!tab) { | |||
throw new Error('Developer Error, tab not found') | |||
} | |||
return urls.insightNew( | |||
{ properties: webAnalyticsFilters, date_from: dateFrom, date_to: dateTo }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robbie-c I couldn't figure out what adding the properties here does. Any hints for me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should copy the property filters from web analytics into the new insight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I understand this correctly, but property filters should already be part of the queries set on the new insight. Let me know if this breaks anything that I don't see right now and I'm happy to adapt accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah you're right, looks like it wasn't necessary. I suspect I just passed these arguments in because they were there :) Just ran these changes locally and they worked fine, so all good from me
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
# Conflicts: # frontend/__snapshots__/exporter-exporter--user-paths-insight--dark.png # frontend/__snapshots__/exporter-exporter--user-paths-insight--light.png
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
# Conflicts: # frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx
@@ -190,7 +205,7 @@ export const insightSceneLogic = kea<insightSceneLogicType>([ | |||
'/insights/:shortId(/:mode)(/:subscriptionId)': ( | |||
{ shortId, mode, subscriptionId }, // url params | |||
{ dashboard, ...searchParams }, // search params | |||
{ filters: _filters, q }, // hash params | |||
{ insight: insightType, q }, // hash params |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we want to support hash params and not just search params?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no reason in particular here - just taking over the existing system. hash params are quite common for client-side state and afaik there's a higher limit for the number of characters.
Problem
We'd like to get rid of
filters
, but still have them in URLs generated internally.Changes
#filters=
type urls with query based#q=...
type urls.?filters=...
type urls.How did you test this code?