Creating an environment wildcard is weird
When creating environment-specific variables, I type in something like
production for the environment pattern, but the box returns
No matching results, which kind of makes sense given that I don't have a production environment yet, but it's totally unclear how to proceed. I thought I couldn't, until I noticed the
Create wildcard production option. Why do I have to create anything here? What does creating a wildcard even mean? Especially since this isn't a wildcard at all.
If I already had a
production environment, would this behave differently? If so, then we need to account for people making variables before the environment exists, especially for the case I'm trying right now which is to declare the
AUTO_DEVOPS_DOMAIN which has to exist before any environments are created (ignoring that I could create one manually first, but that's dumb).
Add a table header to the variable list, with column titles:
Environment scope. This is to gain some horizontal space by removing the
Protected label from each row as well as better organization.
Replace the Environment dropdown button with a plain text input. When creating a new variable, this input will be empty by default. If the user saves without specifying this field, a
* will be added.
When the user clicks on the input field, an autocomplete dropdown appears. It would work similarly to the issue/MR search.
The options in this dropdown will be:
* (All environments)
Environment names used in other variables
All these values are shown without distinction because separating them in different sections would indicate to users that they can only select one of the values in the list, and would deter them from trying to type in their own string.
An additional row with in secondary text style is shown above the options with the help text:
Enter scope (wildcards allowed) or select a past value. Learn more
Where the anchor links to our docs at
When the user starts typing, any environments that match the string will be highlighted in bold. The help text is no longer visible.
A new row appears at the bottom containing the exact string the user typed in double quotes. This way, we indicate that they can use that as a custom value.
This dropdown should be navigatable with the arrow keys and selectable with the
Enter key (same as issue/MR search)
If the user selects their custom option, it gets displayed in plain text form and it will be possible to select it from the dropdown when a new variable is added in the future.
On mobile, the dropdowns will be full-width.
If the user is editing a value that had been previously entered, the dropdown will be populated only with the environments that match the existing string.