Commit graph

67 commits

Author SHA1 Message Date
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
Michael Weimann
27ba1e57e6
Update matrix-org/react (enzyme deprecation) (#9116) 2022-08-02 15:10:43 +02:00
Kerry
05cc5f62dd
test UserSettingsDialog (#9118) 2022-08-01 06:47:13 +00: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
Kerry
dc6ceb1d1c
Live location share - focus on user location on list item click (PSG-609) (#9051)
* extract preventDefaultWrapper into utils

* add click handling to beacon list item

* add click handling to dialog sidebar

* focus in on beacons when clicked in list

* stylelint

* fussy import ordering

* test beacon focusing in beaocnviewdialog
2022-07-18 08:34:39 +00: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
Šimon Brandner
19e514d83c
Remove dead code (#9035) 2022-07-11 07:52:44 +02:00
Kerry
7a80ea4bbe
Test typescriptification - MessagePanel (#8943)
* mv test/components/structures/MessagePanel-test.js test/components/structures/MessagePanel-test.tsx

* convert simpler messagepanel tests to rtl

* add data-testid to eventlistsummary

* convert read marker tests to rtl

* formatting

* remove commented
2022-06-30 14:41:53 +02:00
Kerry
4486509d88
Live location share - redact related locations on beacon redaction (PSF-1151) (#8926)
* redact beacon locations on redaction

* redact beacon locations on beacon info redaction

* fussy import ordering

* use real fake redaction in beaconbody test
2022-06-29 09:07:36 +00: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
Robin
d9396b0b54
Expire video member events after 1 hour (#8776)
* Expire video member events after 1 hour

* Iterate based on feedback

* Validate the types of video member events better

* Even more parentheses
2022-06-09 13:19:52 +00: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
Kerry
158e42f764
Unit test MessageActionBar (#8732)
* test most basic paths in messageactionbar

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

* tidy

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

* add rtl

* add code style note about using rtl

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

* downgrade to rtl 12

* use rtl for MessageActionBar test

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

* try mocking settingsstore for ci only failure

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

* mock setValue too

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

* uupdate lockfile

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-06-02 10:25:56 +02:00
r00ster
5b51efd861
Make system fonts work more reliably (#8602)
* Make system fonts work more reliably

* Make it more sophisticated

* Missing semicolon

* Apply suggestions

* Fix formatting

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

* Create FontWatcher-test.tsx

* Add actual tests

* Fix some errors

* Apply suggestions

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Fix FontWatcher tests

* Correct test fixture

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-05-23 17:29:16 +01: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
c67b41fbde
Enable forwarding static locations (#8553)
* enable forwarding for location events

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

* allow forwarding of static locations

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

* add comment

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-10 16:21:20 +00: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
Kerry
ce3bc9dc07
test typescriptification - EventListSummary (#8493)
* test/components/views/elements/EventListSummary-test.js -> tsx

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

* add user mocks util

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

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-04 16:37:41 +02:00
Michael Telatynski
f29ef04751
Fix race conditions around threads (#8448) 2022-05-03 14:25:08 +01:00
Kerry
73e8387799
test functional EventUtils (#8386)
* extract poll event test util

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

* test isContentActionable

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

* test canEditContent

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

* test functional eventutils

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

* copyrights

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-21 18:14:10 +02:00
Robin
c83ad1faa7
Add local echo of connected devices in video rooms (#8368) 2022-04-21 07:41:38 -04:00
Robin
6e86a14cc9
Show a lobby screen in video rooms (#8287)
* Show a lobby screen in video rooms

* Add connecting state

* Test VideoRoomView

* Test VideoLobby

* Get the local video stream with useAsyncMemo

* Clean up code review nits

* Explicitly state what !important is overriding

* Use spacing variables

* Wait for video channel messaging

* Update join button copy

* Show frame on both the lobby and widget

* Force dark theme for video lobby

* Wait for the widget to be ready

* Make VideoChannelStore constructor private

* Allow video lobby to shrink

* Add invite button to video room header

* Show connected members on lobby screen

* Make avatars in video lobby clickable

* Increase video channel store timeout

* Fix Jitsi Meet getting wedged on startup in Chrome and Safari

* Revert "Fix Jitsi Meet getting wedged on startup in Chrome and Safari"

This reverts commit 9f77b8c227c1a5bffa5d91b0c48bf3bbc44d4cec.

* Disable device buttons while connecting

* Factor RoomFacePile into a separate file

* Fix i18n lint

* Fix switching video channels while connected

* Properly limit number of connected members in face pile

* Fix CSS lint
2022-04-20 11:03:33 -04:00
Kerry
70cdd57a5c
Live location sharing: move test utils into utils (#8365)
* move makeRoomWithState events to test utils

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

* move beacon test helpers into utils

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

* remove file

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

* more types

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-19 16:47:19 +00: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
Kerry
03d0969ae3
Live location sharing - update beacon_info implementation to latest MSC (#8256)
* update calls to set and createLiveBeacon

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

* fix stop beacon

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

* remove variable event type from beacon utils

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

* use beacon identifier

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

* fix RoomLiveShareWarning tests

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

* add case for beacon update

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

* lint

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

* more lint

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-08 10:53:06 +02: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
Travis Ralston
4057833036 Merge branch 'develop' into travis/remove-skinning 2022-04-05 10:50:37 -06:00
Robin
371ccd7858
Don't use m.call for Jitsi video rooms (#8223) 2022-04-04 10:29:40 -04:00
Robin
1f64835fab
Update video rooms to new design specs (#8207)
* Remove radio component

* "Voice room" → "video room"

* Remove interactivity from video room tiles

* Update connection state when joining via widget

* Simplify room header buttons for video rooms

* Split out video room creation into a separate menu option

* Simplify room options for video rooms

* Update video room tile layout

* Tell the Jitsi widget whether it's a video channel

* Update tests

* "Voice" → "video" in more places

* Fix tests

* Re-add frame to immersive Jitsi widgets

* Comment ack

* Make updateDevices more readable

* Type FacePile
2022-04-01 14:36:10 +00:00
Travis Ralston
97efdf7094 Merge branch 'develop' into travis/remove-skinning 2022-03-31 19:25:43 -06:00
Kerry
2adc972eec
Live location sharing - stop sharing to beacons in rooms you left (#8187)
* remove beacons on membership changes

* add addMembershipToMockedRoom test util

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

* test remove beacons on membership changes

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

* removelistener

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-29 18:18:34 +02:00
Travis Ralston
ea6e6429ee Step 11: Update i18n & code cleanup 2022-03-28 15:04:36 -06:00
Kerry
d2b97e251e
Live location sharing - handle geolocation errors (#8179)
* display live share warning only when geolocation is happening

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

* kill beacons when geolocation is unavailable or permissions denied

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

* polish and comments

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-28 18:46:39 +02: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
Kerry
1397652f52
Extract location utils from components (#8152)
* extract util functions from MLocationBody

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

* disassemble mlocationbody

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

* tidy and add copyrights

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

* move types and utils from components/location to utils

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

* i18n

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

* empty line

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-25 15:36:22 +01:00
Kerry
0d513b3a2d
geo.getCurrentPosition and some testing helpers (#8150)
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-25 12:30:50 +01:00
Robin
3317b60437
Improve typing around wrapInMatrixClientContext (#8130) 2022-03-23 18:13:40 -04:00
Kerry
1495c23a14
Live location sharing: geolocation utilities (#8126)
* geolocation utilities

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

* remove debug

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

* comments for ts-ignores

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-23 17:08:56 +00: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
b04d31b5be
Live location sharing: live share warning in room (#8100)
* add duration dropdown to live location picker

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

* tidy comments

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

* setup component

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

* replace references to beaconInfoId with beacon.identifier

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

* icon

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

* component for styled live beacon icon

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

* emit liveness change whenever livebeaconIds changes

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

* Handle multiple live beacons in room share warning, test

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

* un xdescribe beaconstore tests

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

* missed copyrights

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

* i18n

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

* tidy

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-22 13:57:12 +00:00
Kerry
a80e55d38d
add helpers for beacon duration calculations (#8101)
* add helpers for beacon duration calculations

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

* makeBeaconInfoEvent timestsamp prop

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

* ad copyright

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-22 10:46:47 +00:00
Kerry
14653d1378
Live location share - set time limit (#8082)
* add mocking helpers for platform peg

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

* basic working live duration dropdown

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

* add duration format utility

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

* add duration dropdown to live location picker

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

* adjust style to allow overflow and variable height chin

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

* tidy comments

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

* arrow fn change

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

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-21 12:42:58 +01: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