fix(sidebar): show room count on collapsed-category header #136
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/sidebar-collapsed-room-count"
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?
Bug report
User: "all rooms disappear / move to All Rooms when I collapse a category."
Root cause
Not a bug; visual confusion. The sidebar template renders a category's room
<ul>only when!category.collapsed, so collapsing hides every room inside. The DB assignments persist (verified by repro test); the rooms are still in the category, just not in the DOM.With no visual hint of "N rooms inside this collapsed category", an empty-looking header next to a populated "All rooms" section reads as "rooms relocated".
Fix
Show
(N)next to the collapsed-category name so the user can see rooms are still inside. Usescategory.rooms.len()which is already onSidebarCategoryGroup(phase 3 added it for the aggregate). Sits between the name and the existing unread / mention aggregate pills, in muted slate-400 so it stays quiet when the category has no unread activity.Expanded categories don't need it - the
<ul>is right there showing the rooms.Test plan
just check(fmt + clippy across standalone + saas).▸ Work (3)style label appears next to its name.