Commit Graph

175 Commits (0d6a550c33d0b70decd2146a60ec54f8ddf5d715)

Author SHA1 Message Date
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
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
Michael Telatynski 394e181854
Define interface for RLS to ease wiring in Sliding Sync (#9150)
* Define iface for RLS

* Iterate interface
2022-08-09 20:46:59 +01:00
Robin 0e0be08781
Remove "Add Space" button from RoomListHeader when user cannot create spaces (#9129)
* Remove Add Space button in RoomListHeader when user cannot createSpaces

* Reuse the same booleans as SpaceContextMenu

* Code review fixes

* Fix test for standard case

* Refactor tests and add more

* Test the PlusMenu, where the bug originally was

* Add tests for plus menu

* Refactor tests

* add type in functions and use DMRoomMap#setShared

* use of wrapInMatrixClientContext

* Trigger CI

* Ignore enzyme deprecation in RoomListHeader-test.tsx

Co-authored-by: Estelle Comment <estelle.comment@gmail.com>
Co-authored-by: mcalinghee <mcalinghee.dev@gmail.com>
Co-authored-by: Michael Weimann <michaelw@matrix.org>
2022-08-03 15:19:24 +00:00
Michael Weimann 27ba1e57e6
Update matrix-org/react (enzyme deprecation) (#9116) 2022-08-02 15:10:43 +02:00
Michael Weimann 9edd49818c
Prepare room components for local rooms (#9082) 2022-07-20 15:07:06 +02:00
Michael Weimann 3be20cf434
Use doMaybeLocalRoomAction (#9038)
* Use doMaybeLocalRoomAction

* Revert unnecessary changes
2022-07-13 07:56:36 +02:00
Michael Telatynski e7a8dbd04c
Revert recent composer changes (#8840)
* Revert "Prevent new composer from overflowing from non-breakable text (#8829)"

This reverts commit 57dff8131c.

* Revert "Fix scroll jump issue with the composer (#8791)"

This reverts commit 5167521ea4.

* Revert "Fix scroll jump issue with the composer (#8788)"

This reverts commit f568a76dc6.

* Revert "Revert link color change in composer (#8784)"

This reverts commit aedbeb2995.

* Revert "Improve composer visiblity (#8578)"

This reverts commit f14374a51c.
2022-06-27 09:43:58 +01:00
Šimon Brandner 9b8b1d193e
Disable redacting reactions if we don't have sufficient permissions (#8767) 2022-06-10 18:41:05 +00: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
Germain f14374a51c
Improve composer visiblity (#8578)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-06-07 07:28:29 +00:00
Robin 26bc3ab0aa
Tweak video rooms copy (#8582)
* "Video room" → "New video room"

* "Connect now" → "Join"

* "N people connected" → "N people joined"

* "Connected" → "Joined"

* Fix tests
2022-05-13 12:45:38 +00:00
Michael Telatynski 00984e4434
Fix effect of URL preview toggle not updating live (#8561)
* Remove unused state and fix canPeek

* Fix effect of URL preview toggle not updating live

* Remove stale context fields
2022-05-11 15:11:42 +01:00
Travis Ralston 401e124df6 Merge branch 'develop' into 19245-improve-styling-of-search-initialization-errors 2022-05-09 19:32:43 -06:00
Kerry 333dd59f06
test typescriptification - RoomList (#8540)
* test/components/views/rooms/RoomList-test.js -> test/components/views/rooms/RoomList-test.tsx

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

* fix ts issues

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-09 13:24:12 +00:00
Michael Telatynski 674aec4050
Fix regression around pasting links (#8537)
* Fix regression around pasting links

* Add tests
2022-05-09 12:39:32 +00:00
Kalle Struik 7c07ad155c Improve the styling of search initialization errors.
Signed-off-by: Kalle Struik <kalle@kallestruik.nl>
2022-05-09 11:20:36 +02: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
Šimon Brandner b12c002602
Order receipts with the most recent on the right (#8506) 2022-05-05 12:10:48 +00:00
Janne Mareike Koschinski 3e31fdb6a7
read receipts: improve tooltips to show names of users (#8438) 2022-05-02 11:46:11 +02:00
Šimon Brandner 3a245a0cbe
Fix jump to bottom button being always displayed in non-overflowing timelines (#8460) 2022-05-01 19:38:36 -06:00
Emmanuel d294dad04d
fix timeline search with empty text box should do nothing (#8262)
* fix timeline search with empty text box should do nothing

* test SearchBar component

* fix lint error

* Update SearchBar-test.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-05-02 01:09:59 +00: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
Robin 7335b35fbb
Avoid looking up settings during timeline rendering (#8313)
* Avoid showHiddenEventsInTimeline lookups

* Avoid MSC3531 feature lookups

* Test that showHiddenEventsInTimeline doesn't get looked up while
rendering

* Fix code review nits

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-04-14 23:23:22 +00:00
CommanderRoot c35fc169f5
Replace deprecated String#substr with String#slice (#8314) 2022-04-14 07:52:42 +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
Travis Ralston 0280c27bfd post-merge fixes 2022-04-05 10:57:16 -06: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
Michael Telatynski e161f0b17b
Update more strings to not wrongly mention room when it is/could be a space (#7722) 2022-03-29 15:02:12 +01:00
Travis Ralston ea6e6429ee Step 11: Update i18n & code cleanup 2022-03-28 15:04:36 -06:00
Travis Ralston b2b818a780 Step 8.6: Fix TS issues introduced by using imports 2022-03-28 14:02:31 -06:00
Travis Ralston a987ead7d2 Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
Travis Ralston d977865b8e Step 3.1.1: Remove tests that are infeasible to convert 2022-03-28 14:02:31 -06:00
Travis Ralston 26dc2ba45e Step 3.1: Stop using `getComponent` in tests 2022-03-28 14:02:31 -06: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
Kerry a8d65ab5c5
Include /test in tsc config, fix rest of issues (#8119)
* fix ts issue in PosthogAnalytics test

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

* fix remaining ts issues

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

* tsconfig change

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

* use sdkconfig patch instead of put

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-23 10:27:28 +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
Travis Ralston 03c80707c9 Fix tests for type changes
This is a conflict between https://github.com/matrix-org/matrix-react-sdk/pull/8104 and https://github.com/matrix-org/matrix-react-sdk/pull/8084
2022-03-22 16:45:21 -06: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
Robin 666cab954a
Fix emoting with emoji or pills (#8105)
* Fix emoting with emoji or pills

* Fix some slash command errors not being shown

* Re-enable mistakenly skipped SendMessageComposer tests

* Test emoting with non-text parts
2022-03-21 19:09:43 +00:00
Kerry 026ca1ab64
Fix tsc issues in right_panel and room component tests (#8078)
* fix ts issues in SendMessageComposer-test

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

* remove empty file

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

* fix tsc issues in MessageComposerbUttons-test

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

* fix the rest

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

* bad autoformatter

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

* tsc fixes for test/components/views/right_panel

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-21 10:03:03 +01:00
Kerry da097d42ef
fix ts issues in SendMessageComposer-test (#8077)
* 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>

* better event type for m.room.message

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-18 10:07:33 +00:00
Germain 21d3cb08a9
Switch to using stable values for threads (#8019) 2022-03-11 09:04:22 +00:00
Travis Ralston b981a96b29
Add unexposed account setting for hiding poll creation (#7972)
* Add unexposed account setting for hiding poll creation

This is to match the sticker picker setting we already have, but not exposed in the user settings until we decide if we actually want it to be there.

This is primarily intended to be used in environments that disable it at the config level, though given there's multiple people in the wild who have asked for this, it seems reasonable to expose it as a hidden setting instead. Note that as of writing it's not clear if any of those requests made it as far as an issue tracker.

Typically for the usecase presented we'd add a new UIFeature flag, however this *feels* wrong for the case at hand.

* Move visibility check way higher

* Fix i18n post-merge
2022-03-04 18:04:30 +00:00
Michael Telatynski 0e60ad98c1
Hide composer and call buttons when the room is tombstoned (#7975) 2022-03-04 15:53:22 +00:00
Michael Telatynski f25e6813bb
Mandate use of js-sdk/src/matrix import over js-sdk/src (#7933) 2022-03-01 20:42:05 +00:00