Commit Graph
2160 Commits
Author SHA1 Message Date
Robin f1233cad20 Merge branch 'livekit' into narrow-footer 2024-11-08 12:45:09 -05:00
5d88c52e30 Support for generic reactions (#2708)
* Initial support for Hand Raise feature

Signed-off-by: Milton Moura <miltonmoura@gmail.com>

* Refactored to use reaction and redaction events

Signed-off-by: Milton Moura <miltonmoura@gmail.com>

* Replacing button svg with raised hand emoji

Signed-off-by: Milton Moura <miltonmoura@gmail.com>

* SpotlightTile should not duplicate the raised hand

Signed-off-by: Milton Moura <miltonmoura@gmail.com>

* Update src/room/useRaisedHands.tsx

Element Call recently changed to AGPL-3.0

* Use relations to load existing reactions when joining the call

Signed-off-by: Milton Moura <miltonmoura@gmail.com>

* Links to sha commit of matrix-js-sdk that exposes the call membership event id and refactors some async code

Signed-off-by: Milton Moura <miltonmoura@gmail.com>

* Removing RaiseHand.svg

* Check for reaction & redaction capabilities in widget mode

Signed-off-by: Milton Moura <miltonmoura@gmail.com>

* Fix failing GridTile test

Signed-off-by: Milton Moura <miltonmoura@gmail.com>

* Center align hand raise.

* Add support for displaying the duration of a raised hand.

* Add a sound for when a hand is raised.

* Refactor raised hand indicator and add tests.

* lint

* Refactor into own files.

* Redact the right thing.

* Tidy up useEffect

* Lint tests

* Remove extra layer

* Add better sound. (woosh)

* Add a small mode for spotlight

* Fix timestamp calculation on relaod.

* Fix call border resizing video

* lint

* Fix and update tests

* Allow timer to be configurable.

* Add preferences tab for choosing to enable timer.

* Drop border from raised hand icon

* Handle cases when a new member event happens.

* Prevent infinite loop

* Major refactor to support various state problems.

* Tidy up and finish test rewrites

* Add some explanation comments.

* Even more comments.

* Use proper duration formatter

* Remove rerender

* Fix redactions not working because they pick up events in transit.

* More tidying

* Use deferred value

* linting

* Add tests for cases where we got a reaction from someone else.

* Be even less brittle.

* Transpose border to GridTile.

* First PoC for reactions

* hide menu by default

* Add lightbulb.

* Add reaction indicator.

* Add sounds.

* Tidy up + add support for floating emoji.

* Linting and general stability improvements.

* Subscribe to the ecall reaction event type.

* fix import

* Center emoji picker

* Overflow buttons when screen is too narrow

* lint

* Add settings for disabling animations / sounds.

* Make vertical divider more visually distinct.

* Make event listener more resillient.

* lint

* Fix some tests.

* Remove old raised hand component

* Add new icon

* Update text

* Update compound hand raised icon.

* Add deer.

* Fix case where you could send larger strings as emoji

* Const the active time.

* Document time in css.

* Add rock emoji

* Add licence file.

* Add type def for custom reaction type.

* better reaction description

* Factor out reactions test structure to utils file.

* Add tests for ReactionToggleButton

* Add keyboard shortcuts for reaction sending.

* type tidyups

* lint

* Add tests for ReactionAudioRenderer

* lint

* prettier

* i18n sort

* final lint?

* Preload reaction sounds to prevent delays.

* Update rock sounds

* add onclick back

* Fix test

* lint

* simplify

* Tweak line height

* modal impl

* Modal refactor attempts.

* Remove closed menu test since we're using Modal.

* Swap icon, make mobile view better.

* Fix mobile view for emoji picker.

* Use Intl.Segmenter

* Clear timeouts on component close.

* Remove useless useCallback

* Use prefers-reduced-motion

* Add toggle for raise hand.

* Add lower hand text

* Add lower motion mode.

* Decomplicate className system for Modal

* Add error for failured to send reaction.

* i18n

* Spacing for emoji buttons search

* Remove unrequired media query

* Fix generic sound not playing.

* Clear reactions if we're clearing timeouts.

* Fix tests

* Relabel lower hand

* More translations

* Add comments on reaction interface

* Move polyfill.

* lint

* Replace deer sound

* Another attempt to fix the sizing of the reactions

* cleanup

* fix button

* fix

---------

Signed-off-by: Milton Moura <miltonmoura@gmail.com>
Co-authored-by: Milton Moura <miltonmoura@gmail.com>
Co-authored-by: fkwp <fkwp@users.noreply.github.com>
2024-11-08 17:36:40 +00:00
Robin c7e220e310 Make the footer display more nicely on narrow screens
It needed a bit of tweaking now that we have up to 6 buttons in the footer. I tried to do everything in CSS this time.
2024-11-08 12:16:59 -05:00
Robin 0ffb4cc23d Disable the encryption status indicators
Currently they're a bit broken and we don't have the time to fix them.
2024-11-08 09:34:02 -05:00
Hugh Nimmo-Smith 886dc2c2fe Avoid case of one-to-one layout with missing local or remote 2024-11-08 06:50:58 +00:00
Hugh Nimmo-Smith cf3893bf52 Tidy settings 2024-11-07 18:24:13 +00:00
Hugh Nimmo-Smith 190ac9be3d Remove unused effect for setting 2024-11-07 18:05:41 +00:00
Hugh Nimmo-Smith c37c2e50bd Handle no local media (yet) 2024-11-07 17:53:44 +00:00
Hugh Nimmo-Smith 238797aed8 Remove isLiveKitParticipantAvailable and show via encryption status 2024-11-07 17:53:08 +00:00
Will Hunt 938beccb6e Add tests for Modal (#2731)
* Add Modal tests.

* fix type

* apply review feedback

* lint

* remove act
2024-11-07 17:06:49 +00:00
Hugh Nimmo-Smith 5009f1fe1b Assertions for one-on-one view 2024-11-07 16:53:25 +00:00
Hugh Nimmo-Smith be250e2f25 Handle no visible media id 2024-11-07 16:34:09 +00:00
Hugh Nimmo-Smith 0c4cddbb32 Apply local override where participant not yet known 2024-11-07 16:23:40 +00:00
Hugh Nimmo-Smith bf41cfc005 Cleanup 2024-11-07 15:28:55 +00:00
Hugh Nimmo-Smith 5da642b71d Fix mocks 2024-11-07 15:24:58 +00:00
Hugh Nimmo-Smith bb56f4205b tidy up test init 2024-11-07 14:24:20 +00:00
Hugh Nimmo-Smith 5e8a94778d tidy up handling of local rtc member in tests 2024-11-07 14:16:55 +00:00
Hugh Nimmo-Smith 6bda8953ab Tidy config of show non-member settings 2024-11-07 14:02:25 +00:00
Hugh Nimmo-Smith 95effe0852 Cleanup 2024-11-07 13:01:48 +00:00
Timo 9bf40eda25 Prohibit .preview to be 0 width (#2730) 2024-11-07 13:15:12 +01:00
Hugh Nimmo-Smith 0760796024 Remove throttleTime from bad merge 2024-11-07 12:12:10 +00:00
Hugh Nimmo-Smith 9bfd2e371c Revert function reordering 2024-11-07 12:02:32 +00:00
Hugh Nimmo-Smith e515359344 Lint 2024-11-07 11:33:22 +00:00
Hugh Nimmo-Smith dfd7273ac6 Duplicate screen sharing tiles like we used to 2024-11-07 11:30:08 +00:00
Hugh Nimmo-Smith f9f8f378af Disable showing non-member tiles by default 2024-11-06 17:46:23 +00:00
Hugh Nimmo-Smith 59e49d5ff3 Lint 2024-11-06 17:31:06 +00:00
Hugh Nimmo-Smith 4f6b1b0e10 Tests again 2024-11-06 17:30:29 +00:00
Hugh Nimmo-Smith efe9c9b8fe Fix RTC members in tes 2024-11-06 17:05:29 +00:00
Hugh Nimmo-Smith b1798e7f4b Merge branch 'livekit' into toger5/tiles_based_on_rtc_member 2024-11-06 16:33:57 +00:00
Hugh Nimmo-Smith eec44702f7 Make local field based on view model class not observable 2024-11-06 16:33:53 +00:00
Hugh Nimmo-Smith efee27ad25 More keys removal 2024-11-06 16:33:03 +00:00
Hugh Nimmo-Smith d8d4e8942c Readonly 2024-11-06 16:07:02 +00:00
Hugh Nimmo-Smith 2c3d733714 isLiveKitParticipantAvailable 2024-11-06 15:57:39 +00:00
Hugh Nimmo-Smith bfffddfa92 Fix minature => miniature spelling (#2727) 2024-11-06 15:54:58 +00:00
Hugh Nimmo-Smith f611554c31 Don't hide video on encryption status error (#2726) 2024-11-06 15:31:31 +00:00
Hugh Nimmo-Smith 5213636d23 Merge branch 'livekit' into toger5/tiles_based_on_rtc_member 2024-11-06 14:34:50 +00:00
Hugh Nimmo-Smith 7fd344385d Add rxjs/recommend eslint rules (#2724)
We will probably want to tweak these as we get more used to them.
2024-11-06 14:33:06 +00:00
Hugh Nimmo-Smith a1083f3284 isRTCParticipantAvailable => isLiveKitParticipantAvailable 2024-11-06 14:29:09 +00:00
Hugh Nimmo-Smith b0e0e0ed6b Add explicit types for public fields 2024-11-06 14:13:00 +00:00
Hugh Nimmo-Smith bcbdb596a3 Fix user id 2024-11-06 14:12:32 +00:00
Hugh Nimmo-Smith 73107e4139 Merge fixes 2024-11-06 14:02:14 +00:00
Hugh Nimmo-Smith c829f2f599 Lint 2024-11-06 14:02:09 +00:00
Hugh Nimmo-Smith 733b685e96 Merge branch 'livekit' into toger5/tiles_based_on_rtc_member 2024-11-06 13:42:45 +00:00
Hugh Nimmo-Smith fecd789d02 Mock RTC members 2024-11-06 11:22:29 +00:00
Hugh Nimmo-Smith 0d1b54e071 video is optional 2024-11-06 11:15:28 +00:00
Hugh Nimmo-Smith e7dbddb651 Fix optionality of nonMemberItemCount 2024-11-06 11:15:18 +00:00
Hugh Nimmo-Smith c45f724279 Show encryption key status from LiveKit (#2700)
* Refactor to make encryption system available in view models

* WIP show encryption errors from LiveKit

* Missing CSS

* Show encryption status based on LK and RTC

* Lint

* Lint

* Fix tests

* Update wording

* Refactor

* Lint
2024-11-06 11:12:46 +00:00
Will Hunt bc0ab92394 Add feature to release hand raised when the tile indicator is clicked. (#2721)
* Refactor to add support for lowering hand on indicator click.

* Cleanup and lint.

* fix icon being a little off
2024-11-06 11:00:19 +00:00
RobinandHugh Nimmo-Smith 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
RobinandHugh Nimmo-Smith 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