feat(ui): collapsible pinned-messages strip (LC-264) #310
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-264-pinned-strip-collapse"
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?
What
The pinned-messages strip (top of every room) is now collapsible (LC-264). It can be folded to a single "Pinned (N)" header line to reclaim vertical space above the message list, and the choice is remembered per room.
Note: the pinned strip itself already existed (top-3 pins, click-to-jump, "See all", live pin/unpin updates). This adds only the missing collapse affordance - it does not rebuild the strip.
How
partials/pinned_strip.html: the strip gains a header row (pin icon + "Pinned" + count + a chevron toggle) above the existing list, and the list is wrapped in an id'd container (#lc-pinned-list-{room_id}). Collapsing sets the listhidden.localStorage(device-local, matching how the LC-238 caret and sidebar-category collapse already work). It uses a delegated click handler (the strip re-renders often, so no stacked listeners) and re-applies state on initial load and onhtmx:afterSettle- so collapsing does not silently pop back open when someone pins/unpins and the strip live-re-renders.main.css: the chevron rotation lives here so it is reliable without a Tailwind rebuild.Pure front-end: no new route, DB, event, or env var. Not operator-visible. No LC-77 fixture impact (fixtures carry no pins).
Tests
routes_pinned::pinned_strip_ships_collapse_toggleasserts the pinned strip ships the collapse marker, toggle, and id'd collapsible list.just testandjust test-saaspass.QA note
The toggle + persistence are JS-driven, so worth a quick manual pass before merge: in a room with pins, collapse the strip (folds to one line, chevron rotates) and reload (stays collapsed); expand and reload (stays expanded); pin/unpin another message while collapsed and confirm the strip stays collapsed; confirm a room with no pins shows nothing and click-to-jump still works.