Commit Graph

1955 Commits

Author SHA1 Message Date
Robin
52058716f6 Don't keep someone in the spotlight if they've left the call 2024-08-09 13:08:37 -04:00
Robin
29df87d22c
Merge pull request #2548 from robintown/hide-controls
Show controls on tap/hover on small screens
2024-08-09 11:52:01 -04:00
Robin
6443e911dc Make the breakpoint a bit smaller 2024-08-09 11:09:45 -04:00
Robin
aa6b7056ae Show controls on tap/hover on small screens
This changes the mobile landscape view to automatically hide the controls, giving more visibility to the video underneath, and show them on tap/hover.
2024-08-09 11:09:45 -04:00
Robin
c20737ba4c
Merge pull request #2546 from robintown/spotlight-duplication
Avoid duplicating the video of someone in the spotlight
2024-08-09 09:11:13 -04:00
Robin
6f03653532
Merge pull request #2545 from robintown/breakpoint
Consider any sufficiently short window 'flat'
2024-08-08 13:22:41 -04:00
Robin
9b4ad24f10 Avoid T-shaped layouts in 4 person calls
The code path for when all tiles can fit on screen was failing to realize that it could sometimes get by with fewer columns. This resulted in wasted space for 4 person calls at some window sizes.
2024-08-08 12:46:38 -04:00
Robin
5069b008e2 Avoid duplicating the video of someone in the spotlight
We've gotten feedback that it's distracting whenever the same video is shown in two places on screen. This fixes the spotlight case by showing only the avatar of anyone who is already visible in the spotlight. It also makes sense to hide the speaking indicators in spotlight layouts, I think, because this information is redundant to the spotlight tile.
2024-08-08 12:16:32 -04:00
Robin
6d8e45aea8 Consider any sufficiently short window 'flat'
This is because our layouts for flat windows are good at adapting to both small width and small height, while our layouts for narrow windows aren't so good at adapting to a small height.
2024-08-08 11:30:57 -04:00
Robin
bf5128cfee Don't show local media on top of itself
If you were the only one in the call, you could get a broken-looking view in which the local tile is shown in the spotlight, and it's also shown in the PiP. This is redundant.
2024-08-06 17:12:13 -04:00
Robin
eef92249f7 Fix a crash when the duplicate tiles option is empty
We need to handle the case where the value is NaN because the field is empty.
2024-08-06 10:56:15 -04:00
Robin
ab42fe97cb
Merge pull request #2514 from robintown/mobile-layouts
Improve the layouts on small mobile calls
2024-08-06 10:10:29 -04:00
Robin
f4cf3d8c62 Adjust the breakpoint 2024-08-06 10:08:56 -04:00
Robin
b503056673 Adapt to breaking changes in Compound 2024-08-02 15:27:49 -04:00
Andrew Ferrazzutti
7449e1f6e4
Don't refer to MSC3779 explicitly in comment (#2533)
because other MSCs (like 3757) may allow @-prefixed state keys
2024-08-02 15:15:54 +00:00
Robin
aadf6c05ac
Merge pull request #2530 from robintown/no-you
Show your own name on your tile
2024-08-02 10:45:32 -04:00
Robin
7abb56e406 Add back some margins to the interface
There were a couple of cases where the lack of margins after the new layout changes just looked odd. Specifically, when the header is hidden (as in embedded mode), there would be no margin at the top of the window. Also the floating tile would run directly up against the sides of the window.
2024-08-01 16:33:10 -04:00
Robin
00d8100dfe Show your own name on your tile
Instead of the word "You".
2024-08-01 15:48:22 -04:00
Robin
eb051ab318 Replace the mobile one-on-one layout with an edge-to-edge spotlight 2024-08-01 13:49:49 -04:00
Robin
942e28f3c2 Improve the layouts on small mobile calls
Due to an oversight of mine, 2440037639 actually removed the ability to see the one-on-one layout on mobile. This restores mobile one-on-one calls to working order and also avoids showing the spotlight tile unless there are more than a few participants.
2024-08-01 13:49:49 -04:00
Robin
0bfec65405 Refactor layout selection into smaller chunks 2024-08-01 13:49:49 -04:00
Robin
5a0b81b57f More strongly prefer putting a remote speaker in the spotlight
If no one had spoken yet, we were still showing the local user in the spotlight. We should instead eagerly switch to showing an arbitrary remote participant in this case.
2024-08-01 12:48:47 -04:00
Timo
f9323d8b2c
Add future related widget capabilities (#2505)
* add future related widget capabilities

* Update js sdk
2024-08-01 11:41:47 -04:00
Timo
599a4708cb
Backport deviceSetup await (#2522) 2024-07-31 13:21:37 +02:00
Timo
f53ea75c94
Add DeviceMute widget action io.element.device_mute. (#2482)
* Add DeviceMute widget action `io.element.device_mute`.
This allows to send mute requests ("toWidget") and get the current mute state as a response.
And it will update the client about each change of mute states.

* review + better explanation

* review

* add comments

* use `useCallback`
2024-07-30 13:30:33 +02:00
Robin
2b67a9cfbe
Merge pull request #2486 from robintown/delete-fullscreen
Delete the unused full screen code
2024-07-29 09:28:07 -04:00
Robin
a3ce333352
Only show the expand button in spotlight layout (#2510)
It has no effect in any layout other than spotlight, and we've decided to hide it rather than spending effort to make it do something.
2024-07-26 12:57:49 +02:00
Robin
d5faa5ea90
Don't show the speaker in the spotlight in large grids (#2511)
We've concluded that this behavior is actually more distracting than it is helpful, and we want to try out what it's like to just have the importance ordering and visual cues help you find who's speaking.
2024-07-26 12:51:34 +02:00
Robin
5becd2e175
Fix a crash when using the duplicate tiles option (#2512) 2024-07-26 12:51:09 +02:00
Robin
3b38a5322c
Give tiles a minimum area rather than a minimum width and height (#2513)
This seems to result in more sensible cropping and allocation of space across the board, in my testing.
2024-07-26 12:50:44 +02:00
Robin
d062871f41
Don't consider microphone mute state in importance ordering (#2515)
We're finding that if we reorder participants based on whether their mic is muted, this just creates a lot of distracting layout shifts. People who speak are automatically promoted into the speaker category, so there's little value in additionally caring about mute state.
2024-07-26 11:27:22 +02:00
Robin
12e233970c Import Compound icons in the new recommended way
The Compound design tokens package is now set up to generate React components for every icon, so we no longer need to use our more error-prone method of importing the SVGs.
2024-07-25 13:15:45 -04:00
Robin
10b915c707
Merge pull request #2501 from robintown/layout-reactivity
Make layout reactivity less brittle
2024-07-25 12:51:39 -04:00
Robin
5544695f21 Use clearer names 2024-07-25 12:50:28 -04:00
Timo
72de8e066c
fix grammar (#2506) 2024-07-25 14:33:37 +02:00
Robin
63afda05bc
Merge pull request #2502 from robintown/shortcut-a11y
Improve accessibility of keyboard shortcuts
2024-07-25 08:24:13 -04:00
Timo
b05c4234b7
Remove hide header condition (#2493) 2024-07-25 11:32:05 +02:00
Robin
380f49fccc Improve accessibility of keyboard shortcuts
Ensure that they don't interfere with say, using spacebar to press a button, and also ensure that they won't do surprising things like scroll the page at the same time.
2024-07-24 18:42:21 -04:00
Robin
447bac3280 Make layout reactivity less brittle
Follow-up to ea2d98179c

This took a couple of iterations to find something that works without creating update loops, but I think that by automatically informing Grid whenever a layout component is re-rendered, we'll have a much easier time ensuring that our layouts are fully reactive.
2024-07-24 17:03:27 -04:00
Robin
ea2d98179c Quick and dirty fix to spotlight reactivity 2024-07-22 10:52:20 -04:00
Robin
4173fd113b
Merge pull request #2485 from element-hq/new-call-layouts
New call layouts
2024-07-19 09:08:51 -04:00
Timo
afee9eaa26
Don't update mute when reaching the user count threshold. (#2474)
* Dont update mute during call.
2024-07-18 18:14:29 +02:00
Robin
364b78abda Delete the unused full screen code
We no longer allow individual tiles to be put in full screen, because we're seeing what it's like to just stretch the spotlight tile edge-to-edge and keep the margins minimal.
2024-07-18 11:48:06 -04:00
Robin
507b1fc52d Merge branch 'livekit' into new-call-layouts 2024-07-18 11:38:35 -04:00
Robin
377b7ff5de Explain each layout 2024-07-18 11:33:20 -04:00
Robin
4955535374 Use more consistent names for layout types 2024-07-18 11:24:18 -04:00
Robin
0664f978e3 Merge branch 'new-call-layouts' into rest-of-the-layouts 2024-07-18 11:21:56 -04:00
Robin
7526826b0c Improve aspect ratios on mobile 2024-07-18 11:01:21 -04:00
Robin
b4e0df75c0 Merge branch 'new-call-layouts' into one-on-one-layout 2024-07-18 10:28:17 -04:00
Robin
d561a41666
Merge pull request #2416 from robintown/grid-spotlight-speaker
Show speaker in the spotlight in large grids
2024-07-18 10:17:31 -04:00
Robin
e04affe93e Justify the use of a participant count threshold 2024-07-18 10:00:26 -04:00
Robin
7fcd7125c1 Merge branch 'new-call-layouts' into spotlight-layout 2024-07-18 08:48:50 -04:00
Robin
1efa594430 Use Array.some where it's appropriate 2024-07-17 16:06:48 -04:00
Robin
0a8c6c1454 Merge branch 'new-call-layouts' into observable-hooks 2024-07-17 15:55:50 -04:00
Robin
d4a2617f7b
Merge pull request #2380 from robintown/pin-always-show
Add toggle to always show yourself
2024-07-17 15:45:29 -04:00
Robin
2bc56dbff2 Use fewer ML-style variable names 2024-07-17 15:40:02 -04:00
Robin
a59875dab5 Explain what each sorting bin means 2024-07-17 15:37:41 -04:00
renovate[bot]
e79cded57f
Update all non-major dependencies (#2479)
* Update all non-major dependencies

* prettier fixes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Timo <toger5@hotmail.de>
2024-07-17 10:07:26 +02:00
Robin
2440037639 Implement most of the remaining layout changes
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.
2024-07-12 15:50:17 -04:00
Robin
a16f235277 Fix crash in spotlight mode while connecting
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.
2024-07-12 15:49:45 -04:00
Robin
45c89a2298 Delete the legacy grid system 2024-07-12 15:49:43 -04:00
Robin
7979493371 Implement the new one-on-one layout 2024-07-12 15:47:56 -04:00
Robin
e0b10d89b5 Add model for one-on-one layout 2024-07-12 15:47:56 -04:00
Robin
183d2d9050 Show speaker in the spotlight in large grids 2024-07-12 15:47:35 -04:00
Robin
12b719da95 Make layout reactivity a little more fine-grained 2024-07-12 15:47:00 -04:00
Robin
dfda7539d6 Only switch to spotlight for remote screen shares 2024-07-12 15:47:00 -04:00
Robin
7f40ce8dde Fix advance buttons showing up for the spotlight speaker 2024-07-12 15:47:00 -04:00
Robin
ec1b020d4e Add indicators to spotlight tile and make spotlight layout responsive 2024-07-12 15:47:00 -04:00
Robin
54c22f4ab2 Clean up spotlight tile code 2024-07-12 15:47:00 -04:00
Robin
ffbbc74a96 Implement the new spotlight layout 2024-07-12 15:47:00 -04:00
Robin
34c45cb5e2 Get the right grid offset even when offsetParent is a layout element 2024-07-12 15:47:00 -04:00
Robin
af0bd795b5 Replace react-rxjs with observable-hooks
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!
2024-07-12 15:46:33 -04:00
Robin
0d485ef97f Use always show flag in importance ordering 2024-07-12 15:43:24 -04:00
Robin
5647619b36 Add always show toggle to the UI 2024-07-12 15:43:24 -04:00
Robin
8a414012a0 Add always show flag to view model 2024-07-12 15:43:24 -04:00
Robin
e33fbd77d1 Split local and remote user media into different classes 2024-07-12 15:43:24 -04:00
Robin
fdc6d4a1b6 Add a developer option to duplicate tiles
This is useful for testing how the UI behaves with different numbers of participants.
2024-07-12 14:55:29 -04:00
Robin
a534356dd9
Merge pull request #2368 from robintown/settings-refactor
Refactor settings to use observables
2024-07-12 14:50:46 -04:00
Robin
599d6fd007 Address review feedback 2024-07-12 14:15:27 -04:00
Robin
14fc1481f3 Address some review feedback 2024-07-12 14:01:32 -04:00
Andrew Ferrazzutti
34c7d02de2
Add config to send session membership state events (#2460)
If not set, legacy call membership state events are sent instead.
Even if set, legacy events are sent in rooms with active legacy calls.

---------

Co-authored-by: Timo <16718859+toger5@users.noreply.github.com>
2024-07-05 21:10:16 +09:00
Andrew Ferrazzutti
ca45067158
Let Element Call widget set session memberships (#2459)
Make Element Call widgets request permission to set device-specific
session membership state events.
2024-07-05 04:59:48 +09:00
Andrew Ferrazzutti
5a6eb7c573
Make widgets request the room creation event (#2457)
This allows the widget to check the room version, so it can know about
version-specific auth rules (namely MSC3779).
2024-07-05 04:57:45 +09:00
Robin
41083c0f9e Refactor settings to use observables
Also removing some unused settings along the way.
2024-07-03 15:29:32 -04:00
Robin
20602c122b Implement the new unified grid layout
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
2024-07-03 15:29:08 -04:00
Timo
d27f433175
Skip error screen for the issue, that the homeserver does not support the room summary endpoint. (#2453)
* Add try inner try block to the room summary fetching and only throw after fetching and a "blind join" fails.
(blind join: call room.join without knowing if the room is public)

Co-authored-by: Robin <robin@robin.town>

---------

Co-authored-by: Robin <robin@robin.town>
2024-06-25 08:44:02 +00:00
Robin
4db7c2bc68 Fix type errors 2024-06-24 10:31:50 -04:00
Robin
591833505f Adapt to breaking changes 2024-06-21 10:23:30 -04:00
Robin
f9ef037cea
Merge pull request #2435 from element-hq/hughns/visibilitychange
Use correct DOM event name for visibility changes in useWakeLock
2024-06-20 10:19:05 -04:00
Hugh Nimmo-Smith
ba647780e8 Use correct DOM event name for visibility changes in useWakeLock 2024-06-19 17:54:15 +01:00
Timo
812ae2ce89
Load focus information from well known and use client config only as a fallback. (#2358)
* Load focus information from well known and use client config only as a fallback.

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
2024-06-19 16:41:52 +02:00
Timo
0ed7853958
Remove EventType.GroupCallPrefix from widget capabilities (#2399)
Its not used anymore.
2024-06-17 20:04:49 +02:00
Robin
bd7209cd40
Merge pull request #2250 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v7.12.0
2024-06-04 11:21:59 -04:00
Robin
70fdc68b13 Fix lints 2024-06-04 11:20:25 -04:00
Robin
0aeb68b445 Reduce footer space while preserving visual balance 2024-06-04 10:05:21 -04:00
Marcel Ackermann
6b6ad16306
remove excessive footer space 2024-06-01 13:10:15 +02:00
Robin
b9b53ec251 Update participant count color
It has changed in recent designs.
2024-05-30 21:36:50 -04:00
Andrew Ferrazzutti
c405b61c66
Wait for a full sync on startup (#2372)
This avoids missing any state not included in the latest cached sync.
2024-05-23 01:00:17 +09:00
Andrew Ferrazzutti
8718a7139b
Don't auto-join knock room on invite after leave (#2362)
If you send a knock that is rejected, or your knock is accepted and you
are later removed from the room, do not automatically accept subsequent
invites to that room.

Note that the auto-join behaviour happened only if the page was not
refreshed after sending a knock.
2024-05-07 16:58:30 +09:00
Andrew Ferrazzutti
94f267b93e
Add more valid rooms to the recents list (#2361)
Include:
- all rooms you are a member of
- knock rooms you've knocked on and are waiting for an invite to
- knock rooms you've been invited to in response to a knock
2024-05-07 16:57:53 +09:00