Floors: default-floor picker, switcher accents, short labels — issue #67 - #77
Merged
Conversation
…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>
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>
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.
Items 1, 3 and 4 of #67 (item 2 — reordering — is already open as #69). Three new rows in the floor gear popover:
defaultFloorconfig has existed since multi-floor landed and the card already honors it; it just never had UI. Checking a floor writesdefaultFloor: <id>; unchecking clears it (back to first-floor behavior).Floor.color; passes through Harden config colour/size values against style-attribute injection #64'scssColorat the sink — a hostile config color produces no styling at all (verified).GF,2F, max 8 chars) shown on the switcher button, exactly the reporter's title/abbreviation split: the button shows the short form, the fullnamestays as its tooltip. Empty = falls back to the name, unchanged from today.Verification
tscclean, 351/351 tests, build clean. Harness round-trip: setting Short/Color/Default through the gear rows landsshort: "2F",color: "#9c27b0",defaultFloor: "f2"in the config; a fresh card opens on floor 2, its button reads "2F" with tooltip "Upstairs" and computed backgroundrgb(156, 39, 176); swapping incolor: "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