Commit Graph

61 Commits (9584388171d2efa5401b82031abaf61b3f33956a)

Author SHA1 Message Date
Michael Weimann 51554399fb
Implement broadcast message preview (#9762) 2022-12-16 11:01:16 +00:00
Michael Weimann 526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Robin 62a740d318
Fix call splitbrains when switching between rooms (#9692)
* Fix call splitbrains when switching between rooms

Mounting CallView causes the user's call membership room state to be cleaned up. However, because the GroupCall object always thought the local device was disconnected from the call, it would remove the local device from room state when the clean method is called, causing a splitbrain. This uses GroupCall's new enteredViaAnotherSession field to fix that, and also simplify participant tracking.

* Remove clean tests that have been moved to matrix-js-sdk
2022-12-02 09:35:31 +01:00
Robin 2c612d5aa1
Use native js-sdk group call support (#9625)
* Use native js-sdk group call support

Now that the js-sdk supports group calls natively, our group call implementation can be simplified a bit. Switching to the js-sdk implementation also brings the react-sdk up to date with recent MSC3401 changes, and adds support for joining calls from multiple devices. (So, the previous logic which sent to-device messages to prevent multi-device sessions is no longer necessary.)

* Fix strings

* Fix strict type errors
2022-11-28 16:37:32 -05:00
Michael Weimann e5ce6d7800
New password reset flow (#9581) 2022-11-22 07:58:37 +01:00
Michael Weimann f6347d24ef
Show time left for voice broadcast recordings (#9564) 2022-11-10 10:53:49 +00:00
Michael Weimann abec724387
Add voice broadcast pre-recoding PiP (#9548) 2022-11-10 09:38:48 +01:00
László Várady afdf289a78
Advanced audio processing settings (#8759)
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
Fixes https://github.com/vector-im/element-web/issues/6278
Fixes undefined
2022-11-09 20:14:55 +00:00
Michael Weimann 5fb0f5cc3e
Fix LegacyCallHandler-test (#9552) 2022-11-08 09:02:07 +00:00
Michael Telatynski 3747464b41
Make SonarCloud happier (#9545)
* Make SonarCloud happier

* i18n

* Iterate

* Update AddExistingToSpaceDialog.tsx

* Update SlashCommands.tsx
2022-11-07 13:45:34 +00:00
Janne Mareike Koschinski d92fdc1f5b
Loading threads with server-side assistance (#9356)
* Fix bug with message context menu
* fix bug where ThreadSummary failed if no last reply is available
* Fix relations direction API
* Use same API for threads as for any other timeline
* Determine if event belongs to thread on jumping to event
* properly listen to thread deletion
* Add thread redaction tests
* Add fetchInitialEvent tests
* Paginate using default TimelinePanel behaviour
* Remove unused threads deleted code

Co-authored-by: Germain <germain@souquet.com>
Co-authored-by: Germain <germains@element.io>
2022-10-28 13:48:15 +02:00
Michael Weimann e6a645dfae
Stop voice broadcast from save device on resume (#9509) 2022-10-26 18:59:47 +02:00
Florian Duros de86221c72
Merge remote-tracking branch 'origin/develop' into feat/add-message-edition-wysiwyg-composer 2022-10-24 14:41:27 +02:00
Florian Duros 50c29502e4
Add new tests for WysiwygComposer 2022-10-24 12:35:09 +02:00
Michael Telatynski eafc2d23a7
Ensure spaces in the spotlight dialog have rounded square avatars (#9480) 2022-10-24 08:58:36 +00:00
Michael Telatynski cf1b592f26
Update overly sensitive snapshot (#9421)
* Update snapshot

* Fix tests by adding missing stub
2022-10-14 15:57:12 +01:00
Germain 970d1912e5
Add mock for canSupport (#9414)
* Add mock for canSupport

* dead code
2022-10-13 18:22:25 +01:00
Michael Telatynski 8b54be6f48
Move from `browser-request` to `fetch` (#9345) 2022-10-12 18:59:07 +01:00
Šimon Brandner 6b1ee13c28
Always allow enabling sending read receipts (#9367)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-07 15:10:18 +02:00
David Baker 07a5a1dc6f
Fix device selection in pre-join screen for Element Call video rooms (#9321)
* Fix device selection in pre-join screen for Element Call video rooms

As per https://github.com/vector-im/element-call/pull/609

* Update unit test

* Lint

* Hold a media stream while we enumerate device so we can do so reliably.

This means we can remove the device fallback labels.

* i18n

* Remove unnecessary useState

* Fix fetching video devices when video muted

* Actually fix preview stream code

* Fix unit test now fallback is no longer a thing

* Test changing devices
2022-09-30 17:28:53 +01:00
Michael Weimann d775e403c4
Add voice broadcast recording stores (#9319)
* Add voice broadcast recording stores

* Refactor startNewVoiceBroadcastRecording
2022-09-28 10:22:50 +02:00
Germain 641cf28e4c
Implement push notification toggle in device detail (#9308)
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-09-27 13:35:54 +01:00
Michael Telatynski 56c95467de
Don't show feedback prompts when that UIFeature is disabled (#9305) 2022-09-22 15:08:14 +01:00
Michael Weimann c182c1c706
Generalise VoiceRecording (#9304) 2022-09-21 18:46:28 +02:00
kegsay 06c4ba32cd
Store refactor: make it easier to test stores (#9290)
* refactor: convert RoomViewStore from flux Store to standard EventEmitter

Parts of a series of experimental changes to improve the design of stores.

* Use a gen5 store for RoomViewStore for now due to lock handling

* Revert "Use a gen5 store for RoomViewStore for now due to lock handling"

This reverts commit 1076af071d997d87b8ae0b0dcddfd1ae428665af.

* Add untilEmission and tweak untilDispatch; use it in RoomViewStore

* Add more RVS tests; remove custom room ID listener code and use EventEmitter

* Better comments

* Null guard `dis` as tests mock out `defaultDispatcher`

* Additional tests
2022-09-20 15:32:39 +00:00
Robin cb735c9439
Element Call video rooms (#9267)
* Add an element_call_url config option

* Add a labs flag for Element Call video rooms

* Add Element Call as another video rooms backend

* Consolidate event power level defaults

* Remember to clean up participantsExpirationTimer

* Fix a code smell

* Test the clean method

* Fix some strict mode errors

* Test that clean still works when there are no state events

* Test auto-approval of Element Call widget capabilities

* Deduplicate some code to placate SonarCloud

* Fix more strict mode errors

* Test that calls disconnect when leaving the room

* Test the get methods of JitsiCall and ElementCall more

* Test Call.ts even more

* Test creation of Element video rooms

* Test that createRoom works for non-video-rooms

* Test Call's get method rather than the methods of derived classes

* Ensure that the clean method is able to preserve devices

* Remove duplicate clean method

* Fix lints

* Fix some strict mode errors in RoomPreviewCard

* Test RoomPreviewCard changes

* Quick and dirty hotfix for the community testing session

* Revert "Quick and dirty hotfix for the community testing session"

This reverts commit 37056514fbc040aaf1bff2539da770a1c8ba72a2.

* Fix the event schema for org.matrix.msc3401.call.member devices

* Remove org.matrix.call_duplicate_session from Element Call capabilities

It's no longer used by Element Call when running as a widget.

* Replace element_call_url with a map

* Make PiPs work for virtual widgets

* Auto-approve room timeline capability

Because Element Call uses this now

* Create a reusable isVideoRoom util
2022-09-16 11:12:27 -04:00
Robin 0d6a550c33
Prepare for Element Call integration (#9224)
* Improve accessibility and testability of Tooltip

Adding a role to Tooltip was motivated by React Testing Library's
reliance on accessibility-related attributes to locate elements.

* Make the ReadyWatchingStore constructor safer

The ReadyWatchingStore constructor previously had a chance to
immediately call onReady, which was dangerous because it was potentially
calling the derived class's onReady at a point when the derived class
hadn't even finished construction yet. In normal usage, I guess this
never was a problem, but it was causing some of the tests I was writing
to crash. This is solved by separating out the onReady call into a start
method.

* Rename 1:1 call components to 'LegacyCall'

to reflect the fact that they're slated for removal, and to not clash
with the new Call code.

* Refactor VideoChannelStore into Call and CallStore

Call is an abstract class that currently only has a Jitsi
implementation, but this will make it easy to later add an Element Call
implementation.

* Remove WidgetReady, ClientReady, and ForceHangupCall hacks

These are no longer used by the new Jitsi call implementation, and can
be removed.

* yarn i18n

* Delete call map entries instead of inserting nulls

* Allow multiple active calls and consolidate call listeners

* Fix a race condition when creating a video room

* Un-hardcode the media device fallback labels

* Apply misc code review fixes

* yarn i18n

* Disconnect from calls more politely on logout

* Fix some strict mode errors

* Fix another updateRoom race condition
2022-08-30 15:13:39 -04:00
Robin 28ed87bffe
Implement MSC3846: Allowing widgets to access TURN servers (#9061)
* Implement MSC3819: Allowing widgets to send/receive to-device messages

* Don't change the room events and state events drivers

* Implement MSC3846: Allowing widgets to access TURN servers

* Update to latest matrix-widget-api changes

* Support sending encrypted to-device messages

* Yield a TURN server immediately

* Use queueToDevice for better reliability

* Update types for latest WidgetDriver changes

* Upgrade matrix-widget-api

* Add tests

* Test StopGapWidget

* Fix a potential memory leak

* Add tests

* Empty commit to retry CI
2022-08-10 13:26:42 +00:00
Robin 103b60dfb5
Implement MSC3819: Allowing widgets to send/receive to-device messages (#8885)
* Implement MSC3819: Allowing widgets to send/receive to-device messages

* Don't change the room events and state events drivers

* Update to latest matrix-widget-api changes

* Support sending encrypted to-device messages

* Use queueToDevice for better reliability

* Update types for latest WidgetDriver changes

* Upgrade matrix-widget-api

* Add tests

* Test StopGapWidget

* Fix a potential memory leak
2022-08-10 08:57:56 -04:00
Šimon Brandner 7eaed1a3f8
Add option to stop sending read receipts (delabs MSC2285: private read receipts) (#8629)
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-08-05 17:33:57 +02:00
Šimon Brandner 6a8dd23d29
Add support for `EventTarget` to `useEventEmitter()` (#9060) 2022-07-29 11:32:03 +02:00
Michael Weimann fa1bff67cf
Wire local room logic (#9078)
* Wire local room logic

* Migrate to testling-lib; update test descriptions
2022-07-20 09:26:25 +02:00
Michael Weimann 742b21ca46
Extract ValidatedServerConfig (#9054) 2022-07-14 15:03:34 +02:00
Michael Weimann 3be20cf434
Use doMaybeLocalRoomAction (#9038)
* Use doMaybeLocalRoomAction

* Revert unnecessary changes
2022-07-13 07:56:36 +02:00
Michael Telatynski d81e2cea14
Remove unused sessionStorage layer (#8834)
* Remove unused sessionStorage layer

* Update global.d.ts

* Fix tests
2022-06-14 21:29:24 +01:00
Robin 53340db5e9
Update the live timeline when the JS SDK resets it (#8806) 2022-06-10 08:59:07 -04:00
Johannes Marbach abd39c61b1
Add support for MD / HTML in room topics (#8215)
* Add support for MD / HTML in room topics

Setting MD / HTML supported:
- /topic command
- Room settings overlay
- Space settings overlay

Display of MD / HTML supported:
- /topic command
- Room header
- Space home

Based on extensible events as defined in [MSC1767]

Fixes: vector-im/element-web#5180
Signed-off-by: Johannes Marbach <johannesm@element.io>

[MSC1767]: matrix-org/matrix-spec-proposals#1767

* Fix build error

* Add comment to explain origin of styles

Co-authored-by: Travis Ralston <travpc@gmail.com>

* Empty commit to retrigger build

* Fix import grouping

* Fix useTopic test

* Add tests for HtmlUtils

* Add slash command test

* Add further serialize test

* Fix ternary formatting

Co-authored-by: Travis Ralston <travpc@gmail.com>

* Add blank line

Co-authored-by: Travis Ralston <travpc@gmail.com>

* Properly mock SettingsStore access

* Remove trailing space

* Assert on HTML content and add test for plain text in HTML parameter

* Appease the linter

* Fix JSDoc comment

* Fix toEqual call formatting

* Repurpose test for literal HTML case

* Empty commit to fix CI

Co-authored-by: Travis Ralston <travpc@gmail.com>
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-06-07 14:20:32 -06:00
Robin ceda77d7dc
Proactively fix stuck devices in video rooms (#8587)
* Proactively fix stuck devices in video rooms

* Fix tests

* Explain why we're disabling the lint rule

* Apply code review suggestions

* Back VideoChannelStore's flags by SettingsStore instead of localStorage
2022-05-16 16:54:08 -04:00
Kerry 2c19d286ed
Eslint - require copyright header rule (#8514)
* bump eslint plugin to 0.5.2

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add rule

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add missing copyright headers

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix comment order

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-06 09:09:28 +00:00
Michael Telatynski f29ef04751
Fix race conditions around threads (#8448) 2022-05-03 14:25:08 +01:00
Robin c83ad1faa7
Add local echo of connected devices in video rooms (#8368) 2022-04-21 07:41:38 -04:00
Michael Telatynski 8cd715c6a3
Prevent soft crash around room list header context menu when space changes (#8289) 2022-04-12 14:23:04 +00:00
Robin 5fbb25c707
Make Jitsi widgets in video rooms immutable (#8244)
* Make Jitsi widgets in video rooms immutable

* Test video room creation
2022-04-07 07:34:07 -04:00
Robin 371ccd7858
Don't use m.call for Jitsi video rooms (#8223) 2022-04-04 10:29:40 -04:00
Robin 8baf06c3ff
Show voice room participants when not connected (#8136)
* Add utility for getting connected voice participants

* Allow voice room members to send connected device state

* Update connected devices when connecting/disconnecting voice

* Show voice room participants in room tile when not connected

* Update voice room tests

* Add null types and guards
2022-03-28 14:12:09 +01:00
Robin 1e060fed84
Don't form continuations from thread roots (#8166)
* Don't form continuations from thread roots

* Only apply the continuation break in the main timeline
2022-03-26 18:06:25 -04:00
Travis Ralston fce36ec826
Delete groups (legacy communities system) (#8027)
* Remove deprecated feature_communities_v2_prototypes

* Update _components

* i18n

* delint

* Cut out a bit more dead code

* Carve into legacy components

* Carve into mostly the room list code

* Carve into instances of "groupId"

* Carve out more of what comes up with "groups"

* Carve out some settings

* ignore related groups state

* Remove instances of spacesEnabled

* Fix some obvious issues

* Remove now-unused css

* Fix variable naming for legacy components

* Update i18n

* Misc cleanup from manual review

* Update snapshot for changed flag

* Appease linters

* rethemedex

* Remove now-unused AddressPickerDialog

* Make ConfirmUserActionDialog's member a required prop

* Remove useless override from RightPanelStore

* Remove extraneous CSS

* Update i18n

* Demo: "Communities are now Spaces" landing page

* Restore linkify for group IDs

* Demo: Dialog on click for communities->spaces notice

* i18n for demos

* i18n post-merge

* Update copy

* Appease the linter

* Post-merge cleanup

* Re-add spaces_learn_more_url to the new SdkConfig place

* Round 1 of post-merge fixes

* i18n

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-03-22 23:07:37 +00:00
Robin cfabcdda35
Voice rooms prototype (#8084)
* Add voice room labs flag

Signed-off-by: Robin Townsend <robin@robin.town>

* Add more widget actions for interacting with Jitsi

Signed-off-by: Robin Townsend <robin@robin.town>

* Factor out a more generic Jitsi creation utility

Signed-off-by: Robin Townsend <robin@robin.town>

* Add utilities for managing voice channels

Signed-off-by: Robin Townsend <robin@robin.town>

* Enable creation of voice rooms

Signed-off-by: Robin Townsend <robin@robin.town>

* Force a maximized view of voice channel widgets

Signed-off-by: Robin Townsend <robin@robin.town>

* Add voice channel store

Signed-off-by: Robin Townsend <robin@robin.town>

* Factor out a more generic FacePile

Signed-off-by: Robin Townsend <robin@robin.town>

* Implement room tile changes for voice rooms

Signed-off-by: Robin Townsend <robin@robin.town>

* Add interactive radio component to the left panel

Signed-off-by: Robin Townsend <robin@robin.town>

* Test voice rooms

Signed-off-by: Robin Townsend <robin@robin.town>

* Update name of call room type

Signed-off-by: Robin Townsend <robin@robin.town>

* Clarify that voice rooms are under development

Signed-off-by: Robin Townsend <robin@robin.town>

* Use readonly

Signed-off-by: Robin Townsend <robin@robin.town>

* Move acks to the end of handlers

Signed-off-by: Robin Townsend <robin@robin.town>

* Add comment about avatar URLs coming from Jitsi

Signed-off-by: Robin Townsend <robin@robin.town>

* Don't use unicode ellipses

for translation reasons?

Signed-off-by: Robin Townsend <robin@robin.town>

* Fix tests

Signed-off-by: Robin Townsend <robin@robin.town>

* Fix tests, again

Signed-off-by: Robin Townsend <robin@robin.town>

* Remove unnecessary export

Signed-off-by: Robin Townsend <robin@robin.town>

* Ack Jitsi events when we wait for them

Signed-off-by: Robin Townsend <robin@robin.town>
2022-03-22 16:14:11 -06:00
Kerry 026ca1ab64
Fix tsc issues in right_panel and room component tests (#8078)
* fix ts issues in SendMessageComposer-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove empty file

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix tsc issues in MessageComposerbUttons-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix the rest

Signed-off-by: Kerry Archibald <kerrya@element.io>

* bad autoformatter

Signed-off-by: Kerry Archibald <kerrya@element.io>

* tsc fixes for test/components/views/right_panel

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-21 10:03:03 +01:00
Kerry df6c53ff41
include /test/stores in tsconfig (#8026)
* fix space store emits

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix spacestore-test imports

* fix export-test.tsx

Signed-off-by: Kerry Archibald <kerrya@element.io>

* include test/utils to tsconfig

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix types in SpaceStore-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix ts issues in rest of test/stores

Signed-off-by: Kerry Archibald <kerrya@element.io>

* include test/stores in tsconfig

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-11 17:03:33 +01:00