Repository navigation
ui(accounts): account and registration row actions as icon buttons - #1608
Conversation
Accounts: Edit / Test / Overrides / Delete become compact SVG icon buttons in one non-wrapping row, matching the Users rows (edit, zap, sliders, trash). Each has a per-account aria-label (unchanged) and a title tooltip; the short verb stays as sr-only text so code and tests that find an action by its text still work. Delete keeps .btn-destructive as its hook but uses the subtle danger look, set slightly apart, instead of a solid red button. The Test check reports progress and its result through the hidden text, tooltip and a short green/red tint, as the text button did through its label. Registrations: Approve stays a small primary text button (the main call to action, now with an aria-label naming the registration); Reject and Delete are icon buttons, and nothing stacks. Adds the sliders and zap icons to icons.ts and a shared rowIconButton helper; jest covers both rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up to the account row icon buttons. Their sr-only verb is absolutely positioned and had no positioned ancestor, so on phones, where the accounts table scrolls sideways, it sat at the table's far edge and widened the page. Make the icon buttons its containing block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adapted for standalone: the table sweep PR adds clipboard-check to the line above, and editing neighbouring lines of the same list made the two PRs conflict. Same icons, same tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 27 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merge gate record (burndown orchestrator) Independent adversarial review (claude-opus-5-5)
Local verification
Screenshots (1440x900 and 390x844) are kept with the local run evidence; not attached here. |
On Admin > Accounts & onboarding, each account row had four text buttons (Edit, Test, Overrides and a solid red Delete), and the registration rows stacked Approve, Reject and Delete onto two lines. On phones, where the accounts table scrolls sideways, the account buttons wrapped into a column and made each row several times taller than its content. This PR turns those actions into compact SVG icon buttons in one non-wrapping row, matching the Users, Groups and API key rows.
Part of the UI modernization sweep.
What changed
frontend/src/lib/row-icon-button.ts(new): arowIconButton()helper that builds abtn btn-small icon-btnwith an SVG icon, atitletooltip, anaria-labelnaming the row, and the short verb assr-onlytext. Code and tests that find a row action by its text ("Delete", "Overrides") keep working.frontend/src/icons.ts: adds theslidersandzapicons (Feather).frontend/src/settings.ts, account rows: Edit (pencil), Test (zap), Overrides (sliders) and Delete (trash) are icon buttons inside a.row-actionswrapper. Thearia-labels are unchanged. Delete keeps.btn-destructiveas its hook but uses the subtle danger look (tinted, red icon, solid red only on hover), set slightly apart. The credentials Test reports "Testing...", "OK" or "Failed" through the hidden text and tooltip plus a short green/red tint, as the text button did through its label; the toasts are unchanged.frontend/src/modules/registrations.ts, registration rows: Approve stays a small primary text button as the main action, now with anaria-labelnaming the registration. Reject (x-circle, warning tone) and Delete (trash) are icon buttons, all on one line.frontend/src/styles/settings.css: the actions cell stays a table cell (acomponents.cssrule made it a flex box, which pulled its bottom border out of line), plus the danger variant, the test-result tint and Approve's height matched to the icons. The icon buttons are the containing block for theirsr-onlytext. Without that, on phones the hidden text sat at the scrolling table's far edge and widened the page (second commit).a11y.test.tschecks that account row actions are icon buttons with a per-account name and tooltip;registrations.test.tschecks that Approve stays a text button and Reject/Delete are named icon buttons in one row;icons.test.tscovers the two new icons.Why
Four text buttons per row, one of them solid red, made the danger action the loudest thing in every row and pushed the tables wider than needed. The Users, Groups and API key tables already use icon row actions, so Accounts now looks the same.
Screenshots
Before = main at 43dd618; after = this branch. Headless Chromium at 1440x900 (desktop) and 390x844 (phone) against a mocked API.
Verification
Run on this branch's head
05f0ef65(main 43dd618 + 3 commits), fromfrontend/:npm run typecheck: pass.npm run lint: 0 errors (141 warnings, the same as main).npm run build: pass.a11y.test.ts,registrations.test.tsandicons.test.ts).e2e-local.sh, the repo's full suite): 276 passed. The existing specs that click account and registration actions by name pass unchanged.Notes for review
sr-onlyverb inside each icon button is deliberate. It keeps text-based lookups (insettings.ts, jest and Playwright) working without changing the accessible names, which come from the existingaria-labels.Overlaps
frontend/src/icons.tsandfrontend/src/__tests__/icons.test.tsare also touched by ui(tables): compact tables with pinned actions and consistent values #1612 (addsclipboard-check). The new icon names here go on their own line in the test list so the two PRs merge cleanly (third commit).frontend/src/modules/registrations.tsis also touched by ui(accounts): accounts page polish (federation cards, file picker) #1611 (one class on the status cell). They merge cleanly.frontend/src/styles/settings.cssis also touched by ui(settings): admin settings sections as cards with visible hints #1606, ui(settings): quiet danger style for Reset to Defaults #1609, fix(users): permission overview shows admin:* grants and verb variants #1610 and ui(accounts): accounts page polish (federation cards, file picker) #1611. All pairs merge cleanly in any order.Note for the UI owner
This changes UI code that @cristim owns. IAmJSD reviewed the before/after screenshots and asked for these PRs; any design point you disagree with can be a follow-up.
🤖 Generated with Claude Code