-
Notifications
You must be signed in to change notification settings - Fork 252
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): Client-side sorting in RoomList
#3585
Commits on Jun 30, 2024
-
chore(cargo): Update
eyeball-im
andeyeball-im-util
.The idea is to get the `SortBy` stream adapter.
Configuration menu - View commit details
-
Copy full SHA for 73b481a - Browse repository at this point
Copy the full SHA 73b481aView commit details -
feat(ui):
RoomList::entries*
manipulates aRoom
.This patch is quite big… `RoomList::entries*` now returns `Room`s instead of `RoomListEntry`s. This patch consequently updates all the filters to manipulate `Room` instead of `RoomListEntry`. No more `Client` is needed in the filters. This patch also disables the `RoomList` integration test suite in order to keep this patch “small”.
Configuration menu - View commit details
-
Copy full SHA for 1270cda - Browse repository at this point
Copy the full SHA 1270cdaView commit details
Commits on Jul 3, 2024
-
feat(ui): Remove
visible_rooms
fromRoomListService
.This patch removes the `visible_rooms` sliding sync list from `RoomListService`. As we are taking the path of doing client-side sorting, the ordering of the server-side will most likely always mismatch the ordering of the client-side, thus using `visible_rooms` with room indices make no sense (indices from server-side won't map indices on the client-side, so room ranges from client-side won't map what the server knows). We used to use `visible_rooms` to “preload” the timeline of rooms in the user app viewport, with a `timeline_limit` of 20. This should be replaced by room subscriptions starting from now. For the moment, the user of `RoomListService` is responsible to do that manually. Maybe `RoomListService` will handle that automatically in the future.
Configuration menu - View commit details
-
Copy full SHA for 7aa7d1c - Browse repository at this point
Copy the full SHA 7aa7d1cView commit details -
feat(base): Add
LatestEvent::cached_event_origin_server_ts
.This patch adds a new `cached_event_origin_server_ts` field on `LatestEvent`, which is a copy of the `origin_server_ts` of the inner `SyncTimelineEvent`.
Configuration menu - View commit details
-
Copy full SHA for daf878f - Browse repository at this point
Copy the full SHA daf878fView commit details -
feat(ui): Add the
recency
,name
andor
sorters for theRoomList
.This patch adds 3 sorters for the `RoomList`: `recency`, `name` and `or`.
Configuration menu - View commit details
-
Copy full SHA for ec80c6f - Browse repository at this point
Copy the full SHA ec80c6fView commit details -
feat(ui): The
RoomList
uses sorters!This patch “installs” the sorters API for the `RoomList`.
Configuration menu - View commit details
-
Copy full SHA for ff4af89 - Browse repository at this point
Copy the full SHA ff4af89View commit details -
feat(ui) Rename
RoomList
' sorteror
tolexicographic
.This patch renames the `or` sorter to `lexicographic` as it describes better what it does.
Configuration menu - View commit details
-
Copy full SHA for 51ca5a7 - Browse repository at this point
Copy the full SHA 51ca5a7View commit details -
test(ui): Update tests of the
RoomList
with sorters.This patch mostly tests that sorting the rooms in the room list by recency and by name works as expected.
Configuration menu - View commit details
-
Copy full SHA for ed086af - Browse repository at this point
Copy the full SHA ed086afView commit details -
feat(ffi) Update
RoomList
API to the recent changes.This patch adapts the `RoomList` FFI API to the recent changes to suport a `Stream<Item = RoomListItem>` instead of a `Stream<Item = RoomListEntry>`. Behind the scene, it supports client side sorting for the rooms but this is transparent for this API. This patch also removes the `RoomListInput` enum as no input is supporter anymore. The `entries` method no long returns a `RoomListEntriesResult` but directly a `TaskHandle`. The given listener will receive the initial entries as a `VectorDiff::Append`, which first is simpler but also fixe a potential race condition bug.
Configuration menu - View commit details
-
Copy full SHA for 606a151 - Browse repository at this point
Copy the full SHA 606a151View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c25103 - Browse repository at this point
Copy the full SHA 2c25103View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7647728 - Browse repository at this point
Copy the full SHA 7647728View commit details -
Complement uses the FFI `RoomList` API. Since the patch set modifies this API, Complement is broken. We disable it and will re-enable it once we have updated Complement.
Configuration menu - View commit details
-
Copy full SHA for ab190ad - Browse repository at this point
Copy the full SHA ab190adView commit details -
fix(ui):
merge_stream_and_receiver
gives priority toraw_stream
.This patch rewrites `merge_stream_and_receiver` to switch the order of `roominfo_update_recv` and `raw_stream`. The idea is to give the priority to `raw_stream` since it will necessarily trigger the room items recomputation. This patch also remove the `for` loop with `Iterator::enumerate`, to simply use `Iterator::position`: it's more compact and it removes a `break` (it makes the code simpler to understand). Finally, this patch renames `merged_stream` into `merged_streams`.
Configuration menu - View commit details
-
Copy full SHA for b525002 - Browse repository at this point
Copy the full SHA b525002View commit details -
chore(ui): Remove the
RoomListService::rooms
cache.This patch removes the `RoomListService::rooms` cache, since now a `Room` is pretty cheap to build. This cache was also used to keep the `Timeline` alive, but it's now recommended that the consumer of the `Room` keeps its own clone of the `Timeline` somewhere. We may introduce a cache inside `RoomListService` for the `Timeline` later.
Configuration menu - View commit details
-
Copy full SHA for 5d68f89 - Browse repository at this point
Copy the full SHA 5d68f89View commit details -
Configuration menu - View commit details
-
Copy full SHA for 813ce6a - Browse repository at this point
Copy the full SHA 813ce6aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 765b954 - Browse repository at this point
Copy the full SHA 765b954View commit details -
feat(base): Store the
timestamp
from SS in `RoomInfo::recency_times……tamp`. This patch adds a new field in `RoomInfo`: `recency_timestamp: Option<MilliSecondsSinceUnixEpoch>>`. Its value comes from a Sliding Sync Room response, that's why all this API is behind `cfg(feature = "experimental-sliding-sync")`.
Configuration menu - View commit details
-
Copy full SHA for 9a02d68 - Browse repository at this point
Copy the full SHA 9a02d68View commit details -
feat(ui): The
recency
sorter now usesrecency_timestamp
.This patch changes the `recency` sorter to use `Room::recency_timestamp` instead of `LatestEvent::event_origin_server_ts` to sort rooms.
Configuration menu - View commit details
-
Copy full SHA for b4bbb10 - Browse repository at this point
Copy the full SHA b4bbb10View commit details -
chore(base): Remove
LatestEvent::cached_event_origin_ts
.This patch removes the `LatestEvent::cached_event_origin_ts`. It's no longer necessary to cache this value as the `matrix_sdk_ui::room_list_service::sorter::recency` sorter no longer uses it.
Configuration menu - View commit details
-
Copy full SHA for 3588b88 - Browse repository at this point
Copy the full SHA 3588b88View commit details