Commit Graph

2376 Commits

Author SHA1 Message Date
Milton Moura
d240f06810
Include non-matching DMs in Spotlight recent conversations when the DM's userId is part of the search API results (#11374)
* This addresses two issues:

     1. Include non-matching DMs in Spotlight suggestions if the userId of the DM is included in the user directory search results
     2. The user directory search results order is kept when there is no relevant activity between users, instead of sorting by MXID

* Applying feedback from PR:
1. Updated comments
2. Renamed users to userDirectorySearchResults
3. Makes sure linter is happy
2023-08-10 17:27:24 +00:00
Michael Telatynski
ef385e6028
Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
Michael Telatynski
a1328d8ef7
Switch to importing more things from the main js-sdk export (#11376) 2023-08-09 15:10:54 +00:00
Michael Telatynski
e6c127915f
Fix useRoomMembers missing updates causing incorrect membership counts (#11392)
* Fix useRoomMembers missing updates

* Also fix useRoomMemberCount

* Add tests
2023-08-09 12:27:37 +00:00
Michael Telatynski
57a0d99dc8
Improve randomString mock for better snapshots (#11375) 2023-08-09 09:39:48 +01:00
Michael Telatynski
c3574c2050
Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
Kerry
e0d498e338
Enable jsx-a11y/click-events-have-key-events eslint rule (#10362)
* enable "jsx-a11y/alt-text" lint rule

* enable "jsx-a11y/label-has-associated-control"

* make Spoilers keyboard accessible

* make invite reason keyboard accessible

* make invite suggestions keyboard accessible

* make avatar upload in space basic settings keyboard accessible

* ignore jsx-a11y/click-events-have-key-events issues in tests

* Update test expectation

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-09 06:27:31 +00:00
Michael Telatynski
2b17fc3221
Show error when searching public rooms fails (#11378)
* Show error when searching public rooms fails

* Fix types

* Improve test coverage

* Improve coverage
2023-08-08 14:08:17 +00:00
Germain
84d196776e
Change formatCount impl to use Intl.NumberFormat (#11379)
* Change formatCount impl to use Intl.NumberFormat

* Update formatCount JSDoc description
2023-08-08 11:45:20 +00:00
Michael Telatynski
033c600fa2
Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
Michael Telatynski
368b6b9355
Switch to importing models/{event-timeline{,set},user,device,event-status} from main js-sdk export (#11368) 2023-08-08 07:16:04 +00:00
Rashmit Pankhania
b08bdf7e0d
Fix "Export chat" not respecting configured time format in plain text mode (#10696)
* #23838 Fix "Export chat" time format in plain text mode

* #23838 Fix import of matrix-js-sdk

* Remove hardcoded locale

Co-authored-by: Michael Weimann <mail@michael-weimann.eu>

* Fix test for readability

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Fix test

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Fix test

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Fix test

Signed-off-by: Rashmit Pankhania <rashmitpankhania@gmail.com>
Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Use dateUtils formatFullDate function

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

---------

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>
Signed-off-by: Rashmit Pankhania <rashmitpankhania@gmail.com>
Co-authored-by: Rashmit Pankhania <raspankh@publicisgroupe.net>
Co-authored-by: Michael Weimann <mail@michael-weimann.eu>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-07 13:58:45 +00:00
Michael Telatynski
24703eea8f
Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
Charly Nguyen
5152aad059
Allow knocking rooms (#11353)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-08-07 06:27:09 +00:00
Michael Telatynski
e6af09e424
Switch to importing models/room-state & models/room-member from main js-sdk export (#11362)
* Switch to importing TypedEventEmitter from main js-sdk export

* Switch to importing js-sdk/matrix in cypress

* Remove duplicated imports

* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess

* Add lint rule

* Switch to importing models/Room from main js-sdk export

* Switch to importing models/room-state & models/room-member from main js-sdk export

* Fix cypress-axe import

* Fix more imports

* Fix cypress-axe import

* Fix bad merge
2023-08-04 11:22:08 +00:00
Michael Telatynski
e67ca33c4a
Switch to importing models/Room from main js-sdk export (#11361)
* Switch to importing TypedEventEmitter from main js-sdk export

* Switch to importing js-sdk/matrix in cypress

* Remove duplicated imports

* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess

* Add lint rule

* Switch to importing models/Room from main js-sdk export

* Fix cypress-axe import

* Fix more imports

* Fix cypress-axe import

* Fix duplicated lint rule
2023-08-04 07:36:16 +00:00
Peter Scheu
5ee8e61bf5
Search for users on paste (#11304)
Signed-off-by: Peter Scheu <peter.scheu@aceart.de>
2023-08-04 07:19:56 +00:00
Travis Ralston
771d7e95e7
Support adding space-restricted joins on rooms not members of those spaces (#9017)
* Support adding space-restricted joins on rooms not members of those spaces

* add react dependencies

* Add snapshot test

* Fix snapshot stability

* Update snapshot

* Increase coverage

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-03 15:56:53 +00:00
Michael Telatynski
47877ba2da
Switch to importing matrix-js-sdk from its main export (#11360)
* Switch to importing TypedEventEmitter from main js-sdk export

* Switch to importing js-sdk/matrix in cypress

* Remove duplicated imports

* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess

* Add lint rule

* Fix cypress-axe import

* Fix cypress-axe import
2023-08-03 12:56:30 +00:00
Michael Telatynski
755f8d7ab0
Fix AppTile context menu not always showing up when it has options (#11358)
* Fix AppTile context menu not always showing up when it has options

* Comment

* Update snapshots
2023-08-03 09:23:20 +00:00
Germain
d94808a197
Make room model mandatory on the RoomHeader (#11355)
* Remove oobData from RoomHeader

It is never used as the RoomHeader is not shown unless a Room model exists

* Make room model mandatory on the RoomHeader
2023-08-02 15:29:19 +00:00
Germain
d49581344e
Integrate @vector-im/compound-web (#11354)
* Create useRoomName hook

Mark RoomName component as deprecated

* Pass out-of-band data to relevant RoomHeader component

* Mark LegacyRoomHeader as deprecated

* Fix incorrect search&replace in _RoomHeader.pcss

* lintfix

* Mark room as optional in room topic hook

* Fix i18n

* Discard use of useCallback

* Change export of useRoomName

* fix ts issue

* lints

* Add room topic to room header

* lintfix

* lintfix & clamp to one line

* Revert optimisations to DecoratedRoomAvatar

* Add test for opening the room summary

* Make transition honour prefer-reduced-motion

* Integrate @vector-im/compound-web

* Use compound type styles

* Use latest version of @vector-im/compound-web

* Change component name

* Fallback when room is undefined

* fix snapshot
2023-08-02 13:03:04 +00:00
Germain
33299af5c9
Add room topic and animation (#11352)
* Create useRoomName hook

Mark RoomName component as deprecated

* Pass out-of-band data to relevant RoomHeader component

* Mark LegacyRoomHeader as deprecated

* Fix incorrect search&replace in _RoomHeader.pcss

* lintfix

* Mark room as optional in room topic hook

* Fix i18n

* Discard use of useCallback

* Change export of useRoomName

* fix ts issue

* lints

* Add room topic to room header

* lintfix

* lintfix & clamp to one line

* Revert optimisations to DecoratedRoomAvatar

* Add test for opening the room summary

* Make transition honour prefer-reduced-motion

* Fallback when room is undefined

* fix snapshot
2023-08-02 10:54:06 +00:00
Michael Telatynski
8166306e0f
Fix clicking on home all rooms space notification not working (#11337)
* Fix clicking on home all rooms space notification not working

* Add test
2023-08-02 09:55:49 +00:00
Michael Telatynski
2f2067e434
Fix home/all rooms context menu in space panel (#11350)
* Fix home/all rooms context menu in space panel

* Fix tests
2023-08-01 15:26:14 +00:00
Germain
5d9f5ccf0b
Create useRoomName hook (#11346)
* Create useRoomName hook

Mark RoomName component as deprecated

* Pass out-of-band data to relevant RoomHeader component

* Mark LegacyRoomHeader as deprecated

* Fix incorrect search&replace in _RoomHeader.pcss

* lintfix

* Fix i18n

* Discard use of useCallback

* Change export of useRoomName

* fix ts issue

* lints
2023-08-01 13:47:09 +00:00
Michael Telatynski
340e301844
Make keyboard handling in and out of autocomplete completions consistent (#11344)
* Make keyboard handling in and out of autocomplete completions consistent

* Add test
2023-08-01 09:06:37 +00:00
Germain
6ae7c033d5
Add feature flag 'feature_new_room_decoration_ui' and segrate legacy UI component (#11345)
* Move RoomHeader to LegacyRoomHeader

* Create new RoomHeader component
2023-08-01 07:32:53 +00:00
Richard van der Hoff
ddb8e0aa3a
Update SecureBackupPanel to use getCrypto() (#11322)
`MatrixClient.crypto` is going away, so let's switch over to `getCrypto()`.

There doesn't seem to be anything else relying on the `crypto` stub in
`mockClientMethodsCrypto()`, so let's get rid of that.
2023-07-28 09:24:28 +00:00
Kerry
5636a9f7ca
Unit test logout action in MatrixChat (#11303)
* test logout action in MatrixChat

* add restore all mocks
2023-07-28 02:25:18 +00:00
Richard van der Hoff
f6fc5cad5c
Remove display of key backup signatures from backup settings (#11333)
* Remove display of Key backup signatures

This is *fiddly* to support in Element-R, and we don't really think it's
offering any value.

* update snapshot

* clean up i18n
2023-07-27 19:52:02 +00:00
renovate[bot]
5405c22db1
Update all non-major dependencies (#11329)
* Update all non-major dependencies

* Add isLocation to ComposerEvent analytics events

* Remove cypress-each as it is incompatible with modern typescript

* Roll back eslint-plugin-deprecate

* Remove stale comment

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-27 11:34:44 +00:00
Michael Telatynski
d405160080
Use PassphraseFields in ExportE2eKeysDialog to enforce minimum passphrase complexity (#11222)
* Use PassphraseFields in ExportE2eKeysDialog to enforce minimum passphrase complexity

* Tweak copy

* Iterate

* Add tests

* Improve variable naming

* Improve coverage
2023-07-27 09:21:20 +00:00
Michael Telatynski
3ab0757604
Fix edge case with sent indicator being drawn when it shouldn't be (#11320)
* Fix edge case with sent indicator being drawn when it shouldn't be

* Comment
2023-07-27 07:41:36 +00:00
Germain
22f83e7917
Use correct translation function for WYSIWYG buttons (#11315)
* Use correct translation function for WYSIWYG buttons

* Add tests
2023-07-26 11:30:54 +00:00
Michael Weimann
e33a7e41a4
Handle own profile 404 (#11319) 2023-07-26 09:54:45 +00:00
Michael Telatynski
b5cbd9eeca
Ensure consistency when rendering the sent event indicator (#11314)
* Ensure consistency when considering where to render the sent event indicator

* Add test

* Fix redacted edge case

* Comments
2023-07-25 11:50:20 +00:00
Michael Telatynski
9136a581d2
Prevent re-filtering user directory results in spotlight (#11290)
* Prevent re-filtering user directory results in spotlight

As they were already filtered by the server and may be fuzzier than any filtering we can do locally,
e.g. matching against email addresses or other fields not available to the client

* deduplicate work

* Improve coverage
2023-07-25 08:05:54 +00:00
Slavi Pantaleev
4316ebae29
Do not show "Forget room" button in Room View header for guest users (#10898)
* Do not show "Forget room" button in Room View header for guest users

You can observe this problem by opening this in a new private tab:
https://app.element.io/#/room/#matrix:matrix.org

This is a public room with guest access enabled and Element will use a
guest account to display it.

Showing a "Forget room" button in the header for guest users is
pointless. Clicking on it leads to a `M_GUEST_ACCESS_FORBIDDEN` error.

Signed-off-by: Slavi Pantaleev <slavi@devture.com>

* Iterate

---------

Signed-off-by: Slavi Pantaleev <slavi@devture.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-25 07:57:26 +00:00
Michael Telatynski
a70fcfd0bc
Fix invite dialog showing the same user multiple times (#11308)
* Fix invite dialog showing the same user multiple times

* Add test

* Improve coverage
2023-07-24 09:12:37 +00:00
Kerry
0b0d77cbcc
OIDC: Persist details in session storage, create store (#11302)
* utils to persist clientId and issuer after oidc authentication

* add dep oidc-client-ts

* persist issuer and clientId after successful oidc auth

* add OidcClientStore

* comments and tidy

* format
2023-07-20 21:30:19 +00:00
Charly Nguyen
9a31cd0fa8
Allow setting room join rule to knock (#11248)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-07-19 10:48:24 +00:00
Germain
150e97744d
Fix changelog dialog heading size (#11286) 2023-07-19 08:03:56 +00:00
Kerry
689089d9e6
Jest test coverage for Lifecycle.persistCredentials (#11243)
* test persistCredentials without a pickle key

* test setLoggedIn with pickle key

* lint

* type error

* rest restore session with pickle key
2023-07-19 07:40:40 +00:00
Michael Telatynski
58db307cf2
Update jest snapshot (#11293) 2023-07-18 14:33:46 +00:00
RiotRobot
5881df3f41 Merge branch 'master' into develop 2023-07-18 13:33:41 +01:00
RiotRobot
22fcd34c60 Sanitise strings going into the html export CVE-2023-37259 2023-07-18 13:23:27 +01:00
Michael Telatynski
d9d0b84152
Revert "Do not filter users post search (#9556)" (#11288) 2023-07-18 09:26:54 +01:00
Maximilian Malek
f1db2b3687
Do not filter users post search (#9556)
* Do not filter users post search

Signed-off-by: Maximilian Malek <maximilian.malek@uni-graz.at>

* Iterate

* Iterate

---------

Signed-off-by: Maximilian Malek <maximilian.malek@uni-graz.at>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-17 15:31:38 +00:00
Michael Telatynski
9fcd1f2434
Remove reply fallback from notifications (#11278)
* Remove reply fallback from notifications

* Add test
2023-07-17 14:04:09 +00:00