project-robius / robrix

A multi-platform Matrix chat client written in pure Rust using the Makepad UI toolkit and the Robius app dev framework
MIT License
92 stars 17 forks source link

Add side pane view that shows the list of room members (and their power levels) #119

Open kevinaboos opened 2 months ago

kevinaboos commented 2 months ago

This view should be called the RoomMemberPane, and can be modeled after (i.e., directly copied from) the existing UserProfileSlidingPane. All you need to do is duplicate that and then replace the existing contents of that pane with a very simple PortalList (or FlatList) of items, in which each item is a RoomMember.

By default, just the avatar and user display name should be shown, but for members with non-default power levels, either Admin or Moderator should be shown beside their name. Here's an example of what Element shows:

image

(Note that we don't need to support the "Invite to this room" button just yet, that can be saved for a future issue/milestone that covers administrative features).

The Room Member pane could be activated by clicking the room name at the top of the RoomScreen (timeline) view, which is currently actually the StackNavigation header.

Upon clicking/tapping on a user in the list of room members, that user's profile should be shown. This is already supported directly by the existing Avatar widget in Robrix, so you just need to add an event handler that performs the same action (showing a user profile pane) upon any part of the PortalList item area (the list entry) that corresponds to a given user.

It's quite simple to obtain the list of users for a room; use the Room::members() function.

tyreseluo commented 1 month ago

Hi! @kevinaboos, please change this issue status to in process. It's time for the search bar to end. 🤣🤣