Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Add variable example value to increase user understanding #7

Closed
JeanMertz opened this issue Jun 6, 2019 · 1 comment
Closed

Add variable example value to increase user understanding #7

JeanMertz opened this issue Jun 6, 2019 · 1 comment
Labels
good first issue Good for newcomers
Milestone

Comments

@JeanMertz
Copy link
Contributor

JeanMertz commented Jun 6, 2019

This would improve the story around variables, similar to #1 and #3.

Let's extend variables:

struct Variable {
    key: String,
    description: Option<String>,
+   example_value: Option<String>,
}

Which allows us to turn the current situation:

Screenshot 2019-06-06 at 19 31 11

Into one where we have an extra (optional) tool in our toolbox to make the purpose of the variable as clear as possible to the user:

Screenshot 2019-06-06 at 19 32 09

In this case, the example_value is set to hello world, and is shown as e.g. "hello world". If no example value is set, the field is kept empty.

If a default value is set (see #3), it takes precedence, and no example value is shown (unless the default value is removed, and an empty field is left, in which case the UI would put back the example value).

Note that the above example uses the placeholder attribute, so it's not actually a value that can be used as the input value.

@JeanMertz JeanMertz added the good first issue Good for newcomers label Jun 6, 2019
JeanMertz added a commit that referenced this issue Jul 8, 2019
An "example value" is purely meant as a visual aid for clients to help
people understand what variable value to provide.

For example, a variable named "First and Last Name" could have an
example value set to "John Doe". The clients must **not** use this as a
default value (for that, see the `defaultValue` attribute of the server
API).

For more details, see: #7
@JeanMertz
Copy link
Contributor Author

JeanMertz commented Jul 8, 2019

This has been implemented in 5c9788b and a57d0ab.

Screenshot 2019-07-08 at 23 11 29

@JeanMertz JeanMertz added this to the v1.0.0 milestone Jul 11, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant