[explore] fix the 'altered' tag false positive #5636
Closed
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.
The altered tag shows up in many cases where it shouldn't. First
it's common for the loaded examples to have extra keys in their
form_data, they were designed that way knowing extra keys get removed
along the way (only the form_data relevant to a particular viz type
makes it through).
Though then there was a few lines added to allow for
url_params
through, but brought back the kitchen sink as it merged all other
bad keys. This also creates problems around metrics and such as
switching viz types.
As an alternative approach, I added
url_params
as a HiddenControl sothat it can flow using the common form_data flow.
Note that:
url_params
will get saved with the chart metadata, but overriden onexplore. It appears that the logic that bakes the
url_params
appliesonly to explore, not dashboards, meaning unless we call
merge_request_params
on the dashobard endpoint, theurl_params
wouldshow as saved on the chart.
it appears url_params never worked with dashboards for instance
@michellethomas @graceguo-supercat let me know what you think