Skip to content

Floors: default-floor picker, switcher accents, short labels — issue #67 - #77

Merged
nicosandller merged 3 commits into
mainfrom
feat/floor-options
Jul 26, 2026
Merged

Floors: default-floor picker, switcher accents, short labels — issue #67#77
nicosandller merged 3 commits into
mainfrom
feat/floor-options

Conversation

@nicosandller

Copy link
Copy Markdown
Owner

Items 1, 3 and 4 of #67 (item 2 — reordering — is already open as #69). Three new rows in the floor gear popover:

  • Default — a checkbox marking which floor the live card opens on. The defaultFloor config has existed since multi-floor landed and the card already honors it; it just never had UI. Checking a floor writes defaultFloor: <id>; unchecking clears it (back to first-floor behavior).
  • Color — a per-floor accent applied to that floor's switcher button while active (resting buttons stay theme-neutral, so the switcher doesn't turn into a rainbow). Stored as Floor.color; passes through Harden config colour/size values against style-attribute injection #64's cssColor at the sink — a hostile config color produces no styling at all (verified).
  • Short — an abbreviation (GF, 2F, max 8 chars) shown on the switcher button, exactly the reporter's title/abbreviation split: the button shows the short form, the full name stays as its tooltip. Empty = falls back to the name, unchanged from today.

Verification

tsc clean, 351/351 tests, build clean. Harness round-trip: setting Short/Color/Default through the gear rows lands short: "2F", color: "#9c27b0", defaultFloor: "f2" in the config; a fresh card opens on floor 2, its button reads "2F" with tooltip "Upstairs" and computed background rgb(156, 39, 176); swapping in color: "red;position:fixed" renders no style attribute.

Notes

Addresses #67 (with #69 covering its item 2 — between the two, the issue can close).

🤖 Generated with Claude Code

…sue #67)

The floor gear popover gains three rows (issue #67, items 1/3/4):
- Default: which floor the live card opens on — the existing defaultFloor
  config finally gets UI.
- Color: per-floor accent for the card's switcher button while active,
  gated by cssColor (#64) so a hostile config color renders no style.
- Short: abbreviation shown on the switcher button (GF, 2F…); the full
  name stays as the tooltip.

Item 2 of the issue (reordering) is PR #69.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
nicosandller and others added 2 commits July 26, 2026 21:40
No textual conflicts — #69's Order row and this branch's Short/Color/
Default rows land in the same gear popover but on different lines.
Verified semantically rather than trusting that: all five rows coexist in
order (Order, Rename, Short, Color, Default), moveFloor and
ensureFloorIds are each defined once, and #69's id repair preserves the
new per-floor fields (it spreads the floor).

Harness: reorder + Short/Color/Default applied through the popover give
Basement,Roof,Ground with short "RF", color #4caf50 and defaultFloor
f_roof; a fresh card on that config opens on Roof, renders "RF" with
tooltip "Roof" and computed background rgb(76,175,80), in the new order.
Undo rolls the reorder back, so history survived the merge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@nicosandller
nicosandller merged commit d577938 into main Jul 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant