Commit Graph

547 Commits (9a3ae2398e92af0a68d777d7b4282cc1d4684b6f)

Author SHA1 Message Date
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
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
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
Michael Telatynski 9b99c967f4
Fix progress bar regression throughout the app (#9219)
* Fix useSmoothAnimation enablement not working properly by getting rid of it

Passing duration=0 is more logical and less superfluous

* Refactor UploadBar to handle state more correctly

* Change ProgressBar to new useSmoothAnimation signature and default animated to true for consistency

* Add type guard

* Make types stricter

* Write tests for the ProgressBar component

* Make the new test conform to tsc --strict

* Update UploadBar.tsx

* Update UploadBar.tsx

* Update UploadBar.tsx
2022-08-25 16:39:00 +01:00
Šimon Brandner 3eecd68175
Fix context menu being opened when clicking message action bar buttons (#9200) 2022-08-18 09:18:18 +02:00
Michael Telatynski 27a7263965
Attempt to fix `Failed to execute 'removeChild' on 'Node'` (#9196)
* Switch tooltips to use React Portals

* Remove redundant React key to simplify reconciliation

* Fix cleanup and it.each test

* Update snapshots due to style order difference
2022-08-17 13:35:33 +00:00
Kerry e5fedfcd74
Device manager - expandable session details in device list (PSG-644) (#9188)
* add expandable device details to session list

* test device expansion in filtered list

* test expanded device id management from sessionmanager tab

* i18n

* update snapshot

* update snapshots

* use css instead of br
2022-08-17 11:58:34 +02:00
Kerry 6f2c761fb4
Device manager - device list filtering (PSG-648) (#9181)
* add device filtering

* improve dropdown styling

* test device filtering

* update type imports

* fix types

* security card margin

* more specific type for onFilterOptionChange
2022-08-16 14:05:10 +00:00
Kerry 9bf77963ee
Device manager - add verification details to session details (PSG-644) (#9187)
* extract security card for session verification to shared comp

* add card to device details

* tidy

* fix section spacing

* update snapshots
2022-08-16 11:45:09 +00:00
Kerry 05e179f856
make beacon events more specific (#9186) 2022-08-16 10:23:25 +02:00
Kerry 0dffc582e7
Device manager - current session expandable details (PSG-644) (#9185)
* split current device section into component

* add dropdown button for currentsession device details

* test currentdevicesection

* remove unnecc beforeEach

* update type imports

* i18n and lint
2022-08-15 17:30:18 +02:00
Kerry 0c5ad457f0
Device manager - security recommendations section (PSG-639) (#9179)
* display inactive status on device tile

* unify DeviceSecurityVariation type, add correct icon to inactive ui

* move types into type file

* move DeviceSecurityVariation into types

* add security recommendations section

* add view all stubbed buttons

* undeo debug

* test security recs

* remove debug

* use css for card spacing
2022-08-15 08:40:26 -04:00
Kerry 4a5ed2f899
Device manager - label devices as inactive (PSG-638) (#9175)
* filter devices by security recommendation

* display inactive status on device tile

* unify DeviceSecurityVariation type, add correct icon to inactive ui

* tidy

* avoid dead code warning
2022-08-11 21:39:38 +00:00
Michael Weimann 964d538db9
Hide sticker picker for local rooms (#9174)
* Disable stickers for local rooms

* Use prop
2022-08-11 17:51:24 +02:00
Kerry 7b52145461
Device manager - device security recommendation card (PSG-637) (#9158)
* add security card and style

* deprecate warning and verified svgs that use hard coded color

* style icons, test

* i18n

* stylelint

* redo lost lint fixes

* fix svg ref

* actually fix svg

* fix stupid copy pasting

* use rgba for e2e light variations

* add security card and style

* deprecate warning and verified svgs that use hard coded color

* style icons, test

* i18n

* stylelint

* fix svg ref

* actually fix svg

* fix stupid copy pasting

* use rgba for e2e light variations

* use device security card in current session section

* lint

* update snapshot test after dev merge
2022-08-11 10:39:14 +00:00