-
Notifications
You must be signed in to change notification settings - Fork 246
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): Propagate RoomEventCache
's VectorDiff
to Timeline
#3512
base: main
Are you sure you want to change the base?
feat(ui): Propagate RoomEventCache
's VectorDiff
to Timeline
#3512
Commits on Jun 14, 2024
-
feat(sdk):
EventsOrigin
has a new variant:Pagination
.This patch adds the `EventsOrigin::Pagination` variant. It does nothing more than that. This variant is going to be used in the following patches.
Configuration menu - View commit details
-
Copy full SHA for 917a248 - Browse repository at this point
Copy the full SHA 917a248View commit details -
feat(sdk) Add
RoomEvents::updates_as_vector_diffs
.This patch adds the `RoomEvents::chunks_updates_as_vector` field, and the `updates_as_vector_diffs` method. Let's use `linked_chunk::AsVector` inside `EventCache`.
Configuration menu - View commit details
-
Copy full SHA for f76a8bb - Browse repository at this point
Copy the full SHA f76a8bbView commit details -
feat(ui): Implement
Add
forHandleManyEventsResult
.This patch implements `Add` for `HandleManyEventsResult` so that it's easier to accumulate many of them.
Configuration menu - View commit details
-
Copy full SHA for db6977d - Browse repository at this point
Copy the full SHA db6977dView commit details -
feat(sdk):
RoomEventCacheUpdate::AddTimelineEvents
now holds a `Vec……<VectorDiff<_>>`. The type of `RoomEventCacheUpdate::AddTimelineEvents::events` is updated from `Vec<SyncTimelineEvent>` to `Vec<VectorDiff<SyncTimelineEvent>>`. So far, only `VectorDiff::Append` is supported, but more will come in the next patches. A new `TimelineInner::add_events_with_diffs` method is added. It's pretty similar to `add_events_at`, except that it receives `VectorDiff`s.
Configuration menu - View commit details
-
Copy full SHA for 5a720f7 - Browse repository at this point
Copy the full SHA 5a720f7View commit details -
feat(ui):
TimelineInnerState(Transaction)::add_remote_events_at
acc……ept an iterator of events. This patch updates `TimelineInnerStateTransaction::add_remote_events_at` to accept a generic parameter for `events`, it must implement `IntoIterator::Item: Into<SyncTimelineEvent>`. At an upper level, `TimelineStateInner::add_events_at` at the same constraint except `IntoIterator::IntoIter: ExactSizeIterator>`. This modification propagates up to `TimelineInner::add_remote_events_at` and `TimelineInner::add_events_with_diffs`. It removes the need to clone the `VectorDiff` values which are inside a `Vector` to get a `Vec`. Basically, it saves memory and computations!
Configuration menu - View commit details
-
Copy full SHA for b1ce3bc - Browse repository at this point
Copy the full SHA b1ce3bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f43bf6 - Browse repository at this point
Copy the full SHA 8f43bf6View commit details -
feat(ui) Rename
TimelineEnd
intoTimelineNewItemPosition
.This patch renames `TimelineEnd` into `TimelineNewItemPosition` for 2 reasons: 1. In the following patch, we will introduce a new variant to insert at a specific index, so the suffix `End` would no longer make sense. 2. It's exactly like `TimelineItemPosition` except that it's used only and strictly only to add **new** items, which is why we can't use `TimelineItemPosition` because it contains the `Update` variant. This renaming reflects it's only about **new** items.
Configuration menu - View commit details
-
Copy full SHA for 14baf46 - Browse repository at this point
Copy the full SHA 14baf46View commit details -
chore(ui):
TimelineItemPosition::Update
has now one field.This patch updates `TimelineItemPosition::Update` from a tuple to a struct with an `index`, i.e. from `Update(usize)` to `Update { index: usize }`, for the sake of consistency with the other variants.
Configuration menu - View commit details
-
Copy full SHA for ac9a433 - Browse repository at this point
Copy the full SHA ac9a433View commit details -
feat(ui): Add
TimelineItemPosition::At
.This patch adds the `TimelineItemPosition::At` variant that allows to insert an event at any position.
Configuration menu - View commit details
-
Copy full SHA for cd6ea8a - Browse repository at this point
Copy the full SHA cd6ea8aView commit details -
chore(ui): Try to clear confusion between event index and timeline it…
…em index. This patch tries to clear confusion between event index and timeline item index in `TimelineItemPosition`.
Configuration menu - View commit details
-
Copy full SHA for bd199cd - Browse repository at this point
Copy the full SHA bd199cdView commit details -
feat(sdk): Detect event duplication in `TimelineInnerState::add_or_up…
…date_event`. This patch applies event duplication detection in `TimelineInnerState::add_or_update_event` when the the position is `TimelineItemPosition::At`.
Configuration menu - View commit details
-
Copy full SHA for 10fb880 - Browse repository at this point
Copy the full SHA 10fb880View commit details -
chore(ui): Have a single code for all kind of timeline item insertions.
This patch tries to unify the code to insert timeline item at position `Start` and `End` (plus `At`, but with a `todo` for the moment). We can clearly have the same code for these `TimelineItemPosition`s. It doesn't make sense to have separate implementations, especially knowing that `End` had duplicated events check while `Start` had not. This code only and strictly code moving, modulo the `position` handling, but nothing has changed apart from that.
Configuration menu - View commit details
-
Copy full SHA for b4f1575 - Browse repository at this point
Copy the full SHA b4f1575View commit details
Commits on Jun 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d5ccfdc - Browse repository at this point
Copy the full SHA d5ccfdcView commit details -
feat(ui):
TimelineInner::add_events_with_diffs
supports more `Vecto……rDiff`. This patch updates `TimelineInner::add_events_with_diffs` to support more `VectorDiff` variant, notably `Insert` which uses `TimelineNewItemPosition::At`.
Configuration menu - View commit details
-
Copy full SHA for d6bfff8 - Browse repository at this point
Copy the full SHA d6bfff8View commit details -
feat(sdk,ui):
Timeline
receives backpaginated events via `RoomEvent……CacheUpdate`! Prior to this patch, when the `Timeline` was doing a pagination, the new events were inside the `EventCache` and also added directly onto the timeline. However, we already have a mechanism to receive new events in the `Timeline`, and it's a task run by the `Timeline` builder. New events are received via `RoomEventCacheUpdate`. The problem is: we have two entry points to add events: one with `RoomEventCacheUpdate`, and one with paginations. This patch removes the second entry point! Now the `Timeline` receives **all** its events via `RoomEventCacheUpdate`. This patch updates all the appropriate tests accordingly.
Configuration menu - View commit details
-
Copy full SHA for 091d83d - Browse repository at this point
Copy the full SHA 091d83dView commit details -
chore(ui): Remove impl
Add
forHandleManyEventsResult
.This patch inlines the `Add` implementation for `HandleManyEventsResult` since it's used only once.
Configuration menu - View commit details
-
Copy full SHA for e8c8136 - Browse repository at this point
Copy the full SHA e8c8136View commit details -
chore(ui): Move the
RoomEventCacheUpdate
code block into its own fu……nction. This patch is a refactoring. It moves the code block responsible to handle the `RoomEventCacheUpdate`s into its own function for the sake of clarity.
Configuration menu - View commit details
-
Copy full SHA for a8e4dd6 - Browse repository at this point
Copy the full SHA a8e4dd6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 049de27 - Browse repository at this point
Copy the full SHA 049de27View commit details
Commits on Jun 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 40ab000 - Browse repository at this point
Copy the full SHA 40ab000View commit details