Redash: Refresh query when parameters update

Created on 14 Feb 2018  路  12Comments  路  Source: getredash/redash

Currently when you change parameter values the query doesn't update until you execute it again. This can be somewhat confusing, specially with dropdown parameters, where nothing happens after you pick a value.

The main reason for this was to avoid running a query before the user updated all the parameter values (in case there is more than one).

Some ideas for solutions:

  • Execute the query when the parameter value is updated. Add some debounce (that resets when the user "touches" another parameter?) to let the user update other parameters before running the query.
  • Add some sort of "Apply" button next to the params, so it's clear you need to click on it. Maybe even add some indication on it when the params are changed (like we do for the save button).
  • Add a "Pause execution" toggle, that allows you to pause query refresh in case you want to update multiple parameters.

Any other ideas?

Parameters Frontend UX

Most helpful comment

We had a discussion around this and we'll modify it in the following way:

query parameter
query parameter modified

We'll add an "Apply" button to each modified input field that needs to be clicked in order to re-execute the query.

  • The button will only appear if you modified an input.
  • Shift Click will Apply all the modified parameters.

All 12 comments

I like the second option, I think that could work well.

So here's my solution:

Add an execute button (similar to Show Data Only mode bottom right "Play" icon), that stays disabled until you edit a parameter. Once you change any values, the button becomes active indicating that you need to click to re-execute the query.

I think this would work nice because we don't need to add any 'debounce' or 'Pause execution' and should be quite intuitive.

query parameter

Add an execute button (similar to Show Data Only mode bottom right "Play" icon), that stays disabled until you edit a parameter.

I think that once we add it, people will get used to using it to refresh the query. It will be confusing to have it disabled sometimes and enabled at other times.

Maybe we can make it "glow" to indicate you need to click it?

Also, how will the button be placed when you have multiple parameters? Maybe even having two lines of them?

Ok, good point about the confusion, especially that in Data Only Mode we'll have the other execute button on the bottom right always enabled.

I'm wondering why don't we just leave it there always enabled? I think it'd make total sense. I'm not sure if we need to add any extra indication...

We'll just add it to the right of the last item. If there are multiple rows, it'll go after the last one.

query parameter

I'm wondering why don't we just leave it there always enabled?

I think you had a good point about indicating to the user that they need to press it.

We'll just add it to the right of the last item. If there are multiple rows, it'll go after the last one.

It might look confusing/ugly -- can you create a mockup of multiple parameters and another one with multiple rows?

I think should use the * like we are using with the Save. Button Glow would be too foreign to for the current design.
query parameter modified

I don't think it'll look ugly or confusing. Here's a mockup:
query multiple parameters

query multiple parameters row

We had a discussion around this and we'll modify it in the following way:

query parameter
query parameter modified

We'll add an "Apply" button to each modified input field that needs to be clicked in order to re-execute the query.

  • The button will only appear if you modified an input.
  • Shift Click will Apply all the modified parameters.

One more suggestion: when hitting Enter in an input box, it should apply the parameters changes.

Is this issue addressed in the current version?

@alisha17 usually we close issues that are already in master. If you're asking if it _will be_ addressed in the current version, then probably not. Current version is soon to be released. It will probably make the cut into the next one.

Implemented in #3737. 馃憣

Was this page helpful?
0 / 5 - 0 ratings