Commit Graph

2039 Commits

Author SHA1 Message Date
Robin
7ad70064a3 Add a config option to disable the app prompt 2024-11-01 16:57:48 -04:00
Robin
8c0280954c Add a button to switch the camera on mobile 2024-11-01 16:00:34 -04:00
Robin
42be187182 Explain why speaking indicators are hidden 2024-11-01 11:25:55 -04:00
Robin
0784a30ef0 Update the strings on the join as guest screen
Hugh pointed out that the button labeled "Join call now" on this screen is misleading, because it does not join you to the call but rather send you to the lobby. Meanwhile, the designs call for this screen to use the words "Join as guest" and "Continue", so let's go with that.
2024-10-28 15:59:53 -04:00
Robin
d2aa6d561f Hide the 'profile' menu option in widget mode
The profile settings tab is non-functional in widget mode so we need to hide its other points of entry.
2024-10-28 15:15:02 -04:00
Robin
0ec56014c3 Remove duplicate media devices from the list
Somehow on my system Firefox always manages to create multiple entries for my webcam. This was an easy enough thing to fix.
2024-10-28 15:02:01 -04:00
Robin
3a706ea3e0 Show speaking indicators in spotlight during screen sharing 2024-10-28 14:45:06 -04:00
Robin
551c3f4104 Add config options for starting with audio and video enabled 2024-10-27 21:47:13 -04:00
Robin
339a98d1e1 Don't cause the local tile to disappear when joining
Before you're connected to the SFU the local participant object will have the empty string as its ID. This changes to your actual ID once you've connected. Apparently I tried to fix this by forcing the local ID to always be the string 'local' but then I just forgot to use it correctly :)
2024-10-24 17:20:56 -04:00
Robin
d901045e55 Address review comments 2024-10-22 17:23:40 -04:00
Robin
0c6e53cda4 Make the volume slider less silly
Previously, dragging it all the way to the left would *not* mute the participant but rather bottom out at 10% volume, and people have found this unintuitive. Let's make it less silly by giving the slider a range of 0% to 100%, and making the mute toggle button have the same effect as dragging the slider to zero. When unmuting, it will reset to the last non-zero "committed" volume, similar to how the volume sliders in desktop environments work.
2024-10-18 17:51:37 -04:00
Hugh Nimmo-Smith
8a84c6c45e
Use non-deprecated method of re-processing MatrixRTCSession keys (#2646)
* Handle case of encryption key for an index to be undefined

As per https://github.com/matrix-org/matrix-js-sdk/pull/4423 the key can be undefined and so we should handle this rather than waiting for SubtleCrypto.importKey() to fail.

* Use release version of matrix-js-sdk

Diff is baa6d13506...v34.7.0

* Use RTCSession. reemitEncryptionKeys()

* Add some test coverage whilst we are here

* Add some test coverage whilst we are here

* Lint
2024-10-11 11:34:45 -04:00
Hugh Nimmo-Smith
8272c54177
Set LiveKit keyring size to 256 (#2660) 2024-10-10 10:34:38 +01:00
Timo
d7b06760ad
Test useTheme hook (#2625)
* Test useTheme hook
2024-09-24 22:15:16 +02:00
Hugh Nimmo-Smith
ed35d6b377
Posthog improvements (#2630) 2024-09-23 14:35:41 +01:00
Hugh Nimmo-Smith
d14b43487a
Intercept matrix_sdk logging via console and include in rageshake (#2623)
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
2024-09-23 14:35:10 +01:00
Robin
8b3c94b120 Make the links on the log in page visually consistent
Timo was totally right in his previous review of my typography component work that these didn't have the right styling. I just didn't notice!
2024-09-19 12:09:14 -04:00
Robin
4aab6cfe4e Leave an open question about whether to move test utils 2024-09-18 23:10:30 -04:00
Robin
25193f467a Factor out repeated event emitter mocks 2024-09-18 23:05:31 -04:00
Robin
156f1e3a10 Merge branch 'livekit' into test-call-vm 2024-09-18 22:37:15 -04:00
Half-Shot
c19645c710 consts 2024-09-18 10:10:29 +01:00
Half-Shot
7e5a8b8feb Retry a join on invite if the response was M_FORBIDDEN 2024-09-18 10:08:03 +01:00
Johannes Marbach
d2fb1e566f Merge branch 'livekit' into johannes/remove-call 2024-09-13 12:47:18 +02:00
Robin
016ba676dd Test CallViewModel
This adds tests for a couple of the less trivial bits of code in CallViewModel. Testing them helped me uncover why focus switches still weren't being smooth! (It was because I was using RxJS's sample operator when I really wanted withLatestFrom.)
2024-09-12 15:53:13 -04:00
Robin
3ded8bec47 Add more comments 2024-09-12 12:59:02 -04:00
Johannes Marbach
8e21453887 Use i18next hook 2024-09-12 09:35:23 +02:00
Johannes Marbach
b1b226d79b Disable link and button while leaving 2024-09-12 09:35:17 +02:00
Robin
e5e6233efb Replace typography components with Compound components 2024-09-11 13:44:43 -04:00
Hugh Nimmo-Smith
a5aeb6f324
Give user feedback if the rageshake submission failed (#2621) 2024-09-11 14:53:50 +01:00
Robin
3df12be95c
Merge pull request #2620 from robintown/missing-members
Diagnose the missing room members situation
2024-09-11 09:33:42 -04:00
Hugh Nimmo-Smith
7e5b70d439
Rageshake logging improvements (#2622) 2024-09-11 14:02:59 +01:00
Robin
ca135d471e React more actively to changes in room membership 2024-09-11 01:27:24 -04:00
Robin
1b5b9342fe Warn about duplicate rooms 2024-09-11 01:27:02 -04:00
Robin
d12a01b1c4 Test StarRating 2024-09-10 18:21:19 -04:00
Robin
e8278b4ed2 Merge branch 'livekit' into test-components 2024-09-10 18:05:22 -04:00
Robin
d6985e0053 Test SpotlightTile more thoroughly
Catching two accessibility issues along the way: we were putting the wrong accessible labels on the 'expand' button, and even the off-screen pages of the spotlight tile were being exposed to accessibility technologies rather than hidden.
2024-09-10 17:42:18 -04:00
Robin
8872b879d8 Explain why I've added aria-describedby={undefined} 2024-09-10 16:24:58 -04:00
Johannes Marbach
09af614fb8 Switch to close icon 2024-09-10 16:21:56 +02:00
Johannes Marbach
9766cb2ca2 Add button to remove call from recents
Fixes: #2243
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2024-09-10 13:33:12 +02:00
Timo
c3edd3e25e
Enable lint rules for Promise handling to discourage misuse of them. (#2607)
* Enable lint rules for Promise handling to discourage misuse of them.
Squashed all of Hugh's commits into one.

---------

Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2024-09-10 09:49:35 +02:00
Hugh Nimmo-Smith
c30c8ac7d6
Include the hostname of where EC is running in rageshakes (#2616) 2024-09-09 11:14:46 +01:00
Robin
982bd6d06b Test SpotlightTile 2024-09-06 18:41:47 -04:00
Robin
ba36cfa239 Test GridTile 2024-09-06 18:41:47 -04:00
Robin
0c0be8a862 Test InviteModal 2024-09-06 18:41:47 -04:00
Robin
d9333d6829 Test RoomHeaderInfo 2024-09-06 18:41:47 -04:00
Robin
40fc1aa46b Upgrade Compound Web
This patch release fixes a bug where tooltips would label non-interactive triggers in an inaccessible way.
2024-09-06 18:40:35 -04:00
Robin
251918a6ad Enable test isolation
I had experimented with turning this off in order to improve test performance, and apparently that ended up being merged. Now if we're to do component testing, we'll be changing things globally on the document, so isolation is very much necessary.
2024-09-06 18:40:18 -04:00
fkwp
f517099f27 The New Vector Ltd. -> New Vector Ltd 2024-09-06 10:35:10 +02:00
fkwp
9add3e52c4 Update file headers copyright and change licence to AGPL-3.0-only 2024-09-06 10:22:13 +02:00
Robin
0d007f49ec Fix rageshakes
We were relying on deprecated APIs that are not supported when using Rust crypto. Since this entire file was copied and pasted from matrix-react-sdk originally, I just copied and pasted some of its more recent code in.
2024-09-03 16:00:17 -04:00
Robin
c8a2ef6a1d Merge branch 'livekit' into resize-observer 2024-09-03 15:35:10 -04:00
renovate[bot]
c2cc0937c1
Update typescript-eslint monorepo to v8 (major) (#2523)
* Update typescript-eslint monorepo to v8

* es lint fixes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Timo <toger5@hotmail.de>
2024-09-03 17:14:27 +02:00
Robin
1784cb284c
Merge pull request #2598 from robintown/test-media-vm
Test MediaViewModel
2024-09-03 10:40:02 -04:00
Robin
55038065c7
Remove a test debug log (#2597) 2024-09-03 11:04:59 +02:00
Timo
922fe5bafd
Fix (registration flow): logout old before creating new client as required by initClient. (#2604) 2024-09-02 21:42:50 +02:00
fkwp
5f8081bebb
Merge pull request #2602 from Johennes/johannes/qr
Display QR code when sharing invite link
2024-09-02 18:56:42 +02:00
Johannes Marbach
12237c469f
Update src/QrCode.module.css
Co-authored-by: Timo <16718859+toger5@users.noreply.github.com>
2024-09-02 17:52:01 +02:00
Timo
040288790c
Fix (rust crypto): Adjust login procedures to account for rust crypto behaviour. (#2603)
* Fix for missing client store (caused by: #2587)

* Fix interactive login with authenticated guest user.
Fix clearing storage before logging in a new account.
2024-09-02 17:48:15 +02:00
Johannes Marbach
cba5eb5c07 Run prettier 2024-09-02 16:30:37 +02:00
Johannes Marbach
6ae0c0988d Add simplistic rendering test 2024-09-02 16:28:53 +02:00
Johannes Marbach
8655b41c05 Run prettier 2024-09-02 08:44:33 +02:00
Johannes Marbach
5b09a5ebd8 Merge branch 'livekit' into johannes/qr 2024-09-02 08:40:15 +02:00
Johannes Marbach
354382d498 Display QR code when sharing invite link
Fixes: #2495
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2024-09-02 08:25:10 +02:00
Robin
9d5145a7a6 Test MediaViewModel
This was the result of me playing around with RxJS marble testing to understand how to get things done with its TestScheduler. I discovered that it lacks a clear way to fire arbitrary actions during the test, so I built a small helper function called schedule which does this for us.
2024-08-30 19:09:42 -04:00
Timo
3e57a7692c
Add back keyboard toast tests (#2582)
* Fix global-jsdom initialization

* add back toast tests

* fix keyboard input events.

* add jsdom types
2024-08-30 15:40:09 +02:00
Timo
172af1dce3
Add missing productName string (#2596) 2024-08-30 15:29:14 +02:00
Andrew Ferrazzutti
0974488c4e
Make one more js-sdk import consistent (#2595)
Update an import that was missed in b79a405e
2024-08-30 08:57:15 -04:00
Timo
a2dd538237
Fix for missing client store (caused by: #2587) (#2591) 2024-08-30 11:28:00 +02:00
Richard van der Hoff
b79a405ed6
Make js-sdk imports consistent (#2590)
We need to be consistent about whether we import matrix-js-sdk from `src` or
`lib`, otherwise we get two copies of matrix-js-sdk, and everything explodes.
2024-08-29 12:37:52 -04:00
Timo
159ae603aa
Remove shadow for layout switcher. (#2588) 2024-08-29 17:59:28 +02:00
Timo
559fc4851c
Fix rust crypto: dont use legacy crypto store anymore. (#2587)
The logic for the legacy store was intercepting with the rustCrypto that handles all the cases itself.
2024-08-29 16:59:47 +02:00
Robin
0db51d9dfd
Replace remaining React ARIA components with Compound components (#2576)
* Fix issues detected by Knip

Including cleaning up some unused code and dependencies, using a React hook that we unintentionally stopped using, and also adding some previously undeclared dependencies.

* Replace remaining React ARIA components with Compound components

* fix button position

* disable scrollbars to resolve overlapping button

---------

Co-authored-by: Timo <toger5@hotmail.de>
2024-08-28 14:44:39 +02:00
Robin
7bca541cb6
Perform dead code analysis with Knip (#2575)
* Install Knip

* Clarify an import that was confusing Knip

* Fix issues detected by Knip

Including cleaning up some unused code and dependencies, using a React hook that we unintentionally stopped using, and also adding some previously undeclared dependencies.

* Run dead code analysis in lint script and CI

---------

Co-authored-by: Timo <toger5@hotmail.de>
2024-08-28 02:06:57 +02:00
Johannes Marbach
7e3e17a3e8
Link "Create an account" button to registration page (#2583)
Fixes: #2328

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2024-08-27 15:55:38 +02:00
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
Robin
b5f6343a5e Remove ResizeObserver polyfill
All major browsers support it out of the box, nowadays.
2024-08-23 15:07:40 -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
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
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
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
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