redash icon indicating copy to clipboard operation
redash copied to clipboard

Make "missing parameter value" message friendlier

Open arikfr opened this issue 6 years ago • 18 comments

Solution

  1. When a required parameter value is missing and the user tries to run a query, the parameter should be marked as missing value (using red border). We might want to accompany this with some animation on the color transition, to guide the user towards the issue?

image

  1. We shouldn't try to execute the query or show the error message we currently show.

Problem

Currently we piggy back the query execution error mechanism to notify the user that they need to enter a value for a parameter when a value is missing.

On a query screen:

image

On a dashboard:

image

The big red message feels very intimidating and I wonder if there is a better way to convey this message?

arikfr avatar Aug 05 '18 16:08 arikfr

How about changing the design to warning or info so it'll be less intimidating? We can also refine the text to be friendlier: Please set a value for example parameter.

kocsmy avatar Aug 05 '18 18:08 kocsmy

We should add the error message next to the input fields.

kocsmy avatar Aug 06 '18 10:08 kocsmy

We shouldn't treat this as an error message. It's just a state of the UI. One possible solution is to mark the parameters which miss value with some indication.

arikfr avatar Aug 27 '18 15:08 arikfr

I meant like an input validation error, Bootstrap supports this by default: screenshot 2018-08-27 17 59 38

kocsmy avatar Aug 27 '18 16:08 kocsmy

Would also be good to allow for empty parameters. Sometimes that is intended and I have to make a workaround like enter a text like 'none' when string parameter should be empty.

thoechsmann avatar Sep 26 '18 14:09 thoechsmann

@arikfr I'm wondering if we should move those parameters inputs to Ant. Their error message is similar but placed below the form (which makes more sense to me). Furthermore, the date and time pickers are already in Ant.

image

kocsmy avatar Nov 09 '18 15:11 kocsmy

I think that @kravets-levko's implementation of dashboard parameters already switches everything to React, so using Ant won't be a problem.

But --

  1. I'm not sure we should show any message beyond marking the field.
  2. I'm looking for a more holistic definition of the behavior here when trying to run a query (or refresh a dashboard) and some parameter is missing value.

arikfr avatar Nov 12 '18 08:11 arikfr

  1. I think we should show error message. Traditionally, the UX of error message should 1. show where the error is, 2. tell what the error is, 3. recommend a solution. For example: Missing parameter, please fill. (or something similar)

  2. Can you elaborate on this and what's the problem with the current implementation? The interactions feel quite natural for me and besides moving the error message to its place (next to the field), I can't see serious issues here but I might be missing something.

kocsmy avatar Nov 12 '18 16:11 kocsmy

Can you elaborate on this and what's the problem with the current implementation?

It looks ugly and intimidating.

I updated the issue description with the proposed solution. See if you have any comments.

arikfr avatar Dec 02 '18 13:12 arikfr

Yes, this is better this way. Do you think we should just highlight the input without placing any error message below (like in my proposed design). I think it can be enough just to highlight the field but not 100% convinced.

kocsmy avatar Dec 07 '18 15:12 kocsmy

I think for now the highlight is enough. In most cases the issue is missing value, and this is obvious from the empty highlighted field.

arikfr avatar Dec 10 '18 10:12 arikfr

I think that best approach is to disable the "Execute" button when not all execute conditions are fulfilled, alongside a clear indication of the disable reason.

(Working on demo)

ranbena avatar Jan 15 '19 11:01 ranbena

Looking forward :)

arikfr avatar Jan 15 '19 11:01 arikfr

(ignore the wording and style) Disallow execution if any param empty.

  1. Toggle off execute button
  2. Show reason tooltip on button
  3. Indicate error on empty parameters. (Error message is optional and might be better without)
screen shot 2019-01-15 at 13 26 41

ranbena avatar Jan 15 '19 11:01 ranbena

@ranbena makes sense. I also think we can skip the error message, and just use the error indication.

It does mean we will need to duplicate the logic of finding missing values between backend and frontend.

cc: @rauchy

arikfr avatar Jan 15 '19 13:01 arikfr

When a required parameter value is missing

@arikfr are all params required?

ranbena avatar Jun 18 '19 10:06 ranbena

@ranbena yes :-) but it will change eventually.

Some additional input:

  1. There might be other issues with a parameter, like wrong value.
  2. Based on the above and to avoid duplicate logic between backend/frontend, how about we change the backend response to have a dictionary of "parameter name" => "error message" that we will use here?

arikfr avatar Jun 18 '19 10:06 arikfr

  1. There might be other issues with a parameter, like wrong value.
  2. Based on the above and to avoid duplicate logic between backend/frontend, how about we change the backend response to have a dictionary of "parameter name" => "error message" that we will use here?

Sounds good. Yay my first backend task!

ranbena avatar Jun 18 '19 10:06 ranbena