Repository navigation
console: pick the zone type from a segmented control in Create Zone - #470
Merged
Merged
Conversation
The Create Zone dialog now opens on type cards with a one-line description each. Primary, Secondary and Forwarder lead; Stub, Alias, Catalog and Secondary Catalog wait behind More Types, which stays open once one of them is picked. The Alias card says why it is unavailable while no zone can be mirrored. Zone Name moves under the type, focuses on open, and checks itself inline: a pasted URL, an IP address, bad characters, an overlong label, or a zone that already exists on the list. The TSIG key only shows for types that transfer or accept updates, and points to Settings when no key exists. Dialogs now focus an [autofocus] field before the first input, as the helper intended.
Owner
Author
|
Quality is red on No fix PR exists yet. The patch is one line in -toolchain go1.27.2
+toolchain go1.27.3I've left it out of this UI PR. Once that bump lands on Generated by Claude Code |
Nick picked a segmented control over the cards. Primary, Secondary and Forwarder are pill segments, and More opens Stub, Alias, Catalog and Secondary Catalog in a list under the bar, then takes the picked type's name. A help line under the bar describes the picked type. The dialog is back to its original width.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Nick · project thread
Before: Create Zone opened on a name field. Next came a bare dropdown of seven zone types with no explanation, then a TSIG select. The TSIG select showed for every type, including Forwarder and Alias where it does nothing, and offered only "None" when no keys existed. Alias was greyed out with no reason given.
After: you pick the type first, from a pill segmented control: Primary / Secondary / Forwarder / More. More opens Stub, Alias, Catalog and Secondary Catalog, each with a description, in a list under the bar. Once you pick one, the segment takes its name ("Stub ▾"). A help line under the bar describes the picked type. The name comes next, then only the fields that type uses. Nick picked this layout from four mockups (cards, list, dropdown, chips).
How
zones.templ: a singlezoneKindslist (value, title, description, common) drives bothZoneTypePickerand the disabled type select in Zone Settings, so the two can't drift. Each choice is a visually hidden radio namedtype, so the form posts exactly what it did before. When there's no zone to mirror, Alias is disabled and says "Needs a primary or secondary zone to mirror first." TSIG has its own section after the type fields. With no keys configured, that section is a line pointing to Settings › TSIG instead of an empty select.app.js:syncZoneCreateTyperuns on change, on setup and on form reset. It shows the type's sections, updates the help line and the More label, and closes the More list. TSIG shows for primary, secondary, stub, catalog and secondary catalog.app.js: dialogs now focus an[autofocus]field before falling back to the first input. Before,querySelector('[autofocus], input…')returned whichever came first in the document, soautofocusonly worked on a dialog's first field.app.css:.zone-type-segmentsuses the same pill track, active segment and shadow as.dialog-tab-list. The More list sits inline under the bar instead of floating, because a floating panel gets clipped by the dialog. The dialog stays at its original 32rem.Screenshots
main)States that are new in this PR, so they have no before shot:
The Vandelay demo has no TSIG keys, so every shot shows the "add one under Settings" line. With keys configured, the select appears in that spot.
Checks
go tool mage verifypasses, andgofmt -l .prints nothing.TestCreateZoneDialogPicksTypeFromSegmentscovers:seg-zone.testas Primary works and opens the new zonegovulncheckuntil the Go 1.27.3 bump (Build with Go 1.27.3 for GO-2026-6809 #471) lands onmain. After that I'll mergemainin here.