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

New call layouts #2485

Merged
merged 45 commits into from
Jul 19, 2024
Merged

New call layouts #2485

merged 45 commits into from
Jul 19, 2024

Conversation

robintown
Copy link
Member

@robintown robintown commented Jul 18, 2024

Merge the new call layouts feature branch! All this code has been reviewed.
Fixes: #2488
Blocked until after the release.

Here I've implemented an MVP for the new unified grid layout, which scales smoothly up to arbitrarily many participants. It doesn't yet have a special 1:1 layout, so in spotlight mode and 1:1s, we will still fall back to the legacy grid systems.

Things that happened along the way:
- The part of VideoTile that is common to both spotlight and grid tiles, I refactored into MediaView
- VideoTile renamed to GridTile
- Added SpotlightTile for the new, glassy spotlight designs
- NewVideoGrid renamed to Grid, and refactored to be even more generic
- I extracted the media name logic into a custom React hook
- Deleted the BigGrid experiment
Also removing some unused settings along the way.
Refactor settings to use observables
This is useful for testing how the UI behaves with different numbers of participants.
react-rxjs is the library we've been using to connect our React components to view models and consume observables. However, after spending some time with react-rxjs, I feel that it's a very heavy-handed solution. It requires us to sprinkle <Subscribe /> and <RemoveSubscribe /> components all throughout the code, and makes React go through an extra render cycle whenever we mount a component that binds to a view model. What I really want is a lightweight React hook that just gets the current value out of a plain observable, without any extra setup. Luckily the observable-hooks library with its useObservableEagerState hook seems to do just that—and it's more actively maintained, too!
Because we were hiding even the local participant during initial connection, there would be no participants, and therefore nothing to put in the spotlight. The designs don't really tell us what the connecting state should look like, so I've taken the liberty of restoring it to its former glory of showing the local participant immediately.
Includes the mobile UX optimizations and the tweaks we've made to cut down on wasted space, but does not yet include the change to embed the spotlight tile within the grid.
Add a developer option to duplicate tiles
Add toggle to always show yourself
Copy link
Contributor

@toger5 toger5 left a comment

Choose a reason for hiding this comment

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

This is blocked until after release. I approve this now, to not make us wait once we can merge this and to confirm that all the code has been reviewed in separate smaller chunk PR's

@toger5 toger5 removed the X-Blocked label Jul 19, 2024
@toger5
Copy link
Contributor

toger5 commented Jul 19, 2024

Unblocked because https://github.com/element-hq/element-call/releases/tag/v0.5.18 is released.

@robintown robintown merged commit 4173fd1 into livekit Jul 19, 2024
4 checks passed
@toger5
Copy link
Contributor

toger5 commented Jul 19, 2024

🎉

What an achievement!

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.

Switch spotlight -> grid 1:1 has order issues
2 participants