Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP the desktop ui for room details pane (room info, room members) #119 #213

Conversation

tyreseluo
Copy link
Contributor

@tyreseluo tyreseluo commented Oct 25, 2024

Fixes: #119

@tyreseluo tyreseluo changed the title WIP the desktop ui for room details pane (room info, room members) #119 WIP the desktop ui for room details pane (room info, room members) (#119) Oct 25, 2024
@tyreseluo tyreseluo changed the title WIP the desktop ui for room details pane (room info, room members) (#119) WIP the desktop ui for room details pane (room info, room members) #119 Oct 27, 2024
@tyreseluo
Copy link
Contributor Author

b1oxKOA0pD.mp4

Copy link
Member

@kevinaboos kevinaboos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, great start! I've left a review at your request even though the PR is marked as a draft.

From a UI design perspective, I feel like this is a bit clunky because it uses a lot of vertical space, which is particularly egregious on small screens. However, we should reach out to an actual UI designer for better ideas & informed opinions, like Sebastian from Makepad.
However, it's ok for now since it enables us to test the actual UX functionality & behavior.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's choose a different icon. this does not look like a "leave room" icon to me, it barely even looks like an open door... it's too abstract.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please place this and all icon files in the proper subdirectory within resources/.

Comment on lines +1332 to +1346
// Handle the room info tab being clicked.
if self.button(id!(room_info)).clicked(&actions) {
self.show_room_info_pane(
cx,
&room_details_pane,
);
}

// Handle the room members tab being clicked.
if self.button(id!(room_members)).clicked(&actions) {
self.show_room_members_pane(
cx,
&room_details_pane,
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for these, don't you actually want to toggle the room info/members pane, instead of unconditionally showing it?

That is, if the room_info tab button is clicked when the room info tab is already open, the user would likely expect that pane to be closed.

Comment on lines +1400 to +1410
if pane.is_currently_shown(cx) {
pane.handle_event(cx, event, scope);
}

if room_details_pane.is_currently_shown(cx) {
room_details_pane.handle_event(cx, event, scope);
}
}

self.view.handle_event(cx, event, scope);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't quite correct. We only want to have the underlying view handle the event if it doesn't require visibility AND none of the panes are currently shown. You've changed it to handle the event unconditionally.

@@ -12,6 +12,8 @@ pub mod login;
pub mod home;
/// User profile info and a user profile sliding pane.
mod profile;
/// Room details info and room members sliding pane.
mod room;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use a more descriptive name. room is widely used in the Matrix SDK itself and isn't a good name for this.

room_info_sliding_pane would be my recommendation.

Comment on lines +212 to +231
fn handle_actions(&mut self, _cx: &mut Cx, actions:&Actions, _scope: &mut Scope) {

if self.button(id!(copy_link_to_room_button)).clicked(actions) {
log!("Copy link to room button clicked");
}

if self.button(id!(invite_button)).clicked(actions) {
log!("Invite button clicked");
}

if self.button(id!(leave_room_button)).clicked(actions) {
log!("Leave room button clicked");
}
}
}

impl RoomInfoPane {
pub fn set_room_info(&mut self, room_info: RoomInfo) {
log!("Setting room info: {:?}", room_info);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i assume this is still a WIP?

@kevinaboos kevinaboos added the waiting-on-author This issue is waiting on the original author for a response label Nov 7, 2024
@tyreseluo tyreseluo self-assigned this Nov 8, 2024
@tyreseluo tyreseluo closed this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-author This issue is waiting on the original author for a response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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