Devices list: per-user column visibility + reorder (Discussion #56 follow-up) #736
Replies: 4 comments
-
|
Thanks @bdunncompany — PR #737 received and tracked. Will respond on the PR with decisions on the three open questions (default-visible set, Tags chip vs text, two-key vs one-key localStorage). Leaving this discussion open until #737 merges. |
Beta Was this translation helpful? Give feedback.
-
|
Friendly follow-up — circling back on the three open questions from this discussion: (1) default-visible column set size, (2) Tags chips vs text, (3) two-keys vs one-key localStorage. Happy to go whichever direction you prefer; flagging because PR #737 is otherwise ready to come out of draft once those land. I'll also need a rebase on top of #778's fetchAllDevices rewrite (mechanical but real — your earlier triage flagged this), so I can sequence that after your answers. No rush — just keeping the loop closed. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the patience — decisions on all three so you can come out of draft. 1. Default-visible set → keep the existing 9. It's the only choice that's a true no-op on upgrade: nobody opens Devices to find their layout rearranged. A lean-default + opt-in is a nicer ideal, but it's a silent behavior change for 100% of existing users to buy an aesthetic win — if we ever want that, it's a separate, announced change. Ship the 9 as the floor. 2. Tags → chips, but cap them. Tags are the one genuinely categorical column, and chips scan better than comma text — "match the other columns" isn't persuasive when the data type is different. The only real risk is row-height/width blowup, so cap visible chips and collapse the rest into a 3. Storage → one key, not two — but the reason isn't "drift." Your two-key instinct is defensible and the code degrades gracefully, so this is a cleanup ask, not a bug. The thing I'd change: // breeze.devices.columns
{ "v": 1, "columns": [ { "id": "hostname", "visible": true }, { "id": "tags", "visible": false } ] }Collapsing them means one atomic
Same guarantee your two keys were protecting, atomic, single source of truth. Keep the Net: green-light on (1) and (2) as-built; (3) is the one change — fold the two keys into the versioned ordered list above. Rebase on #778's |
Beta Was this translation helpful? Give feedback.
-
|
Shipped in #737 (merged 2026-05-31). Per-user column visibility on the Devices list, persisted in a single versioned |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What
Make the columns shown on the Devices list user-controlled (which to show + what order). Deployed and running today at https://breeze.bdunn.com behind the existing auth. Posting this for review/green-light before opening the PR.
Why
Devices list today has a fixed 9-column set. Operators with different roles need different things visible:
Adding all of those as always-on columns balloons row width on small displays. A per-user toggle + reorder lets each operator keep the same surface but tune what's visible.
Where (code)
apps/web/src/components/devices/columnVisibility.ts(new) — single source of truth for column IDs, labels, default-visible set; localStorage read/write helpers.apps/web/src/components/devices/osIcons.tsx(new) — inline SVG OS glyphs for the compact OS column.apps/web/src/components/devices/DeviceList.tsx— wires the toggle menu, persists user choice, renders columns in the user's chosen order.Branch (fork):
feat/devices-list-column-visibilityonbdunncompany/breeze.Behavior
localStorageunder two keys (visibility-set + order-list). Two keys (not one combined value) so a future column added toCOLUMN_IDSdoesn't get retroactively marked visible for users who had toggled the set when the catalog was smaller.typeof windowguards + try/catch for Safari private-modeSecurityError).Status pill
Same change touches the status pill: the column now shows compact glyphs (
Up/Down/Maint/Decom/Quar/Upd) with the long form on thetitleattribute, so a row at 1280px wide stays readable and the long form is still one hover away. This is part of the same PR because the column-visibility work makes status optional — when shown, it should be tight.Tests
columnVisibility.ts— read/write/default/malformed/SSR paths.(All green locally on the branch; happy to paste vitest output in the PR.)
Open questions before PR
Tagscolumn renders space-separated chips when visible. Acceptable styling pattern, or want me to render as comma-separated text to match the others?Reasonably close to the WoL pattern (Discussion #694 → PR #703) — opening the Discussion first per your usual flow. PR ready to push as soon as you green-light.
cc @ToddHebebrand
Beta Was this translation helpful? Give feedback.
All reactions