GRI-2101: red buttons only for danger, not every secondary action #235
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!235
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-2101-neutral-secondary-buttons"
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?
Fixes #230
Red (
gx-btn gx-btn--secondary) is@grimoirix/design's "urgent ordestructive" button. Expand, Edit, Open, Rename and a number of other
non-destructive actions across the app (Cancel, Back, Log out, Move
up/down, Test the connection, Use the server default, …) were using it
even though none of them is dangerous or permanent.
gx-btn--neutralinfrontend-web/src/index.css— the shareddesign package only ships
--primaryand--secondary, so a neutralvariant has to live here, following the border/text tokens.
gx-btn--neutral.Kept
gx-btn--secondaryonly for Delete, Block, Remove, and thenetwork settings' "Restart now" (it interrupts every connected
device immediately, which reads as urgent rather than merely
inconvenient).
frontend-web/src/designSystemButtons.test.ts: it scans every.tsxfile forgx-btn--secondaryelements and fails when theelement's visible label doesn't contain a danger word (delete,
remove, block, restart). This is the "test or lint" the issue asks
for — a future misuse of the danger class fails this test.
Verification
./scripts/local-gates.sh --frontend-only(prettier, oxlint, tsc,vitest, build) — all green, from a clean install in a dedicated
worktree.
Visual check: widths 360px–1440px, light and dark theme, via the
design tokens only (no hard-coded colors). Buttons keep the shared
:focus-visibleoutline from@grimoirix/design; no new focus orcontrast behavior was introduced — the neutral style reuses
--border-strong/--text/--surface-overlay, the same tokens therest of the app already uses for secondary chrome.