Commit Graph

4773 Commits

Author SHA1 Message Date
Robin
5eaabcf74d
Clean up our tests in preparation for the testing sprint (#2466)
* Fix coverage reporting

Codecov hasn't been working recently because Vitest doesn't report coverage by default.

* Suppress some noisy log lines

Closes https://github.com/element-hq/element-call/issues/686

* Store test files alongside source files

This way we benefit from not having to maintain the same directory structure twice, and our linters etc. will actually lint test files by default.

* Stop using Vitest globals

Vitest provides globals primarily to make the transition from Jest more smooth. But importing its functions explicitly is considered a better pattern, and we have so few tests right now that it's trivial to migrate them all.

* Remove Storybook directory

We no longer use Storybook.

* Configure Codecov

Add a coverage gate for all new changes and disable its comments.

* upgrade vitest

---------

Co-authored-by: Timo <toger5@hotmail.de>
2024-08-27 15:45:39 +02:00
Robin
3a754479dc
Add simple global controls to put the call in picture-in-picture mode (#2573)
* Stop sharing state observables when the view model is destroyed

By default, observables running with shareReplay will continue running forever even if there are no subscribers. We need to stop them when the view model is destroyed to avoid memory leaks and other unintuitive behavior.

* Hydrate the call view model in a less hacky way

This ensures that only a single view model is created per call, unlike the previous solution which would create extra view models in strict mode which it was unable to dispose of. The other way was invalid because React gives us no way to reliably dispose of a resource created in the render phase. This is essentially a memory leak fix.

* Add simple global controls to put the call in picture-in-picture mode

Our web and mobile apps (will) all support putting calls into a picture-in-picture mode. However, it'd be nice to have a way of doing this that's more explicit than a breakpoint, because PiP views could in theory get fairly large. Specifically, on mobile, we want a way to do this that can tell you whether the call is ongoing, and that works even without the widget API (because we support SPA calls in the Element X apps…)

To this end, I've created a simple global "controls" API on the window. Right now it only has methods for controlling the picture-in-picture state, but in theory we can expand it to also control mute states, which is current possible via the widget API only.

* Fix footer appearing in large PiP views

* Add a method for whether you can enter picture-in-picture mode

* Have the controls emit booleans directly
2024-08-27 13:47:20 +02:00
renovate[bot]
0e3113edcd
Update dependency jsdom to v25 (#2580)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-26 14:44:15 +02:00
renovate[bot]
6432dca518
Update all non-major dependencies (#2581)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-26 10:44:15 +02:00
Robin
b5f6343a5e Remove ResizeObserver polyfill
All major browsers support it out of the box, nowadays.
2024-08-23 15:07:40 -04:00
Robin
995b4c8847
Merge pull request #2577 from element-hq/renovate/compound
Update dependency @vector-im/compound-web to v6.1.0
2024-08-23 13:03:51 -04:00
Robin
b8774ad682
Merge pull request #2578 from robintown/spotlight-buttons
Fix spotlight tile regressions
2024-08-23 12:38:38 -04:00
Robin
30a54f3795 Fix spotlight tile regressions
The buttons were scrolling with the view instead of always being visible in a fixed location on the tile, and the indicators were not adopting the correct width.
2024-08-23 12:31:16 -04:00
Robin
66b79f57bb
Merge pull request #2571 from element-hq/hughns/rust-crypto
Use Rust crypto implementation
2024-08-23 11:18:43 -04:00
renovate[bot]
a6f6db9226
Update dependency @vector-im/compound-web to v6.1.0 2024-08-23 01:00:13 +00:00
Robin
61a24262de
Merge pull request #2570 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-08-20 13:41:49 -04:00
renovate[bot]
0955d7bcc3
Update all non-major dependencies 2024-08-20 17:40:09 +00:00
Hugh Nimmo-Smith
36ce21d7ac Show crypto version in developer settings 2024-08-19 10:40:09 +01:00
Hugh Nimmo-Smith
eddc590235 Use rust crypto
Taken from d25cf28d00
2024-08-19 10:27:46 +01:00
Robin
61bc4dcc14
Merge pull request #2569 from robintown/horizontal-overflow
Fix long call names overflowing the interface
2024-08-16 16:41:15 -04:00
Robin
e2c4eae67b Make sure that the call interface can't scroll horizontally 2024-08-16 15:16:33 -04:00
Robin
1da3fe0731 Fix long call names overflowing the interface
They are now properly truncated with an ellipsis.
2024-08-16 15:15:51 -04:00
Hugh Nimmo-Smith
f562cc1e7f
Show user's Matrix ID and device ID in developer settings tab (#2559) 2024-08-16 15:37:57 +01:00
Hugh Nimmo-Smith
69b762b9ed
Bump js-sdk for sender key reliability improvements (#2567)
Diff from current version: 9176d3a671...467908703b
2024-08-15 11:49:19 +02:00
fkwp
ff55b1d189
Merge pull request #2564 from element-hq/renovate/livekit-client
Update dependency livekit-client to v2.5.0
2024-08-14 17:08:56 +02:00
fkwp
d796ebe3fa
Merge pull request #2565 from element-hq/renovate/github-actions
Update docker/build-push-action action to v6.7.0
2024-08-14 17:08:16 +02:00
renovate[bot]
b4bc41ba02
Update docker/build-push-action action to v6.7.0 2024-08-14 15:07:05 +00:00
renovate[bot]
a072dfae9c
Update dependency livekit-client to v2.5.0 2024-08-14 15:07:00 +00:00
fkwp
0eba3ef75f
Merge pull request #2557 from element-hq/renovate/github-actions
Update GitHub Actions
2024-08-12 15:22:05 +02:00
renovate[bot]
2b9bf1fbe6
Update GitHub Actions 2024-08-12 13:18:51 +00:00
Doug
8769f8966d
Clarify web server compatibility (#2555) 2024-08-12 08:06:05 -04:00
Robin
4e7b29e142
Merge pull request #2554 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-08-11 22:23:17 -04:00
renovate[bot]
977ba92dba
Update all non-major dependencies 2024-08-12 02:12:14 +00:00
Robin
64e7047b12
Merge pull request #2552 from robintown/spotlight-left
Don't keep someone in the spotlight if they've left the call
2024-08-09 13:40:13 -04:00
Robin
ed99af0be6 Improve readability 2024-08-09 13:38:59 -04:00
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
2ec0aaa0de
Merge pull request #2547 from robintown/t-grid
Avoid T-shaped layouts in 4 person calls
2024-08-08 13:22:20 -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
Andrew Ferrazzutti
f0f9b929a1
Update js-sdk to use non-legacy calls if found (#2540) 2024-08-07 13:00:19 -04:00
Robin
9b5072cc57
Merge pull request #2541 from robintown/local-on-local
Don't show local media on top of itself
2024-08-07 09:18:29 -04:00
Hugh Nimmo-Smith
b13fa85465
Add note on how to add a new translation key (#2536)
* Add note on how to add a new translation key

* Lint

* Nit
2024-08-07 10:40:44 +01: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
f928e63c7b
Merge pull request #2539 from robintown/duplicate-tiles-crash
Fix a crash when the duplicate tiles option is empty
2024-08-06 16:24:58 -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
04ad44f900
Merge pull request #2534 from element-hq/renovate/postcss-preset-env-10.x
Update dependency postcss-preset-env to v10
2024-08-06 10:11:20 -04:00
Robin
90072aa2bb
Merge pull request #2538 from element-hq/renovate/compound
Update dependency @vector-im/compound-design-tokens to v1.8.0
2024-08-06 10:10:35 -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