Skip to content
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

Make instant controls store state in URL #4449

Merged
merged 4 commits into from Feb 21, 2018

Conversation

betodealmeida
Copy link
Member

@betodealmeida betodealmeida commented Feb 17, 2018

When an instant control is changed the visualization is re-rendered, but the form_data parameter in the URL is not updated. This means that if someone copies the URL, or generates a short URL, it will not point to the current visualization.

I created a new action UPDATE_QUERY_FORM_DATA that is called whenever a query is run, but also when an instant control changes. This way, the URL and short URL reflect the current visualization, and can be shared as expected.

(This PR is 1 of 2 addressing #4379)

@@ -47,7 +47,6 @@ export default function chartReducer(charts = {}, action) {
chartUpdateEndTime: null,
chartUpdateStartTime: now(),
queryRequest: action.queryRequest,
latestQueryFormData: action.latestQueryFormData,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now done explicitly in updateQueryFormData.

@mistercrunch mistercrunch merged commit c317657 into apache:master Feb 21, 2018
@mistercrunch mistercrunch deleted the chart_stickiness branch February 21, 2018 01:08
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* Add to history on instant control change

* Update latestQueryFormData on render triggered

* Add new message type

* Update latestQueryFormData in UPDATE_QUERY_FORM_DATA
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* Add to history on instant control change

* Update latestQueryFormData on render triggered

* Add new message type

* Update latestQueryFormData in UPDATE_QUERY_FORM_DATA
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.24.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.24.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants