element-call-Github/src
Robin d3f069e763
Keep tiles in a stable order (#2670)
* Keep tiles in a stable order

This introduces a new layer of abstraction on top of MediaViewModel: TileViewModel, which gives us a place to store data relating to tiles rather than their media, and also generally makes it easier to reason about tiles as they move about the call layout. I have created a class called TileStore to keep track of these tiles.

This allows us to swap out the media shown on a tile as the spotlight speaker changes, and avoid moving tiles around unless they really need to jump between the visible/invisible regions of the layout.

* Don't throttle spotlight updates

Since we now assume that the spotlight and grid will be in sync (i.e. an active speaker in one will behave as an active speaker in the other), we don't want the spotlight to ever lag behind due to throttling. If this causes usability issues we should maybe look into making LiveKit's 'speaking' indicators less erratic first.

* Make layout shifts due to a change in speaker less surprising

Although we try now to avoid layout shifts due to the spotlight speaker changing wherever possible, a spotlight speaker coming from off screen can still trigger one. Let's shift the layout a bit more gracefully in this case.

* Improve the tile ordering tests

* Maximize the spotlight tile in portrait layout

* Tell tiles whether they're actually visible in a more timely manner

* Fix test

* Fix speaking indicators logic

* Improve readability of marbles

* Fix test case

---------

Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2024-11-06 09:36:48 +00:00
..
__snapshots__ Add simplistic rendering test 2024-09-02 16:28:53 +02:00
@types Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
analytics Posthog improvements (#2630) 2024-09-23 14:35:41 +01:00
auth Make the links on the log in page visually consistent 2024-09-19 12:09:14 -04:00
button Hand raise feature (#2542) 2024-11-04 09:54:13 +00:00
config default to flat structre of m.call.member evenst (one event per session rather than an array) 2024-11-04 14:24:13 +01:00
e2ee Use non-deprecated method of re-processing MatrixRTCSession keys (#2646) 2024-10-11 11:34:45 -04:00
form Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
graphics Add background gradient 2023-09-13 17:53:12 +02:00
grid Keep tiles in a stable order (#2670) 2024-11-06 09:36:48 +00:00
home Merge branch 'livekit' into johannes/remove-call 2024-09-13 12:47:18 +02:00
icons Replace remaining React ARIA components with Compound components (#2576) 2024-08-28 14:44:39 +02:00
input Test StarRating 2024-09-10 18:21:19 -04:00
livekit Remove duplicate media devices from the list 2024-10-28 15:02:01 -04:00
otel Enable lint rules for Promise handling to discourage misuse of them. (#2607) 2024-09-10 09:49:35 +02:00
profile Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
reactions Hand raise feature (#2542) 2024-11-04 09:54:13 +00:00
room Keep tiles in a stable order (#2670) 2024-11-06 09:36:48 +00:00
settings Hand raise feature (#2542) 2024-11-04 09:54:13 +00:00
sound Hand raise feature (#2542) 2024-11-04 09:54:13 +00:00
state Keep tiles in a stable order (#2670) 2024-11-06 09:36:48 +00:00
tabs Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
tile Keep tiles in a stable order (#2670) 2024-11-06 09:36:48 +00:00
utils Keep tiles in a stable order (#2670) 2024-11-06 09:36:48 +00:00
App.tsx Enable lint rules for Promise handling to discourage misuse of them. (#2607) 2024-09-10 09:49:35 +02:00
Avatar.tsx Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
ClientContext.tsx Hand raise feature (#2542) 2024-11-04 09:54:13 +00:00
controls.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
DisconnectedBanner.module.css Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
DisconnectedBanner.tsx Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
FullScreenView.module.css Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
FullScreenView.tsx Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
Header.module.css Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
Header.test.tsx Merge branch 'livekit' into test-components 2024-09-10 18:05:22 -04:00
Header.tsx Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
index.css Replace typography components with Compound components 2024-09-11 13:44:43 -04:00
IndexedDBWorker.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
initializer.test.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
initializer.tsx Enable lint rules for Promise handling to discourage misuse of them. (#2607) 2024-09-10 09:49:35 +02:00
LazyEventEmitter.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
main.tsx Rageshake logging improvements (#2622) 2024-09-11 14:02:59 +01:00
Modal.module.css Hand raise feature (#2542) 2024-11-04 09:54:13 +00:00
Modal.tsx Merge branch 'livekit' into test-components 2024-09-10 18:05:22 -04:00
Overlay.module.css Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
Platform.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
QrCode.module.css Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
QrCode.test.tsx Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
QrCode.tsx Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
rtcSessionHelper.test.ts fix linting 2024-11-04 15:13:32 +01:00
rtcSessionHelpers.ts Enable lint rules for Promise handling to discourage misuse of them. (#2607) 2024-09-10 09:49:35 +02:00
Slider.module.css Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
Slider.tsx Address review comments 2024-10-22 17:23:40 -04:00
Toast.module.css Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
Toast.test.tsx Merge branch 'livekit' into test-components 2024-09-10 18:05:22 -04:00
Toast.tsx Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
TranslatedError.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
UrlParams.test.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
UrlParams.ts Add a config option to disable the app prompt 2024-11-01 16:57:48 -04:00
useCallViewKeyboardShortcuts.test.tsx Merge branch 'livekit' into test-components 2024-09-10 18:05:22 -04:00
useCallViewKeyboardShortcuts.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
useEvents.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
useInitial.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
useLatest.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
useLocalStorage.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
useLocationNavigation.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
useMatrixRTCSessionJoinState.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
useMatrixRTCSessionMemberships.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
useMediaQuery.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
useMergedRefs.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
usePageTitle.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
usePrefersReducedMotion.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
useReactions.test.tsx Hand raise feature (#2542) 2024-11-04 09:54:13 +00:00
useReactions.tsx Hand raise feature (#2542) 2024-11-04 09:54:13 +00:00
useReactiveState.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
UserMenu.module.css Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
UserMenu.tsx Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
UserMenuContainer.tsx Enable lint rules for Promise handling to discourage misuse of them. (#2607) 2024-09-10 09:49:35 +02:00
useTheme.test.ts Test useTheme hook (#2625) 2024-09-24 22:15:16 +02:00
useTheme.ts Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
useWakeLock.ts Enable lint rules for Promise handling to discourage misuse of them. (#2607) 2024-09-10 09:49:35 +02:00
vitest.setup.ts Merge branch 'livekit' into test-components 2024-09-10 18:05:22 -04:00
widget.ts Hand raise feature (#2542) 2024-11-04 09:54:13 +00:00