Implement ongoing call tiles #34188
Draft
MidhunSureshR wants to merge 26 commits into
Draft
Conversation
This will contain the common snapshot values used by both dm ongoing call tile view and room ongoing call tile view.
c351d0b to
ea45cd0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Figma : https://www.figma.com/design/rTaQE2nIUSLav4Tg3nozq7/Compound-Web-Components?node-id=11218-5021&t=oRWAGiwV5pUV4OFF-4
Screenshots in #33970
#34141 added the tombstone tiles, this PR adds the ongoing tile views.
There's no foolproof way to associate a given call to a rtc notification event (which is what we render as tiles) so the basic idea is to treat the last notification tile in the timeline as an ongoing call tile if there's a call in the room.
The following changes are made:
DmOngoingCallTileViewandRoomOngoingCallTileViewwhich implements the designs of the tile. They share some common state and this is extracted asCommonOngoingCallTileViewSnapshot. There's aBaseOngoingCallTileViewModelthat provides the shared snapshot content.DmOngoingCallTileViewModelandRoomOngoingCallTileViewModelboth extend this base view model to provide the part of the snapshot that is not common.FacePileViewandFacePileViewModel.MemberAvatarViewandMemberAvatarViewModel.The following common components are used by both the dm and room ongoing call tile views:
TileContainerprovides the same outer container style and layout.JoinButtonis the common join button shown in these tilesCallIconshows the square call icon rendered in the tile.DurationView/DurationViewModelrenders a clock which outputs the duration of the call. This updates every second.There's a new store,
LatestRtcNotificationEventStore, that tracks the latest notification event in a given room. This is necessary because the call store tells you about a new call as soon as a call membership event comes through but the timeline only renders rtc notification events. The problem arises when there's a delay between receiving the call membership event and the notification event. As a result,CallStoretells us that a call is ongoing in the room but the corresponding rtc notification event hasn't arrived, so we incorrectly show the last call tile (which in reality relates to a call that is already over) as ongoing.