Commit Graph
100 Commits
Author SHA1 Message Date
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
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
RobinandGitHub 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
RobinandGitHub 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
RobinandGitHub 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
RobinandGitHub 6f03653532 Merge pull request #2545 from robintown/breakpoint
Consider any sufficiently short window 'flat'
2024-08-08 13:22:41 -04:00
RobinandGitHub 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
RobinandGitHub 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
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
RobinandGitHub 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
RobinandGitHub 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
RobinandGitHub 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
RobinandGitHub 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
RobinandGitHub eaf3fb13c1 Merge pull request #2448 from element-hq/renovate/major-compound
Update dependency @vector-im/compound-web to v6
2024-08-02 15:38:17 -04:00
Robin b503056673 Adapt to breaking changes in Compound 2024-08-02 15:27:49 -04:00
RobinandGitHub aadf6c05ac Merge pull request #2530 from robintown/no-you
Show your own name on your tile
2024-08-02 10:45:32 -04:00
RobinandGitHub 39ee8d838e Merge pull request #2531 from robintown/iterate-margins
Add back some margins to the interface
2024-08-02 08:42:03 -04:00
RobinandGitHub c1de41106f Merge pull request #2532 from robintown/renovate-warning
Fix Renovate warning
2024-08-01 17:19:37 -04:00
Robin e12bad952a Fix Renovate warning
Apparently Renovate doesn't really like it when you use a group: preset inside packageRules, instead of at the top level of the config. We do want to apply schedule:weekly only to the "all non-major dependencies" group though, so we need to write the group definition out by hand.
2024-08-01 16:41:19 -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
RobinandGitHub f89342713a Merge pull request #2528 from robintown/remote-spotlight
More strongly prefer putting a remote speaker in the spotlight
2024-08-01 13:24:57 -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
RobinandGitHub 2b67a9cfbe Merge pull request #2486 from robintown/delete-fullscreen
Delete the unused full screen code
2024-07-29 09:28:07 -04:00
RobinandGitHub 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
RobinandGitHub 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
RobinandGitHub 5becd2e175 Fix a crash when using the duplicate tiles option (#2512) 2024-07-26 12:51:09 +02:00
RobinandGitHub 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
RobinandGitHub 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
RobinandGitHub 2de4705fa7 Merge pull request #2509 from robintown/icon-imports
Import Compound icons in the new recommended way
2024-07-25 14:26:41 -04: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
RobinandGitHub 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
RobinandGitHub 63afda05bc Merge pull request #2502 from robintown/shortcut-a11y
Improve accessibility of keyboard shortcuts
2024-07-25 08:24:13 -04: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
RobinandGitHub c74cebcc4b Merge pull request #2492 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-07-24 14:17:48 -04:00
RobinandGitHub 9cbd146e24 Merge pull request #2491 from element-hq/renovate/matrix-widget-api
Update dependency matrix-widget-api to v1.7.0
2024-07-24 11:14:46 -04:00
Robin 509bb4f1b0 Use LTS Node in CI 2024-07-24 11:12:36 -04:00
Robin 3be3a32f3d Update TypeScript target to match matrix-js-sdk
And work around https://github.com/microsoft/TypeScript/issues/55132
2024-07-24 11:07:46 -04:00
Robin 17adfc5777 Upgrade matrix-js-sdk 2024-07-24 10:17:47 -04:00
RobinandGitHub 35e2d2c432 Merge pull request #2494 from robintown/spotlight-fix
Quick and dirty fix to spotlight reactivity
2024-07-22 10:55:20 -04:00
Robin ea2d98179c Quick and dirty fix to spotlight reactivity 2024-07-22 10:52:20 -04:00
RobinandGitHub 4173fd113b Merge pull request #2485 from element-hq/new-call-layouts
New call layouts
2024-07-19 09:08:51 -04: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
RobinandGitHub 6812c35a40 Merge pull request #2463 from robintown/rest-of-the-layouts
Implement most of the remaining layout changes
2024-07-18 11:34:47 -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
RobinandGitHub bcc06d86ff Merge pull request #2417 from robintown/one-on-one-layout
New one-on-one layout
2024-07-18 11:09:11 -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
RobinandGitHub 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
RobinandGitHub 24870deead Merge pull request #2382 from robintown/spotlight-layout
New spotlight layout
2024-07-18 08:50:31 -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
RobinandGitHub caea4b250e Merge pull request #2381 from robintown/observable-hooks
Replace react-rxjs with observable-hooks
2024-07-17 15:56:31 -04:00
Robin 0a8c6c1454 Merge branch 'new-call-layouts' into observable-hooks 2024-07-17 15:55:50 -04:00
RobinandGitHub d4a2617f7b Merge pull request #2380 from robintown/pin-always-show
Add toggle to always show yourself
2024-07-17 15:45:29 -04:00
RobinandGitHub e05c6f1bdf Merge pull request #2369 from robintown/duplicate-tiles
Add a developer option to duplicate tiles
2024-07-17 15:41:53 -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
Robin 8c21e8f277 Use a more descriptive string 2024-07-17 14:55:45 -04:00
RobinandGitHub d8634eed3d Merge pull request #2484 from element-hq/renovate/react-i18next-15.x
Update dependency react-i18next to v15
2024-07-17 13:14:11 -04: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