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

feat(ui+ffi): Add various features to RoomList #2054

Merged
merged 7 commits into from
Jun 14, 2023

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented Jun 12, 2023

Address #1911.

This PR must be reviewed commit by commit.

@Hywan Hywan requested a review from a team as a code owner June 12, 2023 23:24
@Hywan Hywan requested review from bnjbvr and removed request for a team June 12, 2023 23:24
@Hywan Hywan force-pushed the feat-ui-roomlist-more-features-on-item branch from 5143fee to 1c87728 Compare June 12, 2023 23:24
@Hywan Hywan mentioned this pull request Jun 12, 2023
62 tasks
@Hywan Hywan changed the title feat(ui+ffi): Add various features feat(ui+ffi): Add various features to RoomList Jun 12, 2023
@Hywan Hywan requested a review from stefanceriu June 12, 2023 23:31
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage: 94.11% and project coverage change: +0.11 🎉

Comparison is base (3547bd2) 75.59% compared to head (1519931) 75.70%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2054      +/-   ##
==========================================
+ Coverage   75.59%   75.70%   +0.11%     
==========================================
  Files         149      151       +2     
  Lines       16158    16174      +16     
==========================================
+ Hits        12214    12244      +30     
+ Misses       3944     3930      -14     
Impacted Files Coverage Δ
crates/matrix-sdk-ui/src/room_list/state.rs 93.02% <93.02%> (ø)
crates/matrix-sdk-ui/src/room_list/room.rs 93.93% <93.93%> (ø)
crates/matrix-sdk-ui/src/room_list/mod.rs 92.18% <100.00%> (-1.37%) ⬇️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Looks like it's on the right path! A few questions below.

@@ -198,6 +198,10 @@ impl RoomListItem {
RUNTIME.block_on(async { self.inner.name().await })
}

fn full_room(&self) -> Arc<Room> {
Copy link
Member

Choose a reason for hiding this comment

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

What do you mean by full?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a legacy term that means: gimme the matrix_sdk_ffi:Room instance. Happy to change to something more meaningful.

Copy link
Member

Choose a reason for hiding this comment

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

Ah ok, as a newcomer this feels a bit strange, maybe room would be sufficient? (no strong opinion here, so you choose)

crates/matrix-sdk-ui/src/room_list/mod.rs Show resolved Hide resolved
@@ -89,7 +90,8 @@ impl Action for AddVisibleRoomsList {
.add_list(
SlidingSyncList::builder(VISIBLE_ROOMS_LIST_NAME)
.sync_mode(SlidingSyncMode::new_selective())
.timeline_limit(20),
.timeline_limit(20)
.required_state(vec![(StateEventType::RoomEncryption, "".to_owned())]),
Copy link
Member

Choose a reason for hiding this comment

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

Should we also enable m.room.member events here, to help address #2004?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe! @poljar, @stefanceriu, @manuroe, any thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

Isn't damir talking only about the rooms you're subscribing to and not the full lists? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, you're only sending events in a room that you're subscribed to. So only there we'll need the member events.

]),
])
.filters(Some(assign!(SyncRequestListFilters::default(), {
is_invite: Some(false),
Copy link
Member

Choose a reason for hiding this comment

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

Sometime later, maybe when the list has been fully loaded, we need to flip this to true, otherwise we won't ever get invites?

Copy link
Member Author

Choose a reason for hiding this comment

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

We will create a special list dedicated to invites. As it's the case in ElementX right now.

Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

(I'd like to re-review after seeing the answers, so making my intent clearer here :))

Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

This looks good and works well 👍

Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Cool, thanks for the answers, lgtm!

@@ -198,6 +198,10 @@ impl RoomListItem {
RUNTIME.block_on(async { self.inner.name().await })
}

fn full_room(&self) -> Arc<Room> {
Copy link
Member

Choose a reason for hiding this comment

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

Ah ok, as a newcomer this feels a bit strange, maybe room would be sufficient? (no strong opinion here, so you choose)

@Hywan Hywan merged commit 2c87180 into matrix-org:main Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants