feat(dm-list): group DM avatars, iOS autocapitalize fix, and timeline/sort fixes#816
Draft
Just-Insane wants to merge 8 commits into
Draft
feat(dm-list): group DM avatars, iOS autocapitalize fix, and timeline/sort fixes#816Just-Insane wants to merge 8 commits into
Just-Insane wants to merge 8 commits into
Conversation
- RoomNavItem: for group DMs (>2 joined members) render a 3-slot mini-avatar cluster instead of the single room avatar, using the same useGroupDMMembers / UserAvatar logic as the sidebar new-chat panel; bot accounts are filtered out automatically - styles.css: add GroupAvatarRow / GroupAvatarMini for the triangle layout (top-centre, bottom-left, bottom-right) inside size="200" - useGroupDMMembers: accept Room | undefined so RoomNavItem can skip the hook conditionally for non-group DMs - Direct: bump activityCounter once immediately after re-attaching timeline listeners so the list re-sorts on mount / directs change, fixing stale order after a limited-sync reload
When a room is opened via notification tap (eventId in URL) and a TimelineReset fires while loadEventTimeline is in flight — which happens consistently on iOS background resume when mx.retryImmediately() triggers a fresh sliding sync batch — useLiveTimelineRefresh resets to the live timeline and the blank-protection re-arms hasInitialScrolledRef. blocked the scroll from firing once events arrived in the live timeline, leaving the room permanently blank (only header + text input visible). The liveTimelineLinked guard already provides the necessary protection: historical slices returned by loadEventTimeline are never live-linked, so an in-flight loadEventTimeline. Also drop eventId from the dep array since it is no longer read inside the effect. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…f Transforms hack
… RoomItem, slidingSync - Combine type-only and value imports per consistent-type-imports rule - Remove unused imports (NetworkInformation interface, unwrapRelationJumpTarget, useMessageEdit, etc.) - Fix RoomItem: use Membership.Join instead of KnownMembership.Join - Add eslint-disable comments for class-methods-use-this in ExtensionPresence
…n encrypted rooms - Implement group DM triangle-avatar layout in RoomNavItem (the wider DM list panel). The CSS (GroupAvatarRow/GroupAvatarMini) was already defined in styles.css.ts from feat/dm-list-group-avatars but the JSX implementation was never added. - Fix ArrowUp edit-last-message failing in encrypted rooms: use getEffectiveEvent()?.type instead of getType(), which returns the wire type m.room.encrypted rather than the actual message type.
SpaceTab was using RoomUnreadProvider with the space's own roomId, but space rooms carry no messages so the unread count was always zero. Replace with the same recursive aggregation pattern used by SpaceMenu: useSpaceChildren + useRecursiveChildScopeFactory to gather all descendant room IDs, then useRoomsUnread to sum their unread counts. The SidebarUnreadBadge now lights up correctly whenever any child room (or sub-space room) has unread messages or highlights.
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.
Description
Five commits bundled around the DM list and related iOS/timeline fixes.
feat(dm-list): group member avatars and sort on reload
TimelineResetevent).fix(editor): hidden input for iOS autocapitalize
Transformshack (inserting and immediately deleting a space on focus) with a visually hidden<input>that the iOS keyboard reads for autocapitalize hints. Less fragile and doesn't produce undo-history noise.fix(timeline): unblock initial scroll after TimelineReset with eventId
isReadycould get stuck if aTimelineResetfired before the event was found. Now unblocked correctly.fix: import cleanup and lint
RoomTimeline,ThreadDrawer,RoomItem, andslidingSync.Type of change
Checklist