Commit Graph

841 Commits (2c612d5aa135f409de9dcec6f42bdfb283ceff87)

Author SHA1 Message Date
Kerry Archibald 18e59b2d98 add learn more to filtered sessions 2022-10-26 11:05:26 +02:00
Kerry 69642544ac
Device manager - add learn more popups to filtered sessions section (#9497)
* add learn more to filtered sessions

* fullstop

* update tests and i18n for fullstop

* remove unused switch

* whitespace

* use correct card type
2022-10-26 11:04:16 +02:00
Germain 306a2449e5
Show thread notification if thread timeline is closed (#9495)
* Show thread notification if thread timeline is closed

* Simplify isViewingEventTimeline statement

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix show desktop notifications

* Add RoomViewStore thread id assertions

* Add Notifier tests

* fix lint

* Remove it.only

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-25 16:53:31 +00:00
Florian Duros 50279c8870
Add basic plain text editor 2022-10-25 17:26:14 +02:00
Florian Duros b5ab1239ed
Merge branch 'develop' into feat/add-message-edition-wysiwyg-composer 2022-10-25 10:42:29 +02:00
Kerry d473b4ac4a
Device manager - confirm sign out of other sessions (PSG-921) (#9487)
* change testid attribute for dialog buttons to rtl friendly

* add confirm dialog for signing out sessions

* cleanup commented

* update cypress tets

* clear modals before test

* missing modal in jest tests on ci only
2022-10-25 10:39:48 +02:00
Florian Duros fda4dabf6d
Fix MessageComposer test 2022-10-24 15:03:18 +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 edecc451dd
Fix MessageCompoer-test 2022-10-24 14:41:11 +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 913af09e61
Convert some tests from Enzyme to RTL (#9483) 2022-10-24 09:06:20 +01:00
Germain 9eb4f8d723
Add thread notification with server assistance (MSC3773) (#9400)
Co-authored-by: Janne Mareike Koschinski <janne@kuschku.de>
2022-10-24 07:50:21 +01:00
Florian Duros 4d089dcc05
Merge remote-tracking branch 'origin/develop' into feat/add-message-edition-wysiwyg-composer 2022-10-21 10:15:46 +02:00
Germain be281fd735
Fix threads fallback incorrectly targets root event (#9229)
* Use RelationType enum instead of hardcoded value

* Fix threads replies fallback to target last reply

* Only unsubscribe from threads events if needed

* fix strict null check

* fix strict null checks

* strict null checks

* fix typing

* Unsubscribe listeners if new thread is `null`

Co-authored-by: Faye Duxovni <fayed@element.io>

* Update strict null checks

* Type HTMLElement as nullable

* Add thread fallback integration test

* lint fix

* Update snapshots

* Add test after changing thread

* Remove test comment

* update snapshot

* fix room context test utility

* Add ThreadListContextMenu test

* lint fix

* fix thread rendering

Co-authored-by: Faye Duxovni <fayed@element.io>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-20 12:48:25 +01:00
Michael Weimann 3c9ba3e69f
Replace Icon with webpack loaded SVG (#9464) 2022-10-20 09:04:14 +01:00
Kerry d5a4718d46
Test display of qr code login section (#9456)
* Support for login + E2EE set up with QR

* Whitespace

* Padding

* Refactor of fetch

* Whitespace

* CSS whitespace

* Add link to MSC3906

* Handle incorrect typing in MatrixClientPeg.get()

* Use unstable class name

* fix: use unstable class name

* Use default fetch client instead

* Update to revised function name

* Refactor device manager panel and make it work with new sessions manager

* Lint fix

* Add missing interstitials and update wording

* Linting

* i18n

* Lint

* Use sensible sdk config name for fallback server

* Improve error handling for QR code generation

* Refactor feature availability logic

* Hide device manager panel if no options available

* Put sign in with QR behind lab setting

* Reduce scope of PR to just showing code on existing device

* i18n updates

* Handle null features

* Testing for LoginWithQRSection

* Refactor to handle UIA

* Imports

* Reduce diff complexity

* Remove unnecessary change

* Remove unused styles

* Support UIA

* Tidy up

* i18n

* Remove additional unused parts of flow

* Add extra instruction when showing QR code

* Add getVersions to server mocks

* Use proper colours for theme support

* Test cases

* Lint

* Remove obsolete snapshot

* Don't override error if already set

* Remove unused var

* Update src/components/views/settings/devices/LoginWithQRSection.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update res/css/views/auth/_LoginWithQR.pcss

Co-authored-by: Kerry <kerrya@element.io>

* Use spacing variables

* Remove debug

* Style + docs

* preventDefault

* Names of tests

* Fixes for js-sdk refactor

* Update snapshots to match test names

* Refactor labs config to make deployment simpler

* i18n

* Unused imports

* Typo

* Stateless component

* Whitespace

* Use context not MatrixClientPeg

* Add missing context

* Type updates to match js-sdk

* Wrap click handlers in useCallback

* Update src/components/views/settings/DevicesPanel.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Wait for DOM update instead of timeout

* Add missing snapshot update from last commit

* Remove void keyword in favour of then() clauses

* test main paths in LoginWithQR

* test coverage for display of qr code section

* remove unused test props

Co-authored-by: Hugh Nimmo-Smith <hughns@matrix.org>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-10-19 15:11:42 +00:00
Florian Duros e77f333fb6
Merge remote-tracking branch 'origin/develop' into feat/add-message-edition-wysiwyg-composer 2022-10-19 16:34:22 +02:00
Michael Weimann bb0c175b7e
Display info dialogs if unable to start voice broadcasts (#9453) 2022-10-19 15:01:14 +02:00
Hugh Nimmo-Smith 3c3df11d32
Support for login + E2EE set up with QR (#9403)
* Support for login + E2EE set up with QR

* Whitespace

* Padding

* Refactor of fetch

* Whitespace

* CSS whitespace

* Add link to MSC3906

* Handle incorrect typing in MatrixClientPeg.get()

* Use unstable class name

* fix: use unstable class name

* Use default fetch client instead

* Update to revised function name

* Refactor device manager panel and make it work with new sessions manager

* Lint fix

* Add missing interstitials and update wording

* Linting

* i18n

* Lint

* Use sensible sdk config name for fallback server

* Improve error handling for QR code generation

* Refactor feature availability logic

* Hide device manager panel if no options available

* Put sign in with QR behind lab setting

* Reduce scope of PR to just showing code on existing device

* i18n updates

* Handle null features

* Testing for LoginWithQRSection

* Refactor to handle UIA

* Imports

* Reduce diff complexity

* Remove unnecessary change

* Remove unused styles

* Support UIA

* Tidy up

* i18n

* Remove additional unused parts of flow

* Add extra instruction when showing QR code

* Add getVersions to server mocks

* Use proper colours for theme support

* Test cases

* Lint

* Remove obsolete snapshot

* Don't override error if already set

* Remove unused var

* Update src/components/views/settings/devices/LoginWithQRSection.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update res/css/views/auth/_LoginWithQR.pcss

Co-authored-by: Kerry <kerrya@element.io>

* Use spacing variables

* Remove debug

* Style + docs

* preventDefault

* Names of tests

* Fixes for js-sdk refactor

* Update snapshots to match test names

* Refactor labs config to make deployment simpler

* i18n

* Unused imports

* Typo

* Stateless component

* Whitespace

* Use context not MatrixClientPeg

* Add missing context

* Type updates to match js-sdk

* Wrap click handlers in useCallback

* Update src/components/views/settings/DevicesPanel.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Wait for DOM update instead of timeout

* Add missing snapshot update from last commit

* Remove void keyword in favour of then() clauses

* test main paths in LoginWithQR

Co-authored-by: Travis Ralston <travisr@matrix.org>
Co-authored-by: Kerry <kerrya@element.io>
2022-10-19 13:31:20 +01:00
kegsay e946674df3
Store refactor: use non-global stores in components (#9293)
* Add Stores and StoresContext and use it in MatrixChat and RoomView

Added a new kind of class:
- Add God object `Stores` which will hold refs to all known stores and the `MatrixClient`. This object is NOT a singleton.
- Add `StoresContext` to hold onto a ref of `Stores` for use inside components.

`StoresContext` is created via:
- Create `Stores` in `MatrixChat`, assigning the `MatrixClient` when we have one set. Currently sets the RVS to `RoomViewStore.instance`.
- Wrap `MatrixChat`s `render()` function in a `StoresContext.Provider` so it can be used anywhere.

`StoresContext` is currently only used in `RoomView` via the following changes:
- Remove the HOC, which redundantly set `mxClient` as a prop. We don't need this as `RoomView` was using the client from `this.context`.
- Change the type of context accepted from `MatrixClientContext` to `StoresContext`.
- Modify alllll the places where `this.context` is used to interact with the client and suffix `.client`.
- Modify places where we use `RoomViewStore.instance` and replace them with `this.context.roomViewStore`.

This makes `RoomView` use a non-global instance of RVS.

* Linting

* SDKContext and make client an optional constructor arg

* Move SDKContext to /src/contexts

* Inject all RVS deps

* Linting

* Remove reset calls; deep copy the INITIAL_STATE to avoid test pollution

* DI singletons used in RoomView; DI them in RoomView-test too

* Initial RoomViewStore.instance after all files are imported to avoid cyclical deps

* Lazily init stores to allow for circular dependencies

Rather than stores accepting a list of other stores in their constructors,
which doesn't work when A needs B and B needs A, make new-style stores simply
accept Stores. When a store needs another store, they access it via `Stores`
which then lazily constructs that store if it needs it. This breaks the
circular dependency at constructor time, without needing to introduce
wiring diagrams or any complex DI framework.

* Delete RoomViewStore.instance

Replaced with Stores.instance.roomViewStore

* Linting

* Move OverridableStores to test/TestStores

* Rejig how eager stores get made; don't automatically do it else tests break

* Linting

* Linting and review comments

* Fix new code to use Stores.instance

* s/Stores/SdkContextClass/g

* Update docs

* Remove unused imports

* Update src/stores/RoomViewStore.tsx

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove empty c'tor to make sonar happy

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-19 13:07:03 +01:00
Florian Duros 460f60e99d
First attempt to make the edition works in the WysiwygComposer 2022-10-19 12:45:51 +02:00
Michael Weimann 84f2974b57
Always show voice broadcasts tile (#9444) 2022-10-19 12:04:15 +02:00
Andy Balaam e0ab0ac5c9
Allow pressing Enter to send messages in new composer (#9451)
* Allow pressing Enter to send messages in new composer

* Cypress tests for composer send behaviour
2022-10-19 03:07:21 +00:00
Kerry b04991a962
Device manager - put client/browser device metadata in correct section (#9447) 2022-10-18 13:00:01 +00:00
Timo 372720ec8b
Room call banner (#9378)
Signed-off-by: Timo K <timok@element.io>
Co-authored-by: Timo K <timok@element.io>
Co-authored-by: Robin <robin@robin.town>
2022-10-17 21:36:17 +02:00
Michael Telatynski 13db1b17be
Prevent useContextMenu isOpen from being true if the button ref goes away (#9418) 2022-10-17 17:42:04 +01:00
Kerry 877c95df8f
device manager - add spinners while devices are signing out (#9433) 2022-10-17 17:14:49 +02:00
Andy Balaam e38c9e036c
Automatically focus the WYSIWYG composer when you enter a room (#9412)
Automatically focus the WYSIWYG composer when you enter a room
2022-10-17 11:48:47 +00:00
Kerry 2d9f828810
Device manager - silence call ringers when local notifications are silenced (#9420)
* silence call ringers when local notifications are silenced

* more coverage for silencing

* explain disabled silence button

* lint

* increase wait for modal

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-17 09:16:04 +00:00
Florian Duros 2146c91343
Merge branch 'develop' into feat/reply-support-wysiwyg-composer 2022-10-14 17:21:46 +02: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
Florian Duros d1a98b632e
Add test to attachRelation 2022-10-14 16:42:45 +02:00
Florian Duros e8d0fb0ab0
Fix linting in test 2022-10-14 16:03:45 +02:00
Florian Duros 4ba3f99489
Add reply support to WysiwygComposer 2022-10-14 15:52:05 +02:00
Kerry 17fce6ccb2
Device manager - device tile main click target (#9409)
* change device tile click to toggle details instead of selection

* lint

* test current device section click

* stuck cypress
2022-10-14 12:43:20 +01:00
Florian Duros c0bf45fddc
Rename wysiwyg prop into composer 2022-10-14 10:56:34 +02:00
Florian Duros a557c7f583
Merge branch 'develop' into feat/add-formating-buttons-to-wysiwyg 2022-10-13 18:55:03 +02:00
Florian Duros 53fce572aa
Add FormattingButtons test 2022-10-13 18:53:20 +02:00
Florian Duros ac8397aa0f
Fix test 2022-10-13 16:46:47 +02:00
Germain 4c8b4116eb
Migrate KeyboardShortcut tests from Enzyme to RTL (#9405)
* Migrate tests from Enzyme to RTL

* Fix languageHandler tests

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-13 14:32:45 +01:00
Kerry 776ffa4764
Device manager - current session context menu (#9386)
* add destructive option and close on interaction options

* add kebab context menu wrapper

* use kebab context menu in current device section

* use named export

* lint

* sessionman tests
2022-10-13 09:07:34 +02:00
Michael Telatynski 8b54be6f48
Move from `browser-request` to `fetch` (#9345) 2022-10-12 18:59:07 +01:00
Michael Weimann cd806427c8
Add MessageEvent voice broadcast setting watch (#9399) 2022-10-12 11:34:41 -06:00
Kerry 03182d03be
Device manager - add settings subsection heading component (#9387)
* add settings subsection heading component

* use named export

* newline
2022-10-11 20:12:02 +02:00
Kerry 87d3fbd996
Device manager - promote to beta (#9380)
* promote new session manager to beta

* hide old sessions section when new dm enabled

* use correct logic

* add new ViewUserDeviceSettings action

* replace device management ctas with viewUserDeviceSettings

* test SecurityUserSettingsTab

* more complete mocks

* more thorough mocks

* more mocks

* test LabsUserSettingsTab

* lint

* updated copy

* update snaps for new copy
2022-10-11 11:10:55 +02:00
Florian Duros 7ad39ba6c7
Merge branch 'develop' into feat/matrix-wysisyg-integration 2022-10-10 17:42:59 +02:00
Florian Duros f8ec4ec1ed
Disable wysiwyg at the end of the test 2022-10-10 17:42:15 +02:00
Florian Duros 6c7158197c
Add test in MessageComposer 2022-10-10 17:36:18 +02:00
Michael Telatynski 6b30a5e1c9
Migrate some enzyme tests to RTL (#9383) 2022-10-10 16:29:10 +01:00
Florian Duros ec1140e274
Fix type errors 2022-10-10 17:06:41 +02:00
Florian Duros 5bdac78fc7
Merge remote-tracking branch 'origin/develop' into feat/matrix-wysisyg-integration 2022-10-10 17:04:27 +02:00
Florian Duros 101fd629df
Add WysiwygComposer test 2022-10-10 16:50:36 +02:00
Florian Duros 667e8ef10f
Add tests to message.ts 2022-10-10 11:16:42 +02:00
Šimon Brandner bb71c86c8a
Add Element Call participant limit (#9358) 2022-10-07 20:16:35 +00:00
Šimon Brandner 26a74a193f
Add Element Call room settings (#9347)
Co-authored-by: Robin <robin@robin.town>
2022-10-07 18:10:17 +00: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
Kerry c9f5d57fa0
Device manager - render extended device information (#9360)
* record device client inforamtion events on app start

* matrix-client-information -> matrix_client_information

* fix types

* remove another unused export

* add docs link

* display device client information in device details

* update snapshots

* integration-ish test client information in metadata

* tests

* fix tests

* export helper

* DeviceClientInformation type

* Device manager - select all devices (#9330)

* add device selection that does nothing

* multi select and sign out of sessions

* test multiple selection

* fix type after rebase

* select all sessions

* rename type

* use ExtendedDevice type everywhere

* rename clientName to appName for less collision with UA parser

* fix bad find and replace

* rename ExtendedDeviceInfo to ExtendedDeviceAppInfo

* rename DeviceType comp to DeviceTypeIcon

* update tests for new required property deviceType

* add stubbed user agent parsing

* setup test cases

* detect device type correctly

* 80% working ua parser

* parse asera gents for device info

* combine clientName/Version into one field, remove debug from tests

* add new metadata to device details

* render device info from UA
2022-10-07 08:49:35 +00:00
Robin 06dbea6255
New group call experience: Room header and PiP designs (#9351)
* Update our cancel icon

The cancel icon we're using in the app has drifted out of sync with the ones used in our designs. We also had two identical-looking icons, so this consolidates them into one.

I've simultaneously updated our chevron icons, since in the case of the 'jump to unread' timeline button, it became clear that the weight of the new close icon did not match the thinner chevron.

* Don't squish bottom/top-aligned tooltips near the edge of the screen

* Close the timeline panel when returning to the fullscreen timeline view

* Add layout switching capabilities to ElementCall

* Bring the room header in line with the group call designs

* Bring the PiP header in line with the group call designs

* Fix lints

* Clarify tooltip CSS calculations

* Test PipView

* Expand RoomHeader test coverage

* Test PipView more
2022-10-07 02:27:28 +00:00
Kerry 5e18abe7f7
Device manager - device type icon (#9355)
* record device client inforamtion events on app start

* matrix-client-information -> matrix_client_information

* fix types

* remove another unused export

* add docs link

* display device client information in device details

* update snapshots

* integration-ish test client information in metadata

* tests

* fix tests

* export helper

* DeviceClientInformation type

* Device manager - select all devices (#9330)

* add device selection that does nothing

* multi select and sign out of sessions

* test multiple selection

* fix type after rebase

* select all sessions

* rename type

* use ExtendedDevice type everywhere

* rename clientName to appName for less collision with UA parser

* fix bad find and replace

* rename ExtendedDeviceInfo to ExtendedDeviceAppInfo

* rename DeviceType comp to DeviceTypeIcon

* update tests for new required property deviceType

* add stubbed user agent parsing

* add icons

* set device type icon

* device type icon tets

* update snapshots for device type icon changes

* desktop icon viewbox

* i18n
2022-10-06 10:34:11 +00:00
Kerry 8399b63e7a
fix threadsupport type issues in tests (#9359) 2022-10-06 08:35:06 +00:00
Kerry bd270b08df
Device manager - add foundation for extended device info (#9344)
* record device client inforamtion events on app start

* matrix-client-information -> matrix_client_information

* fix types

* remove another unused export

* add docs link

* display device client information in device details

* update snapshots

* integration-ish test client information in metadata

* tests

* fix tests

* export helper

* DeviceClientInformation type

* Device manager - select all devices (#9330)

* add device selection that does nothing

* multi select and sign out of sessions

* test multiple selection

* fix type after rebase

* select all sessions

* rename type

* use ExtendedDevice type everywhere

* rename clientName to appName for less collision with UA parser

* fix bad find and replace

* rename ExtendedDeviceInfo to ExtendedDeviceAppInfo

* rename DeviceType comp to DeviceTypeIcon

* update tests for new required property deviceType

* add stubbed user agent parsing
2022-10-05 11:41:01 +00:00
Kerry 16c3efead5
Device manager - display client information in device details (PSG-682) (#9315)
* record device client inforamtion events on app start

* matrix-client-information -> matrix_client_information

* fix types

* remove another unused export

* add docs link

* display device client information in device details

* update snapshots

* integration-ish test client information in metadata

* tests

* fix tests

* export helper

* DeviceClientInformation type
2022-10-04 13:12:23 +00:00
Kerry c59bbdf917
Device manager - select all devices (#9330)
* add device selection that does nothing

* multi select and sign out of sessions

* test multiple selection

* fix type after rebase

* select all sessions
2022-10-04 08:12:07 +00:00
Robin ff59f68a9f
New group call experience: Call tiles (#9332)
* Add call tiles

* Factor CallDuration out into a reusable component

* Correct the separator character in LiveContentSummary
2022-09-30 19:26:08 +00: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
Kerry 772df30212
Device manager - sign out of multiple sessions (#9325)
* add device selection that does nothing

* multi select and sign out of sessions

* test multiple selection

* fix type after rebase
2022-09-30 09:07:50 +02:00
Michael Weimann 7a33818bd7
Extract createVoiceMessageContent (#9322) 2022-09-29 13:06:49 -06:00
Germain 3e076c8246
Fixes to ensure account data values do not go stale (#9331)
* Fixes to ensure account data values do not go stale

* Remove unneeded cli.off

* fix test
2022-09-29 13:05:06 -06:00
Kerry 951cad98d3
Device manager - extract filtered device list header (#9323)
* extract filtered device list header

* stylelint
2022-09-29 09:22:00 +02:00
Germain c3bfb6e4a9
Display push toggle for web sessions (MSC3890) (#9327) 2022-09-28 18:18:10 +01:00
Germain e15ef9f3de
Add device notifications enabled switch (#9324) 2022-09-28 18:13:09 +01: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
Robin ace6591f43
New group call experience: Starting and ending calls (#9318)
* Create m.room calls in video rooms, and m.prompt calls otherwise

* Terminate a call when the last person leaves

* Hook up the room header button to a unified CallView component

* Write more tests
2022-09-27 07:54:51 -04:00
Michael Weimann 8e719d57a2
Add voice broadcast recording body (#9316)
* Add voice broadcast recording body

* Change icon element; update css variables

* Update Icon-test snapshots
2022-09-26 15:29:38 +02:00
Robin d077ea1990
New group call experience: Room header call buttons (#9311)
* Make useEventEmitterState more efficient

By not invoking the initializing function on every render

* Make useWidgets more efficient

By not calling WidgetStore on every render

* Add new group call experience Labs flag

* Add viewingCall field to RoomViewStore state

Currently has no effect, but in the future this will signal to RoomView to show the call or call lobby.

* Add element_call.use_exclusively config flag

As documented in element-web, this will tell the app to use Element Call exclusively for calls, disabling Jitsi and legacy 1:1 calls.

* Make placeCall return a promise

So that the UI can know when placeCall completes

* Update start call buttons to new group call designs

Since RoomView doesn't do anything with viewingCall yet, these buttons won't have any effect when starting native group calls, but the logic is at least all there and ready to be hooked up.

* Allow calls to be detected if the new group call experience is enabled

* Test the RoomHeader changes

* Iterate code
2022-09-25 10:57:25 -04:00
Faye Duxovni 12e3ba8e5a
Make device ID copyable in device list (#9297) 2022-09-23 09:21:04 -04: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
Germain 71cf9bf932
Read receipts for threads (#9239)
* Use EventType enum instead of hardcoded value

* Enable read receipts on thread timelines

* Strict null checks

* Strict null checks

* fix import group

* strict checks

* strict checks

* null check

* fix tests
2022-09-21 10:13:33 +01: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
Michael Weimann 0cc4f4e1bc
Add voice broadcast permissions (#9284)
* Add Voice Broadcast labs setting and composer button

* Implement strict typing

* Extend MessageComposer-test

* Extend tests

* Revert some strict type fixex

* Implement voice broadcast permissions

* Update variable casing
2022-09-19 06:42:29 +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
Michael Weimann db5716b776
Fix SessionManagerTab-test (#9291) 2022-09-16 12:00:01 +00:00
Michael Weimann a0c35d088a
Add Voice Broadcast labs setting and composer button (#9279)
* Add Voice Broadcast labs setting and composer button

* Implement strict typing

* Extend MessageComposer-test

* Extend tests

* Revert some strict type fixex

* Convert FEATURES to enum; change case

* Use fake timers in MessageComposer-test
2022-09-16 09:10:33 +00:00
Michael Telatynski 4a23630e06
Fix soft crash around inviting invalid MXIDs in start DM on first message flow (#9281)
* Fix soft crash around inviting invalid MXIDs

* Make ts --strict happier

* Prevent suggesting invalid MXIDs

* Add tests

* Fix coverage

* Fix coverage

* Make tsc --strict happier

* Fix test

* Add tests
2022-09-16 09:03:17 +01:00
Kerry 4fec436883
Device manager - rename session (PSG-528) (#9282)
* split heading into component

* switch between editing and view

* style file

* basic tests

* style device rename component

* add loading state

* kind of handle missing current device in drilled props

* use local loading state, add basic error message

* integration-ish test rename

* tidy

* fussy import ordering

* strict errors
2022-09-15 16:34:50 +02:00
Kerry 8d9e5237fd
add generic caption typography component (#9283) 2022-09-15 11:53:21 +02:00
Kerry 10bb10539b
Device manager - logout of other session (PSG-744) (#9280)
* add sign out of current device section in device details

* lint

* add sign out cta for other sessions

* test other device sign out

* add pending sign out loader

* tidy

* fix strict error

* use gap instead of nbsp

* use more specific assertions in tests, tweak formatting

* tweak test
2022-09-14 16:18:32 +00:00
Kerry f20d86b7b8
Device manager - logout current session (PSG-743) (#9275)
* trigger verification of other devices

* add sign out of current device section in device details

* fix classname

* lint

* strict type fix

* fix test

* improve mocked VerifReq
2022-09-14 14:37:36 +02:00
Michael Weimann 41960b164b
Fix unknonw div props in context menu (#9277) 2022-09-14 14:05:38 +02:00
Kerry 4623d84dd0
Device manager - verify other devices (PSG-724) (#9274)
* trigger verification of other devices

* tests

* fix strict errors

* add types
2022-09-14 10:40:26 +00:00
Kerry d69393a3aa
Device manager - filter out nulled metadatas in device tile properly (PSG-703) (#9251)
* filter out nulled metadatas in device tile properly

* remove log
2022-09-12 11:06:12 +00:00
Kerry 61904778f5
Device manager - add verify current session button (PSG-527) (#9252)
* add verify current session button

* i18n

* strict type issues
2022-09-08 17:35:53 +02:00
Michael Weimann 9f7165ed63
Use room name as room intro (#9231)
* Use roon name for room intro

* Fix types

* Revert caption var change

* Fix type issue
2022-09-06 09:54:53 +02:00
Kerry 85f92308f9
Device manager - hide unverified security recommendation when only current session is unverified (PSG-639) (#9228)
* scroll to filtered list from security recommendations

* test sessionmanager scroll to

* stable snapshot

* fix strict errors

* prtidy

* dont show security rec section when only curent session is unverified
2022-09-05 09:10:12 +00:00
Kerry 54a66bd242
Device manager - scroll to filtered list from security recommendations (PSG-640) (#9227)
* scroll to filtered list from security recommendations

* test sessionmanager scroll to

* stable snapshot

* fix strict errors

* prtidy

* use smooth scrolling
2022-08-31 14:34:22 +02: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
Kerry 50f6986f6c
Device manager - updated dropdown style in filtered device list (PSG-689) (#9226)
* add FilterDropdown wrapper on Dropdown for filter styles

* test and fix strict errors

* fix comment
2022-08-30 19:11:33 +02:00
Kerry 825a0af4a9
Device manager - device type and verification icons on device tile (PSG-637) (#9197)
* add unknown device icon

* add device type and verification icon component

* test

* stylelint

* fix securitycard spacing

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-08-29 10:48:00 +00:00