feat(sidebar): collapsed aggregate + mobile tap target (LC-79 phase 3) #132

Merged
nrupard merged 1 commit from feat/lc-79-phase3-collapsed-aggregate-mobile into main 2026-05-18 17:33:42 +02:00
Owner

Summary

LC-79 phase 3: aggregate unread / mention badges on collapsed categories, plus mobile tap-target fix for the move-to-category dropdown. Closes LC-79 phase 3 and the LC-79 umbrella.

Aggregate badges

SidebarCategoryGroup gains unread_total and mention_total. load_sidebar sums them after bucketing rooms into the group. The collapsed-category header inline-renders the two as small pills (blue for unread, red for @N mentions) so the user sees "you have stuff in here" without having to expand.

Mute treatment mirrors the per-room badge: muted rooms contribute zero to unread_total (the per-room blue pill hides for muted rooms today), while mentions ignore mute (the per-room mention pill ignores it too). Keeps the aggregate consistent with the sum of what would be visible if you expanded the category.

Mobile tap target

The hover-revealed move-to-category trigger on each room used opacity-0 group-hover:opacity-100, which means it never appears on touch devices (no hover). Switched to opacity-60 md:opacity-0 md:group-hover:opacity-100 so:

  • mobile: pill is faintly visible (60% opacity) so the user can tap it;
  • desktop: same hover-to-reveal behaviour as before.

Out of scope

  • Drag-and-drop on touch devices: native HTML5 DnD is desktop-only. Mobile users reorder via the existing "Move to category" / "Remove from category" dropdown. A touch-fallback (long-press + reorder) would be its own PR.
  • Sidebar slide-in panel for mobile: already implemented in layout.html (hidden md:flex + hamburger toggle). Categories render fine inside that panel; no layout changes needed.

Test plan

  • just check (fmt + clippy across standalone + saas).
  • just test (full standalone suite, all green; 9/9 sidebar tests pass from phases 1+2).
  • Manual: collapse a category that has unread rooms - verify the blue pill appears with the right count; mention a user in one of its rooms - verify the red @N pill appears; mute one of its rooms - verify the unread pill drops by that room's unread count.
  • Manual on mobile (or DevTools mobile emulation): tap a room row in a sidebar with categories - verify the is visible and tappable.
## Summary LC-79 phase 3: aggregate unread / mention badges on collapsed categories, plus mobile tap-target fix for the move-to-category dropdown. Closes [LC-79](https://niceguyit.myjetbrains.com/youtrack/issue/LC-79) phase 3 and the LC-79 umbrella. ## Aggregate badges `SidebarCategoryGroup` gains `unread_total` and `mention_total`. `load_sidebar` sums them after bucketing rooms into the group. The collapsed-category header inline-renders the two as small pills (blue for unread, red for `@N` mentions) so the user sees "you have stuff in here" without having to expand. Mute treatment mirrors the per-room badge: muted rooms contribute zero to `unread_total` (the per-room blue pill hides for muted rooms today), while mentions ignore mute (the per-room mention pill ignores it too). Keeps the aggregate consistent with the sum of what would be visible if you expanded the category. ## Mobile tap target The hover-revealed `≡` move-to-category trigger on each room used `opacity-0 group-hover:opacity-100`, which means it never appears on touch devices (no `hover`). Switched to `opacity-60 md:opacity-0 md:group-hover:opacity-100` so: - mobile: pill is faintly visible (60% opacity) so the user can tap it; - desktop: same hover-to-reveal behaviour as before. ## Out of scope - Drag-and-drop on touch devices: native HTML5 DnD is desktop-only. Mobile users reorder via the existing "Move to category" / "Remove from category" dropdown. A touch-fallback (long-press + reorder) would be its own PR. - Sidebar slide-in panel for mobile: already implemented in `layout.html` (`hidden md:flex` + hamburger toggle). Categories render fine inside that panel; no layout changes needed. ## Test plan - [x] `just check` (fmt + clippy across standalone + saas). - [x] `just test` (full standalone suite, all green; 9/9 sidebar tests pass from phases 1+2). - [ ] Manual: collapse a category that has unread rooms - verify the blue pill appears with the right count; mention a user in one of its rooms - verify the red `@N` pill appears; mute one of its rooms - verify the unread pill drops by that room's unread count. - [ ] Manual on mobile (or DevTools mobile emulation): tap a room row in a sidebar with categories - verify the `≡` is visible and tappable.
feat(sidebar): collapsed-category aggregate badges + mobile tap target (LC-79 phase 3)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 53s
e55b912782
Aggregates per-category unread + mention counts on `SidebarCategoryGroup` so the collapsed-header inline pills surface a "you have N unread in here" hint without the user having to expand. Muted rooms suppress their per-room badge today, so the aggregate also excludes them; mentions ignore mute (the per-room mention badge does too) so the aggregate is the raw sum.

The per-room move-to-category dropdown was hover-only via `opacity-0 group-hover:opacity-100`, which makes the `≡` trigger invisible on touch devices that never fire `hover`. Switched to `opacity-60 md:opacity-0 md:group-hover:opacity-100` so the affordance is visible on mobile and stays out of the way on desktop.

Closes LC-79 phase 3. Drag-and-drop on touch is still a no-op (native HTML5 DnD is desktop-only) - rooms reorder via the existing move dropdown there.
nrupard deleted branch feat/lc-79-phase3-collapsed-aggregate-mobile 2026-05-18 17:33:42 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/lets-chat!132
No description provided.