Commit Graph
100 Commits
Author SHA1 Message Date
110914a4d6 Replace some custom React hooks with observable-hooks (#2710)
The observable-hooks package provides hooks that do exactly the same thing as these custom React hooks I had written a while back. (even the names are the same, wow)

Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2024-11-06 09:43:27 +00:00
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
RobinandGitHub 98c199d1cf Merge pull request #2690 from robintown/spotlight-speaking
Show speaking indicators in spotlight during screen sharing
2024-11-04 12:36:58 -05:00
Robin b903e11cfc Fix lint error 2024-11-04 10:56:29 -05:00
RobinandGitHub 19c4696a0d Merge pull request #2692 from robintown/hide-profile
Hide the 'profile' menu option in widget mode
2024-11-02 18:37:45 -04:00
RobinandGitHub b3441ed4a0 Merge pull request #2711 from robintown/lobby-unmirror
Don't mirror rear-facing cameras in the lobby
2024-11-02 18:26:31 -04:00
Robin 7b0bdd320a Don't mirror rear-facing cameras in the lobby 2024-11-01 17:26:45 -04:00
RobinandGitHub c9cf7aa7db Merge pull request #2709 from robintown/app-prompt-config
Add a config option to disable the app prompt
2024-11-01 17:05:09 -04:00
RobinandGitHub 8f8e2b42e1 Merge pull request #2694 from robintown/switch-camera
Add a button to switch the camera on mobile
2024-11-01 17:04:36 -04:00
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
RobinandGitHub 90681b16e0 Merge pull request #2705 from element-hq/renovate/github-actions
Update GitHub Actions
2024-10-31 21:37:37 -04:00
RobinandGitHub ef320636e2 Merge pull request #2661 from element-hq/renovate/eslint-plugin-unicorn-56.x
Update dependency eslint-plugin-unicorn to v56
2024-10-30 10:29:47 -04:00
RobinandGitHub a38862b0b9 Merge pull request #2682 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-10-30 10:26:19 -04:00
RobinandGitHub 0d45c25eb8 Merge pull request #2693 from robintown/join-guest-strings
Update the strings on the join as guest screen
2024-10-29 20:49:46 -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
RobinandGitHub e06aaf6fd4 Merge pull request #2691 from robintown/duplicate-devices
Remove duplicate media devices from the list
2024-10-28 15:05:47 -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
RobinandGitHub 7edc8af9a0 Merge pull request #2687 from robintown/media-devices-config
Add config options for starting with audio and video enabled
2024-10-28 09:08:04 -04:00
Robin 551c3f4104 Add config options for starting with audio and video enabled 2024-10-27 21:47:13 -04:00
RobinandGitHub 5907bf7c33 Merge pull request #2662 from element-hq/renovate/compound
Update Compound
2024-10-25 12:27:32 -04:00
RobinandGitHub bb95d9e414 Merge pull request #2686 from robintown/keep-local-tile
Don't cause the local tile to disappear when joining
2024-10-25 08:22:37 -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
RobinandGitHub a4faafb3e0 Merge pull request #2681 from robintown/volume-slider
Make the volume slider less silly
2024-10-22 17:25:18 -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
RobinandGitHub bfe6da6be7 Merge pull request #2680 from robintown/disable-codecov-annotations
Disable Codecov annotations
2024-10-18 17:01:48 -04:00
Robin 250291315e Disable Codecov annotations
Don't mark up the diffs on PRs with warnings about untested lines; we're not aiming for 100% test coverage and they just get in the way of reviewing.
2024-10-18 16:39:02 -04:00
RobinandGitHub 75c7516f0a Merge pull request #2673 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-10-17 15:54:21 -04:00
RobinandGitHub 8e20be42e0 Merge pull request #2672 from element-hq/renovate/major-react-monorepo
Update dependency eslint-plugin-react-hooks to v5
2024-10-11 11:36:43 -04:00
RobinandGitHub 1fff785853 Merge pull request #2655 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-10-01 11:08:50 -04:00
RobinandGitHub 55548afa3c Merge pull request #2648 from robintown/compose-config
Make it possible to use the JWT service with a local homeserver
2024-09-27 17:07:49 -04:00
5cf1cf9e54 Make port types explicit
Co-authored-by: fkwp <fkwp@users.noreply.github.com>
2024-09-27 16:35:39 -04:00
RobinandGitHub 877be03328 Merge pull request #2635 from element-hq/renovate/global-jsdom-25.x
Update dependency global-jsdom to v25
2024-09-27 16:05:03 -04:00
RobinandGitHub 27a24cd7a3 Merge pull request #2631 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-09-27 16:04:10 -04:00
Robin a74d170586 Hold back PostHog updates for now
https://github.com/PostHog/posthog-js/issues/1437
2024-09-27 16:02:12 -04:00
RobinandGitHub 482b46fed2 Merge pull request #2649 from element-hq/renovate/compound
Update dependency @vector-im/compound-web to v6.2.1
2024-09-27 15:33:39 -04:00
Robin f0e59baad4 Make the SFU actually usable 2024-09-26 16:53:45 -04:00
Robin e98740d6f2 Make it possible to use the JWT service with a local homeserver
I recently tried to use the dev configs with a local homeserver and found that the configuration was not compatible with this. We need to relax the network isolation and TLS cert verification requirements for fully local development to be possible.
2024-09-26 14:19:06 -04:00
RobinandGitHub a491b1fdf0 Merge pull request #2644 from robintown/fix-cookie-policy
Make the cookie policy link show up again
2024-09-19 16:01:11 -04:00
Robin 90043508ce Update cookie policy links in translations 2024-09-19 15:54:21 -04:00
Robin 1e2e4c8e7b Make the cookie policy link show up again
For some reason yarn i18next didn't catch that the string had to be changed? I removed the string and regenerated it, and now the cookie policy is back.
2024-09-19 15:35:46 -04:00
RobinandGitHub ac42d4a69a Merge pull request #2643 from robintown/log-in-links
Make the links on the log in page visually consistent
2024-09-19 14:33:30 -04: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
RobinandGitHub cec7fc8f5b Merge pull request #2629 from robintown/test-call-vm
Test CallViewModel
2024-09-18 23:13:22 -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
RobinandGitHub 745533f061 Merge pull request #2636 from element-hq/renovate/npm-vite-vulnerability
Update dependency vite to v5.4.6 [SECURITY]
2024-09-17 16:56:33 -04:00
RobinandGitHub a8b9c1ea33 Merge pull request #2633 from element-hq/renovate/compound
Update dependency @vector-im/compound-web to v6.2.0
2024-09-17 16:53:52 -04: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
RobinandGitHub e699cb6411 Merge pull request #2624 from robintown/compound-typography
Replace typography components with Compound components
2024-09-12 13:04:09 -04:00
Robin 3ded8bec47 Add more comments 2024-09-12 12:59:02 -04:00
Robin e5e6233efb Replace typography components with Compound components 2024-09-11 13:44:43 -04:00
RobinandGitHub 5fda7fa220 Merge pull request #2619 from robintown/copyright-header
Update the copyright header template
2024-09-11 09:53:16 -04:00
RobinandGitHub 3df12be95c Merge pull request #2620 from robintown/missing-members
Diagnose the missing room members situation
2024-09-11 09:33:42 -04: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 e15296427c Update the copyright header template
This updates the text suggested by our copyright header lint rule.
2024-09-10 18:19:55 -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
Robin fa36fcd3a2 Exclude test utilities from coverage report 2024-09-10 16:23:00 -04: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
RobinandGitHub cc813fd3cb Merge pull request #2610 from robintown/update-js-sdk
Update matrix-js-sdk
2024-09-03 16:28:21 -04:00
RobinandGitHub 4157ad071a Merge pull request #2608 from robintown/fix-rageshakes
Fix rageshakes
2024-09-03 16:23:30 -04:00
Robin bc157c6dc4 Update matrix-js-sdk
There's no particular change that we need to pull in, but I like to keep my linked copy of matrix-js-sdk up to date—a TypeScript config change is required by recent versions, so I'd like to update this now.
2024-09-03 16:18:34 -04:00
RobinandGitHub 57e1434fec Merge pull request #2609 from robintown/coverage-barrier
Make the test coverage target non-blocking
2024-09-03 16:14:00 -04:00
Robin 27394f9710 Make the test coverage target non-blocking
Sadly Codecov doesn't give us a way to relax the coverage requirements for changes that touch very few lines of code, which has been an invaluable feature of SonarCloud. I suggest we make the check non-blocking.
2024-09-03 16:07:43 -04: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
RobinandGitHub 8e72ad597b Merge pull request #2473 from robintown/resize-observer
Remove ResizeObserver polyfill
2024-09-03 15:37:54 -04:00
Robin c8a2ef6a1d Merge branch 'livekit' into resize-observer 2024-09-03 15:35:10 -04:00
RobinandGitHub 1784cb284c Merge pull request #2598 from robintown/test-media-vm
Test MediaViewModel
2024-09-03 10:40:02 -04:00
RobinandGitHub 55038065c7 Remove a test debug log (#2597) 2024-09-03 11:04:59 +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
RobinandGitHub e9fc5dadd9 Merge pull request #2594 from robintown/upgrade-compound
Upgrade Compound Web
2024-08-30 09:38:17 -04:00
Robin cb28fa715a Upgrade Compound Web 2024-08-30 09:35:34 -04:00
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
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
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
RobinandGitHub 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
RobinandGitHub 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
RobinandGitHub 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
RobinandGitHub 66b79f57bb Merge pull request #2571 from element-hq/hughns/rust-crypto
Use Rust crypto implementation
2024-08-23 11:18:43 -04:00
RobinandGitHub 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
RobinandGitHub 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
RobinandGitHub 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