I put a raw YAML box on every console form, even forms with nothing left to type
Our cloud console is where developers create projects, environments and resources for every service. When I designed its forms I wrote one rule for all resource kinds: the spec is edited on a form with the fields the page lists, plus YAML text for every other field. Then I built that rule as a single shared form component. Every create and edit form in the console ended with a text area labelled “Every other field of the spec (YAML)”. On pages that offered no fields, it was labelled just “Spec (YAML)”.
The first real user hit this on the very first form. A project’s spec has exactly one field, a deletion-protection boolean, and the form already shows it as a switch. Under the switch sat an empty YAML box with no placeholder, no help text and no link to documentation. The documentation site had no public page describing a project’s spec either. And the server rejects unknown fields, so anything typed into that box would be refused. The box could not hold any valid input.
What I got wrong
The design. I made a free-text escape hatch mandatory for every kind, when the rule should have been that each form covers every field of its spec. My rule never said which fields a page had to offer. A page offering zero fields met it with a bare text box, and three kinds ended up with nothing else. I also wrote the same “edit it as YAML” approach into another screen’s requirements. What I’d written was a generic data-entry mechanism, not a form.
The implementation. I built the rule exactly as written. I never stopped to see that for projects and environments, “every other field” was an empty set. A box that can only produce refused requests is a design bug, and I should have raised it instead of rendering it. The codebase already had typed inputs (text, bounded numbers, switches, selects, selects filled from the platform’s own data), and every spec type already had a machine-readable schema. I used neither to cover the rest of a spec’s fields. Typing YAML was what was left after I’d done the easy part.
The review. I checked each screen against its requirement line, not against what a user would actually do. The form matched my rule word for word and still failed its first user. Nobody, me included, asked: “What does the user type here, and where do they find out?”
What I should have written
- A spec form’s inputs are the spec’s fields, each with an input that fits its type: a switch for a boolean, a number input with bounds for a bounded number, a select for an enumerated value, and a select over existing resources for a reference. Every field gets an input, and nothing is left over for a text box.
- If the console can’t yet cover a kind field by field, that kind has no create form and gets a tracked issue instead. Raw YAML and JSON belong to the CLI and the API, not to a graphical product.
- Help text on the form explains what each field means. Users shouldn’t need to search a documentation site to fill in a form.
What I’m changing
The ruling for the rebuild is: no raw YAML anywhere, every spec field gets a typed input, and any input whose valid values the platform already knows is a select.
I’d already learned related lessons: use closed sets instead of free-form strings, and walk the user’s next step from what the page gives them. But I had kept each one confined to the area where I first learned it. The general rule I now apply: a graphical interface limits input to the valid shapes the system already knows, and any free-text field has to justify itself.
When I review a design or a form now, I flag these:
- Wording like “as YAML”, “as JSON”, “every other field”, “the rest of the spec” or “raw” in a requirement or label for a user-facing form.
- A form component that still renders a text area when it has no fields to offer.
- A form that already covers the whole spec but still renders an input for “the rest”.
- A form requirement that doesn’t name a single field of the thing it writes.
- An input with no help text, no placeholder and no documentation to read.
For every input, I ask what the user would type and where they would learn it. If the answer is “they can’t”, the input doesn’t ship.