Commit graph

1552 commits

Author SHA1 Message Date
Germain
714ba6db94
Do not create account data event for guests (#9407)
* Do not create account data event for guests

* fix test
2022-10-13 13:15:34 +01:00
Michael Weimann
7a1c47a23e
Extract useVoiceBroadcastRecording hook (#9406)
* Extract useVoiceBroadcastRecording hook

* Trigger CI
2022-10-13 13:02:53 +01:00
Michael Telatynski
1800cb8c71
Remove unused packages and fix invariant violation on AsyncStore onNotReady (#9404)
* Remove traces of browser-request & mocha

* Remove unused matrix-react-test-utils

* Fix dispatcher invariant violation

* Add null-guard

* Improve types

* Fix null-guard

* Fix issue with authed users going directly to /#/login
2022-10-13 09:22:32 +01:00
Kerry
1e9872662a
Device manager - test coverage for Notifier (#9392)
* use correct default for notification silencing

* test notifications with no local notifications setting event

* test notifier from cli event to trigger

* lint
2022-10-13 09:07:48 +02: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
Michael Weimann
b871456681
Hide voice broadcast chunks (#9397) 2022-10-12 17:58:57 +02:00
Dominik Henneke
7ddc0b78b3
Correct the dir parameter of MSC3715 (#9391) 2022-10-12 16:56:52 +02:00
Michael Weimann
533eda2273
Extract voice broadcast header (#9393) 2022-10-12 14:00:37 +00:00
Michael Weimann
19bc3f1d9a
Include device_id in voice broadcast info events (#9394) 2022-10-12 13:24:30 +02:00
Michael Weimann
bac6e12946
Implement Voice Broadcast recording (#9307)
* Implement VoiceBroadcastRecording

* Implement PR feedback

* Add voice broadcast recording stores

* Refactor startNewVoiceBroadcastRecording

* Refactor VoiceBroadcastRecordingsStore to VoiceBroadcastRecording

* Rename VoiceBroadcastRecording to VoiceBroadcastRecorder

* Return remaining chunk on stop

* Extract createVoiceMessageContent

* Implement recording

* Replace dev value with config

* Fix clientInformation-test

* Refactor VoiceBroadcastRecording

* Fix VoiceBroadcastRecording types

* Re-order getter

* Mark voice_broadcast config as optional

* Merge voice-broadcast modules

* Remove underscore props

* Add Optional types

* Add return types everywhere

* Remove test casts

* Add magic comments

* Trigger CI

* Switch VoiceBroadcastRecorder to TypedEventEmitter

* Trigger CI

* Add voice broadcast chunk event content

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-10-11 22:31:28 +00: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
9e055ee99d
use correct default for notification silencing (#9388) 2022-10-11 17:11:11 +01: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
203f75f755
Merge branch 'develop' into feat/matrix-wysisyg-integration 2022-10-11 10:47:01 +02:00
Kerry
4a98e26c4a
Device manager - UA parsing tweaks (#9382)
* parseUA - use full client version

* dont check for custom element model and os when device type is unknown

* ignore OS version in browser based sessions
2022-10-11 09:29:19 +02:00
Kerry
66a9636ec5
Device manager - remove client information events when disabling setting (#9384)
* remove client information events when disabling setting

* tweak naming

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-10 19:00:46 +00: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
Kerry
c795ada78c
Device manager - eagerly create m.local_notification_settings events (#9353)
* eagerly save m.local_notification_settings events

* unskip test

* create local notification settings after first non-cached sync
2022-10-10 15:18:38 +01: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
4ff9681408
Close incoming Element call toast when viewing the call lobby (#9375) 2022-10-07 19:31:22 +02: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
Florian Duros
a11c1e17a5
Merge pull request #9320 from matrix-org/florianduros/fix-white-black-theme-switch
Fix dark and white theme switch in Chrome
2022-10-07 09:40:12 +02: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
Oliver Sand
9a3ae2398e
Pass language to Jitsi Widget (#9346)
Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>

Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>
2022-10-06 13:19:01 -06:00
Florian Duros
f85685a0fb
Merge branch 'develop' into florianduros/fix-white-black-theme-switch 2022-10-06 17:46:58 +02:00
Šimon Brandner
6356a8c056
Add notifications and toasts for Element Call calls (#9337) 2022-10-06 14:27:12 +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
Florian Duros
ba783b8441
Merge remote-tracking branch 'origin/develop' into florianduros/fix-white-black-theme-switch 2022-10-06 10:08:02 +02:00
Kerry
3e4f3152bc
Device manager - parse user agent for device information (#9352)
* 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
2022-10-06 10:06:29 +02: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
Dominik Henneke
99488b84ec
Remove unspecced original_event field from the readEventRelations response (#9349)
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
2022-10-04 17:54:26 +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
Kerry
0ded5e0505
Device manager - record device client information on app start (PSG-633) (#9314)
* record device client inforamtion events on app start

* matrix-client-information -> matrix_client_information

* fix types

* remove another unused export

* add docs link

* add opt in setting for recording device information
2022-10-04 09:53:23 +02: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
Germain
c2e2f406af
Fixes silenced notification preventing notification prompt to be shown (#9336) 2022-09-30 16:11:04 +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
Germain
a49603b9b8
Inhibit local notifications when local notifications are silenced (#9328) 2022-09-29 14:23:02 +00: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
Florian Duros
b2c2ef2bd6
Test querySelectorAll call 2022-09-28 15:25:32 +02:00
Florian Duros
fe14847bb9
Merge branch 'develop' into florianduros/fix-white-black-theme-switch 2022-09-28 13:05:40 +02:00
Florian Duros
ad9cbe9399
Add unit tests 2022-09-28 12:46:41 +02: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
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
Johannes Marbach
88c12cdaa5
Use display name instead of user ID when rendering power events (PSC-82) (#9295)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-09-22 08:42:07 +01:00
Michael Weimann
516b4f0ff8
Add array concat util (#9306) 2022-09-21 20:06:05 +02: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
Michael Telatynski
fa2ec7f6c9
Fix soft crash around unknown room pills (#9301)
* Fix soft crash around unknown room pills

* Add tests

* Fix types
2022-09-20 17:00:31 +00: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
kegsay
a3133fa907
bugfix: fix in-reply-to previews not disappearing when swapping rooms (#9278)
* bugfix: fix in-reply-to previews not disappearing when swapping rooms

This was caused by the fix for another issue:
  - https://github.com/vector-im/element-web/issues/21462

Both bugs are now fixed with cypress regression tests.

* Linting

* Ensure the reply-to reappears when you click back

* Add jest test for replyTo in RVS

* Linting
2022-09-15 12:09:16 +00: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
Dominik Henneke
0c22b15bba
Implement MSC3869: Read event relations with the Widget API (#9210)
* Add an action to read relations according to MSC3869

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

* Apply review comments

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

* Fix test

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

* Update matrix-widget-api to 1.1.1

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
2022-09-14 10:18:51 -04: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
kegsay
a9f04514fb
bugfix: fix a sliding sync bug which could cause rooms to loop (#9268)
* bugfix: fix a sliding sync bug which could cause rooms to loop

With a Jest regression test.

* Linting
2022-09-12 10:55:46 +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 Telatynski
52fc8ff255
Fix html export not including images (#9260)
* Fix html export not including images

* Respect showPlaceholder

* Add tests
2022-09-08 10:00:58 +00:00
kegsay
a215027c6b
Implement MSC3575: Sliding Sync (#8328)
* Add labs flag for sliding sync; add sliding_sync_proxy_url to config.json

* Disable the labs toggle if sliding_sync_proxy_url is not set

* Do validation checks on the sliding sync proxy URL before enabling it in Labs

* Enable sliding sync and add SlidingSyncManager

* Get room subscriptions working

* Hijack renderSublists in sliding sync mode

* Add support for sorting alphabetically/recency and room name filters

* Filter out tombstoned rooms; start adding show more logic

list ranges update but the UI doesn't

* update the UI when the list is updated

* bugfix: make sure the list sorts numerically

* Get invites transitioning correctly

* Force enable sliding sync and labs for now

* Linting

* Disable spotlight search

* Initial cypress plugins for Sliding Sync Proxy

* Use --rm when running Synapse in Docker for Cypress tests

* Update src/MatrixClientPeg.ts

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

* Update src/components/views/rooms/RoomSublist.tsx

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

* Update src/settings/controllers/SlidingSyncController.ts

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

* Update src/components/views/rooms/RoomSublist.tsx

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

* WIP add room searching to spotlight search

* Only read sliding sync results when there is a result, else use the local cache

* Use feature_sliding_sync not slidingSync

* Some review comments

* More review comments

* Use RoomViewStore to set room subscriptions

* Comment why any

* Update src/components/views/rooms/RoomSublist.tsx

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

* Fix cypress docker abstraction

* Iterate sliding sync proxy support

* Stash mostly functional test

* Update sliding sync proxy image

* i18n

* Add support for spaces; use list ID -> index mappings

- Mappings are more reusable and easier to understand than
  racing for index positions.
- Register for all spaces immediately on startup.

* When the active space is updated, update the list registration

* Set spaces filter in the correct place

* Skeleton placeholder whilst loading the space

* Filter out spaces from the room list

* Use the new txn_id promises

* Ensure we actually resolve list registrations

* Fix matrix-org/sliding-sync#30: don't show tombstoned search results

* Remove unused imports

* Add SYNCV3_SECRET to proxy to ensure it starts up; correct aliases for SS test

* Add another basic sliding sync e2e test

* Unbreak netlify

* Add more logging for debugging duplicate rooms

* If sliding sync is enabled, always use the rooms result even if it's empty

* Drop-in copy of RoomListStore for sliding sync

* Remove conditionals from RoomListStore - we have SlidingRoomListStore now

* WIP SlidingRoomListStore

* Add most sliding sync logic to SlidingRoomListStore

Still lots of logic in RoomSublist. Broken things:
 - Join count is wrong completely.
 - No skeleton placeholder when switching spaces.

* Migrate joined count to SS RLS

* Reinstate the skeleton UI when the list is loading

* linting

* Add support for sticky rooms based on the currently active room

* Add a bunch of passing SS E2E tests; some WIP

* Unbreak build from git merge

* Suppress unread indicators in sliding sync mode

* Add regression test for https://github.com/matrix-org/sliding-sync/issues/28

* Add invite test flows; show the invite list

The refactor to SS RLS removed the invite list entirely.

* Remove show more click as it wasn't the bug

* Linting and i18n

* only enable SS by default on netlify

* Jest fixes; merge conflict fixes; remove debug logging; use right sort enum values

* Actually fix jest tests

* Add support for favourites and low priority

* Bump sliding sync version

* Update sliding sync labs to be user configurable

* delint

* To disable SS or change proxy URL the user has to log out

* Review comments

* Linting

* Apply suggestions from code review

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

* Update src/stores/room-list/SlidingRoomListStore.ts

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

* Review comments

* Add issue link for TODO markers

* Linting

* Apply suggestions from code review

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

* More review comments

* More review comments

* stricter types

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-09-07 15:42:39 +00: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
Travis Ralston
e0d5b11bab
Add a larger buffer to useLatestResult's test (#9178)
Should fix https://github.com/vector-im/element-web/issues/23014

With only a 5ms buffer previously it was possible for Jest to get overwhelmed with the 1500 tests it needs to run. We raise this to 20ms to give extra time to settle.

Even with the high sleep times this won't be the longest running test, so should be fine.

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-08-25 14:49:39 -06: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