oxidecomputer / console

Oxide Web Console
https://console-preview.oxide.computer
Mozilla Public License 2.0
126 stars 10 forks source link

Firewall Rules: Text -> Combobox for VPC, VPC Subnet, and Instance fields #2065

Closed askfongjojo closed 1 day ago

askfongjojo commented 6 months ago

When creating a firewall rule, user has the options of specifying the source (aka "Host filters") and target using VPC, VPC subnet, or a specific instance as the scope. The name of these objects is currently captured in a free-form textbox which may be prone to typos and is just harder to use.

We already have the target/host name field label changed dynamically based on the type field. We probably want to go one step further to make the name field dynamically display the candidates of that target/host type, similar to what we do for Create Disk:

image

Note: "Picklist" is mentioned in a general sense here. It's likely that a picklist of instances may not be practical since there could be many of them. Perhaps we need a different mechanism for listing/specifying an instance name. For IP and IP subnet, textbox may still be the most appropriate input format.

david-crespo commented 4 months ago

https://www.w3.org/WAI/ARIA/apg/patterns/combobox/

A combobox is an input widget that has an associated popup. The popup enables users to choose a value for the input from a collection. The popup may be a listbox, grid, tree, or dialog.

In some implementations, the popup presents allowed values, while in other implementations, the popup presents suggested values.

I suspect what we want here is the latter: an input that remains fundamentally a free-form text input with some help from a filterable list if you want it. I don't think we'd want to constrain the user to only refer to VPCs, subnets, or instances that currently exist. I believe this API is designed so that you can create the rule first, if you want, and then create the instance that matches the rule.

charliepark commented 4 months ago

~Check #1942 to see if it fixes this~ unrelated, I think