New repo page: Owner/Name row misaligned — matched heights, aligned labels, narrower Owner column (also on Import) #497
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#497
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What's requested
On the New repository page, the Owner select and Name input sit side-by-side in a 50/50
sm:grid-cols-2grid, and the pair is visibly misaligned: the two controls don't read as matched-height siblings, the Name column carries a fixed-height error slot the Owner column lacks (making the columns unequal), and the Owner column is far wider than a bounded dropdown needs — crowding the Name field users actually type into.Prescribe a matched pair:
<select>vs<input>render a few px apart in some browsers even with the same.inputclass; normalize explicitly (e.g. a shared height utility on both, orappearance-nonestyling on the select) rather than relying on the class alone.min-h-[2rem], aria-live) but make it not affect the sibling column's geometry (e.g. error text outside the two-column grid row, oritems-starton the grid so the controls stay top-aligned).allowedOwners); it doesn't need 50% of the row. Use an asymmetric split (e.g.sm:grid-cols-[minmax(0,1fr)_minmax(0,2fr)]or similar), implementer's call on exact ratio, withminmax(0, …)so long owner names truncate instead of blowing the column.Evidence (static read of current tree, commit
b3544e5)web/src/pages/New.jsx:147-186— the row:<div class="grid grid-cols-1 gap-3 sm:grid-cols-2">wraps both fields: equal 50/50 columns.New.jsx:148-168):<label class="grid gap-1">with a<span>label +<select class="input font-mono">(with a disabled fallback select while owners load). No sub-text.New.jsx:169-186): same shape plus<p id="new-name-error" class="min-h-[2rem] …">inside the label — a 2rem-tall block that exists only in the Name column, so the two grid columns have unequal intrinsic heights and the row's baseline math differs per column.web/src/pages/Import.jsx:279-319— the identical pair is copy-pasted on Import (import-ownerselect +import-nameinput, samesm:grid-cols-2, same in-labelmin-h-[2rem]error paragraph). Whatever the fix is, it must land on both or the two pages will diverge.web/src/pages/OrgNew.jsx:80-124— New organization uses stacked full-widthgrid gap-1labels (no two-column row), so it's not affected by the 50/50 issue, but if a shared Owner/Name field component is extracted it should be the one place this idiom lives going forward.web/src/ui.css:120-123—.inputisw-full px-2.5 py-1.5 text-sm; it styles both controls but does nothing to pin select/input rendered heights equal (native select chrome differs per browser), which is the height-match gap.Architecture notes
allowedOwnersinweb/src/lib/orgs.js(self + member orgs, server-admitted set per #346); the list is bounded and short — hence the narrower column ask.New.jsxandImport.jsx. Extracting a small shared component (or at minimum applying the identical classes to both) is preferred so the layout can't drift again; headless validation helpers (validateRepoName) already live inweb/src/lib/and are unaffected.OrgNew.jsxhas no Owner field — "uniform across New/Import/OrgNew" resolves to: New and Import get the fixed paired row; OrgNew just shouldn't regress if a shared component is introduced.Acceptance criteria
/new, Owner select and Name input are the same rendered height and top-aligned; their labels sit on one shared baseline.aria-liveintact.sm:and up (asymmetric split); long owner names truncate/ellipsis rather than stretching the column; mobile single-column stack still works./importshows the same corrected layout (identical classes or shared component).aria-label, disabled loading fallback intact on both pages).Fixed by PR #500 (#500) — shared OwnerNameRow component on /new + /import: matched h-9 heights, items-start + below-grid error slot (aria-live intact), asymmetric sm 1fr/2fr with truncate. Tests 1097/1095/2 (2 pre-existing smoke fails), vite green. Browser proof open.
REVIEW of PR #500 (fix/issue-497, commit
c4ef9b7) — verified in scratch worktree /tmp/pr500 (since removed). No browser drive (node tests + source/CSS reasoning only — noted explicitly per instructions).ACCEPTANCE CRITERIA (all 5 met):
below it (OwnerNameRow.jsx:84) AND items-start on the grid (belt and braces, both options the issue suggested). min-h-[2rem] reserve + aria-live=polite kept; input aria-describedby/aria-invalid wiring intact (OwnerNameRow.jsx:77-78); slot unconditionally rendered (no Show gate — pinned). aria-describedby always resolves (id always mounted). No sibling-shift path remains.
PINS FAITHFUL: #479 collapse test retargeted to shared row (collapsing base + asymmetric sm: split pinned, no bare grid-cols-2); #486 aria/no-shift tests retargeted to below-grid slot (reserved/live/wired + items-start). No backend change (no non-web/non-docs files in diff), no new deps (no package.json/lock changes), docs accurate (12_web_ui.md entry matches verified numbers).
TESTS: full node --test web/test/unit/*.test.js in scratch worktree (node_modules symlinked from main): 1097 total / 1095 pass / 2 fail — the 2 failures are the live-server smoke subtests (smoke.test.js, need a server on :8080); verified IDENTICAL 2 failures on pristine main worktree, so environmental/pre-existing, zero PR-caused. Targeted owner-name-row-497 + create-forms-479 + repo-name-486: 24/24 pass. vite build green.
NO FIXES PUSHED — nothing to fix; branch left untouched.
MERGE RECOMMENDATION: ready to merge.
Fixed by PR #500 (review clean — all 5 criteria pass, h-9 + below-grid slot + asymmetric split verified in compiled CSS), merged. Closing.