-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Clarify relationship between insights, dashboards and date filters #6712
Comments
I would also consider things closely related to dates / time ranges:
Generally anything that doesn't change the underlying data definition, but modifies how you might organize or parse the data seems like it should be available. Thank you for documenting this and initiating a conversation on how to resolve it. I think it's a very critical issue. |
The proposed split makes sense to me. Some points.
|
I could go either way on this. I'm fine leaving it out of scope if it makes decisions easier for now. A user could easily duplicate and modify the insight if they really wanted an alternate viz type. |
One extra consideration. We will surely also want to add things like correlation analysis results, session recordings, random tables from random scenes, etc onto a dashboards. Currently you can only add things that are "insights", that means the main graph for any tab under the "insights" menu item. This could be possible, and will as its first step require a split between insights and dashboard items. |
I think we might consider a generic "Add to dashboard" feature for any visualization that is the result of an insight / analysis. Dashboards might become more complex depending on the scope of that action. For example, dashboards could be a collection of a random snapshot of independent items, or they could be a related set of things with a shared context (time for example). |
+1 to the proposal, with Paolo's suggestion. My thoughts:
|
We can drop |
This task is evolving in scope, and I think it makes sense to dedicate someone working on this for a full sprint later on. Some new context which should be addressed if we redo the dashboard backend:
Instead of a bespoke integration with each different thing we can add to a dashboard, could there be a good pattern we can implement to be able to add anything on a dashboard? Both for the backend and the frontend. |
My 2c:
Below I'll assume there's a legit use-case:
|
I have some work in progress on this issue that is ready at https://www.figma.com/file/gQBj9YnNgD8YW4nBwCVLZf?node-id=5958:45941#133212611. The core change is to always represent the insight's time context in the card. Insights can have varying time contexts, and that's OK!, but it's the job of each insight card to communicate this. Secondarily, the global date control will have an updated appearance to reinforce when no global time context is set. This is further reinforce by insight cards - when a global time context is set, the insight cards will report that same range (if applicable to the visualization parameters). This is an early idea, so please feedback in figma if you have any. |
Love this! Perhaps add an icon with a detail tooltip when the time range comes from a global config ? |
This is solved now. |
We talk about "creating new insights" and then either "saving" them or "adding them to a dashboard".
It feels natural that you could add an insight onto multiple dashboards. You painstakingly create a conversion funnel, and would like to see it on both the sales and marketing dashboards. A pretty common usecase I'd think.
That's unfortunate, because this is currently impossible. An "insight" is actually a "dashboard item" in the database. It's tightly coupled to the dashboard it's on, and looks something like this:
If we want to make it possible to save an insight onto multiple dashboards, we need to add a table between insights and dashboards to create a has-many relationship. The question is: what data should remain on the insight, and what data should remain on the link between the dashboard and the insight?
The answer is more complicated than it seems.
More practically:
layouts
However these are the easy questions. There's a worse problem: when you update the global date filter on a dashboard, it updates and overrides in the database, the
filters
(with the new date), andresult
s on each of the insights that are shown.If we'd just share insights between dashboards now, we'll end up with some insights constantly overriding themselves, if they're on dashboards with different global date filters. Not cool.
Hence we need to rethink the relationship an insight has with its date filters, and how that gets persisted. If multiple dashboards share an insight, and use different date filters, then the cached
result
on the object is also quite worthless, as it'll be for a different set of filters.Hence my proposal:
The
filter_override
field (orcustom_date_filter
?) in the dashboard item model would contain filters that are different than filters on the insight. Just the date filter for now, but perhaps others eventually? This would then allow to build a feature, which lets power users override date filters on specific dashboard items. This has been requested repeatedly.Also, I'm not sure if we should keep the cached results on the insight type at all, or if we should just rely on a redis caching layer for this? Should we also add a
result
on the dashboard item to cache it with the applied set of date filters? We could also instead build a postgres-basedInsightCache
table that'd unify filtering across filters_hash.This task is quite complex (many moving parts) and will probably fall outside of releasing saved insights, just so we don't need to fix all these edge cases: so not this week, but it could be part of the scope for next sprint.
Many questions. Any feedback on the proposed split? @Twixes @paolodamico @clarkus
Related epic: #6513
Related issue: #6559
The text was updated successfully, but these errors were encountered: