Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(insight-variables): dashboard variables populating and updating urls #27843
feat(insight-variables): dashboard variables populating and updating urls #27843
Changes from 3 commits
5e222f8
661ccac
96f385a
3f60e0c
69e0042
0fff57b
cd96286
36b1837
4adff64
d6c0698
28f2e5b
f523830
c5cc8bd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Should this not be
maybeUrlVariables
? Or is this triggered from somewhere else?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.
this is sort of dicey basically maybeURLVariables needs to be set first on load and then when variables loads, it'll do a check the maybe variables to populate if possible (which is why this subscription is mounted on
variables
)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.
So I'm not a fan of allowing users to set any query param and have our logic try to parse it as variables. In the future, we can't use dashboard query params for anything else in case of a conflict of insight variable names. Instead, I think we should have a single query param (something like
query_variables
) that is a key/value pair object instead - this makes it a lot more explicit.The downside to this is that it's more effort on the end of building the URL when writing a HogQL query, but we can add the overrides as a parameter of the
<a variableOverrides={...} />
component instead (long term, links are done via chart settings instead of in the query itself)Check failure on line 1516 in frontend/src/scenes/dashboard/dashboardLogic.tsx
GitHub Actions / Code quality checks