You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: faq_and_code/README.md
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2137,13 +2137,23 @@ This script shows how to organize your inputs using the following tricks:
2137
2137
- Create separators using boolean checkboxes. Make their default value `true` so users are less prone to trying them out to see what they do, as they will most often do nothing. If your separators actually do something, make this clear in their wording.
2138
2138
- Indent sub-sections using Unicode white space characters. Choose one that shows up in the Editor as a visible character. We like to use the Em space (``): 8195 (0x2003).
2139
2139
2140
-
Notes:
2140
+
**Notes**
2141
2141
- We cannot indent checkboxes, so your sections will look cleaner if you use `input()`'s `options` parameter to provide selections via dropdowns rather than checkboxes.
2142
2142
- For separators to align neatly at the end of the dialog box, start by creating the longest input `title` you will be using, as it determines the width of db. This way you will avoid the tedious task or re-balancing the line characters on each side of your separator's name because of changes in the db's width when you add an input with a `title` longer than previous ones.
2143
2143
- If your longest input title turns out to be shorter than you had first planned and you want to avoid re-balancing separators, you can use Unicode white space to artificially make it longer, as we demonstrate for input `i_4` in our code example.
2144
2144
- Use ASCII characters 205 or 196 for continuous separator lines. The dash (ASCII 45) or Em dash (ASCII 151) do not join properly; they are thus less visually appealing.
2145
2145
- For better visual effect, ensure all you separator titles are centered vertically throughout all your Inputs. This requires trial and error, as the MS Trebuchet font used for TV text is proportionnally spaced.
2146
2146
2147
+
**Tips**
2148
+
- Your script's plots and inputs constitute their user interface. Inputs thus play a key role in the user experience. The more options you provide, the more important the design of your *Inputs* dialog box becomes, especially when users don't read script descritpions or if your description is lacking.
2149
+
- Design the sequence of inputs with the user in mind—not by using the order in which they are used in your calculations. Place the most important/frequent selections at the top and test user travel down your list of inputs.
2150
+
- Never use two checkboxes for mutually exclusive selections. Use dropdowns instead; they allow you to include as many useful options as you see fit.
2151
+
- Do not be stingy when naming option selections. The dropdown widget can accommodate long strings.
2152
+
- Remember not to use ampersands in `option` arguments, as your boolean expressions will not work with them.
2153
+
- Choose your default values wisely.
2154
+
- Provide adequate `min` and `max` values for numeric values, selecting the proper *float* or *int* type.
2155
+
- When needed, customize `step` values to the particular use of each inputs.
0 commit comments