Commit Graph

200 Commits (72d7939afcc02f398f0987d68ecf94d6d5f1f6b6)

Author SHA1 Message Date
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
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
Florian Duros c0bf45fddc
Rename wysiwyg prop into composer 2022-10-14 10:56:34 +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
Michael Telatynski 8b54be6f48
Move from `browser-request` to `fetch` (#9345) 2022-10-12 18:59:07 +01: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 26a74a193f
Add Element Call room settings (#9347)
Co-authored-by: Robin <robin@robin.town>
2022-10-07 18:10:17 +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
Michael Weimann 7a33818bd7
Extract createVoiceMessageContent (#9322) 2022-09-29 13:06:49 -06: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
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 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 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
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