Commit Graph

1396 Commits

Author SHA1 Message Date
Michael Telatynski
d2c6577024
Switch to importing more things from the main js-sdk export (#11394) 2023-08-14 08:58:55 +00:00
Travis Ralston
180fcaa70f
Support Matrix 1.1 (drop legacy r0 versions) (#9819)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-14 09:25:13 +01:00
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
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
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
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
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 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
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
8f000384fe
Replace sinon fake timers with jest timers (#11275) 2023-07-17 12:29:51 +00:00
Michael Telatynski
f04a0e2860
Populate info.duration for audio & video file uploads (#11225)
* Improve m.file m.image m.audio m.video types

* Populate `info.duration` for audio & video file uploads

* Fix tests

* Iterate types

* Improve coverage

* Fix test

* Add small delay to stabilise cypress test

* Fix test idempotency

* Improve coverage

* Slow down

* iterate
2023-07-17 12:07:58 +00:00
Michael Telatynski
8b8ca425d7
Hide widget menu button if it there are no options available (#11257)
* Hide widget menu button if it there are no options available

* Update snapshots
2023-07-17 10:37:07 +00:00
Michael Telatynski
3ccc0fd8df
Increase timeout for wysiwyg composer test due to wasm being slow in CI (#11267) 2023-07-17 08:17:35 +00:00
Michael Telatynski
2760bfc836
Prevent user from accidentally double clicking user info admin actions (#11254)
* Prevent user from accidentally double clicking user info admin actions

* Iterate

* Improve coverage

* Improve coverage

* Simplify

* Simplify
2023-07-14 14:48:20 +00:00
Michael Telatynski
cdffd1ca1f
Fix missing metaspace notification badges (#11269)
* Fix missing metaspace notification badges

* Simplify conditional types
2023-07-14 14:40:59 +00:00
Richard van der Hoff
e959eca354
Fix corrupt thread timeline for sending events (#11260)
Events which are still in the process of being sent should *not* be included
in the `EventTimeline`. Doing so means that we will attempt to render them
twice, which makes react explode.

Fixes https://github.com/vector-im/element-web/issues/25770
2023-07-14 10:59:55 +00:00
Michael Telatynski
f5f31eb7d8
Fix jest/valid-expects lints (#11238) 2023-07-13 15:19:44 +00:00
Richard van der Hoff
2cfbd73cd3
Replace getQRCodeBytes with generateQRCode (#11241)
* Replace `getQRCodeBytes` with `generateQRCode`

* another test update

* remove obsolete snapshot
2023-07-13 13:55:55 +00:00
Kerry
c5befa1ef8
Stabilize support for MSC3952: intentional mentions (#10967)
* enable feature_intentional_mentions with v1.7

* org.matrix.msc3952.mentions -> m.mentions

* update push rules test util

* only support stable version 1.7

* use stable values for msc3952 push rules

* use stable intentional mentions rule sin test models

* unstable feature in settings controller
2023-07-11 22:29:54 +00:00
Kerry
7b3d0ad209
OIDC: Log in (#11199)
* add delegatedauthentication to validated server config

* dynamic client registration functions

* test OP registration functions

* add stubbed nativeOidc flow setup in Login

* cover more error cases in Login

* tidy

* test dynamic client registration in Login

* comment oidc_static_clients

* register oidc inside Login.getFlows

* strict fixes

* remove unused code

* and imports

* comments

* comments 2

* util functions to get static client id

* check static client ids in login flow

* remove dead code

* OidcRegistrationClientMetadata type

* navigate to oidc authorize url

* exchange code for token

* navigate to oidc authorize url

* navigate to oidc authorize url

* test

* adjust for js-sdk code

* login with oidc native flow: messy version

* tidy

* update test for response_mode query

* tidy up some TODOs

* use new types

* add identityServerUrl to stored params

* unit test completeOidcLogin

* test tokenlogin

* strict

* whitespace

* tidy

* unit test oidc login flow in MatrixChat

* strict

* tidy

* extract success/failure handlers from token login function

* typo

* use for no homeserver error dialog too

* reuse post-token login functions, test

* shuffle testing utils around

* shuffle testing utils around

* i18n

* tidy

* Update src/Lifecycle.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* tidy

* comment

* update tests for id token validation

* move try again responsibility

* prettier

* use more future proof config for static clients

* test util for oidcclientconfigs

* rename type and lint

* correct oidc test util

* store issuer and clientId pre auth navigation

* adjust for js-sdk changes

* update for js-sdk userstate, tidy

* update MatrixChat tests

* update tests

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-07-11 04:09:18 +00:00
Charly Nguyen
fd749172e1
Allow creating knock rooms (#11182)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-07-10 08:01:03 +00:00
Travis Ralston
8a97e5f351
Expose and pre-populate thread ID in devtools dialog (#10953)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-07 15:40:25 +01:00
Michael Telatynski
cfd48b36aa
Enable strictPropertyInitialization (#11203) 2023-07-07 14:46:12 +01:00
Aaron Raimist
71fe08ea0f
Change wording from avatar to profile picture (#7015)
* Change wording from avatar to profile picture

Signed-off-by: Aaron Raimist <aaron@raim.ist>

* lint

Signed-off-by: Aaron Raimist <aaron@raim.ist>

* Update EventListSummary

Signed-off-by: Aaron Raimist <aaron@raim.ist>

* Delete MembershipEventListSummary.tsx

Signed-off-by: Aaron Raimist <aaron@raim.ist>

* delint

* Update tests

---------

Signed-off-by: Aaron Raimist <aaron@raim.ist>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-07 10:54:43 +00:00
Michael Telatynski
118ee89f9e
Fix TimelinePanel-test over-driving Thread model into compliance (#11198) 2023-07-07 09:48:06 +01:00
Enrico Schwendig
902263d7c9
force to allow calls without video and audio in embedded mode (#11131)
* force to allow calls without video and audio in embedded mode

* Check device access permission and introduce a only screen share call mode

* Fix strict typ check issue

* Fix i18n check issue

* Add unit tests for device selection

* Fix mocked media device query
2023-07-06 14:40:14 +00:00
Johannes Marbach
3f20675b93
Limit width of user menu in space panel (#11192)
Fixes: vector-im/element-web#22627
2023-07-05 22:00:03 +00:00
Michael Telatynski
8107f1d271
Conform more of the codebase to strict types (#11191) 2023-07-05 11:53:22 +01:00
Kerry
90e65e8490
use more future proof config for static clients (#11175) 2023-07-04 23:10:03 +00:00
Kerry
ce332d0f8b
Fix: hide unsupported login elements (#11185)
* hide unsupported login elements

* Update src/components/structures/auth/Login.tsx

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-07-04 22:15:35 +00:00
Germain
2a7780052e
Compound Typography pass regression fixes (#11189)
* Compound Typography pass regression fixes

* updates to the room list sizing

* fix subtitle clipping

* revert display name to use medium variant
2023-07-04 16:54:28 +00:00
Michael Telatynski
a294ba2ad4
Conform more of the codebase to strictNullChecks + noImplicitAny (#11179) 2023-07-04 14:49:27 +01:00
Janne Mareike Koschinski
f62fe2626c
GYU: Account Notification Settings (#11008)
* Implement new notification settings UI

* Sort new keywords at the front

* Make ts-strict happier

* Make ts-strict happier

* chore: fixed lint issues

* update beta card

* Fix issue with the user settings test

* chore: fixed lint issues

* Add tests for notification settings

* chore: fixed lint issues

* fix: spurious text failures

* improve tests further

* make ts-strict happier

* improve tests further

* Reduce uncovered conditions

* Correct snapshot

* even more test coverage

* Fix an issue with inverted rules

* Update res/css/views/settings/tabs/_SettingsIndent.pcss

Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Fix license headers

* Improve i18n

* make linters happier

* Improve beta labels

* improve i18n

* chore: fixed lint issues

* fix: more lint issues

* Update snapshots to match changed text

* Update text as requested

* Remove labs image

* Update snapshots

* Correct an issue with one of the tests

* fix: keyword reconcilation code

* Determine mute status more accurately

* Address review comments

* Prevent duplicate updates

* Fix missing license header

* slight change to avoid ts-strict complaining

* fix test issue caused by previous merge

---------

Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-06-29 15:46:31 +00:00
Germain
9c7d935aae
Compound Typography pass (#11103)
* Integrate compound design tokens

The icons should not be included in this repo, and should live in the compound design token repo, but for simplicity sake at this phase of the integration they will be added here

* Delete unused or incorrect - sass variables

* Typography pass

* Deprecate _font-weights.pcss and use Compound instead

* lint fix

* Fix snapshot

* Fix typography pass feedback

* Remove unwanted e2e test

cypress tests should test functionality not visual output. And we should not test visual output by inspecting CSS properties

* lintfix

* Migration script for baseFontSize

* Updates after design review

* Update font scaling panel to use min/max size

* Fix custom font

* Fix font slider e2e test

* Update custom font

* Update new baseFontSizeV2

* Disambiguate heading props

* Fix appearance test

* change max font size

* fix e2ee test

* fix tests

* test baseFontSize migration code

* typescript strict

* Migrate baseFontSize account setting

* Change assertion for font size

* Fix font size controller test
2023-06-29 10:30:25 +00:00
Kerry
3f04e41c21
OIDC: navigate to authorization endpoint (#11096)
* add delegatedauthentication to validated server config

* dynamic client registration functions

* test OP registration functions

* add stubbed nativeOidc flow setup in Login

* cover more error cases in Login

* tidy

* test dynamic client registration in Login

* comment oidc_static_clients

* register oidc inside Login.getFlows

* strict fixes

* remove unused code

* and imports

* comments

* comments 2

* util functions to get static client id

* check static client ids in login flow

* remove dead code

* OidcRegistrationClientMetadata type

* navigate to oidc authorize url

* navigate to oidc authorize url

* test

* adjust for js-sdk code

* update test for response_mode query

* use new types

* strict

* tidy
2023-06-28 21:08:56 +00:00
Michael Weimann
c0db739d81
Apply strictNullChecks to src/components/views/spaces/* (#10517)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-06-28 15:39:19 +01:00
Michael Telatynski
6836a5fa7b
Conform more code to strictNullChecks and noImplicitAny (#11156) 2023-06-28 14:05:36 +01:00
Richard van der Hoff
46eb34a55d
Kill off references to deprecated getStoredDevice and getStoredDevicesForUser (#11152)
* Use new `CryptoEvent.VerificationRequestReceived` event

https://github.com/matrix-org/matrix-js-sdk/pull/3514 deprecates
`CryptoEvent.VerificationRequest` in favour of
`CryptoEvent.VerificationRequestReceived`. Use the new event.

* Factor out `getDeviceCryptoInfo` function

I seem to be writing this logic several times, so let's factor it out.

* Factor out `getUserDeviceIds` function

Another utility function

* VerificationRequestToast: `getStoredDevice` -> `getDeviceCryptoInfo`

* SlashCommands: `getStoredDevice` -> `getDeviceCryptoInfo`

* MemberTile: `getStoredDevicesForUser` -> `getUserDeviceIds`

* Remove redundant mock of `getStoredDevicesForUser`
2023-06-28 12:39:34 +00:00
Kerry
a87362a048
Unit test token login flow in MatrixChat (#11143)
* test tokenlogin

* whitespace

* tidy

* strict
2023-06-27 23:45:11 +00:00
Kerry
79a7b9aedc
Don't setup keys on login when encryption is force disabled (#11125)
* move shouldForceDisableEncryption to /crypto

* dont setup encryption when encryption is force disabled

* shuffle testing functions

* test post login security setup flows

* remove debug

* lint fixes

* strict fixes

* strict fixes p2

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-06-27 09:42:31 +00:00
Johannes Marbach
22077c5433
Prevent auto-translation within composer (#11114)
Fixes: vector-im/element-web#25624
2023-06-27 08:48:32 +00:00
Richard van der Hoff
36c81f6416
VerificationPanel: avoid use of getStoredDevice (#11129)
* VerificationPanel: avoid use of `getStoredDevice`

This is deprecated and doesn't work with the rust-sdk.

* fix types
2023-06-23 12:38:06 +00:00
Kerry
358c37ad69
OIDC: attempt dynamic client registration (#11074)
* add delegatedauthentication to validated server config

* dynamic client registration functions

* test OP registration functions

* add stubbed nativeOidc flow setup in Login

* cover more error cases in Login

* tidy

* test dynamic client registration in Login

* comment oidc_static_clients

* register oidc inside Login.getFlows

* strict fixes

* remove unused code

* and imports

* comments

* comments 2

* util functions to get static client id

* check static client ids in login flow

* remove dead code

* OidcRegistrationClientMetadata type

* use registerClient from js-sdk

* use OidcError from js-sdk
2023-06-22 20:59:03 +00:00
Kerry
0eda8c17d5
Unit test post-login security setup flows in MatrixChat (#11126)
* shuffle testing functions

* test post login security setup flows

* remove debug

* strict fixes

* strict fixes p2
2023-06-22 20:57:16 +00:00
Michael Telatynski
d935da2844
Fix server picker not allowing you to switch from custom to default (#11127) 2023-06-22 13:48:15 +00:00
Kerry
328db8fdfd
OIDC: Check static client registration and add login flow (#11088)
* util functions to get static client id

* check static client ids in login flow

* remove dead code

* add trailing slash

* comment error enum

* spacing

* PR tidying

* more comments

* add ValidatedDelegatedAuthConfig type

* Update src/Login.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update src/Login.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update src/utils/ValidatedServerConfig.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* rename oidc_static_clients to oidc_static_client_ids

* comment

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-06-22 10:15:44 +00:00
Kerry
9f580a8680
Disable encryption toggle in room settings when force disabled (#11122)
* force disable encryption on room creation

* test allowChangingEncryption

* move into utils/room directory

* tests

* unit test CreateRoomDialog

* remove debug

* wait for constructor promises to settle

* test case for force_disable

* comment

* set forced value after resolving checkUserIsAllowedToChangeEncryption

* tidy and comments

* use label text in test

* disable encryption switch in room settings when force disabled
2023-06-21 23:17:30 +00:00
Kerry
a692fe2181
Add .well-known config option to force disable encryption on room creation (#11120)
* force disable encryption on room creation

* test allowChangingEncryption

* move into utils/room directory

* tests

* unit test CreateRoomDialog

* remove debug

* wait for constructor promises to settle

* test case for force_disable

* comment

* set forced value after resolving checkUserIsAllowedToChangeEncryption

* tidy and comments

* use label text in test
2023-06-21 21:50:01 +00:00
Johannes Marbach
9d9c55d92e
Handle permalinks in room topic (#11115)
* Handle permalinks in room topic

Fixes: vector-im/element-web#23395

* Add test for clicking non-link
2023-06-21 18:09:22 +00:00
Michael Telatynski
9b5b053148
Use MatrixClientPeg::safeGet for strict typing (#10989) 2023-06-21 17:29:44 +01:00
alunturner
d64018ce26
Improve message body output from plain text editor (#11124)
* add failing test

* WIP - pause work until we can implement with new patch release of RTE

* focus tests purely on the body output

* remove unused import
2023-06-21 15:02:52 +00:00
Kerry
a4cf2af187
Unit test CreateRoomDialog (#11121)
* unit test CreateRoomDialog

* remove debug

* wait for constructor promises to settle

* use label text in test
2023-06-21 08:01:01 +00:00
alunturner
ac3d6ab7dd
Add at room avatar for RTE (#11106)
* add at room avatar logic

* fix broken test

* fix TS error

* add param comment

* increase test coverage

* update code to solve conflict
2023-06-21 07:57:22 +00:00
Germain
8aa46b3005
Restore breadcrumb preference setting (#11116)
* Restore breadcrumb preference setting

* restore snapshot
2023-06-20 11:58:03 +00:00
Michael Telatynski
a491795aa7
Fix RoomView ignoring alias lookup errors due to them not knowing the roomId (#11099) 2023-06-19 17:08:16 +01:00
Germain
aca6a66f6a
Remove new room breadcrumbs (#11104)
* Deprecate new room breadcrumbs

* i18n
2023-06-19 08:18:46 +00:00
alunturner
fa31ed55d2
Update rich text editor dependency and associated changes (#11098)
* fix logic error

* update types

* extract message content to variable

* use the new messageContent property

* sort out mention types to make them a  map

* update getMentionAttributes to use AllowedMentionAttributes

* add plain text handling

* change type and handling for attributes when creating a mention in plain text

* tidy, add comment

* revert TS config change

* fix broken types in test

* update tests

* bump rte

* fix import and ts errors

* fix broken tests
2023-06-19 08:00:11 +00:00
Suguru Hirahara
2972219959
Conform class names of mx_AppTileBody for a widget and PiP widget to our naming policy (#11002)
* Rename classes of appTileBodyClass

Include mx_AppTileBody_fadeInSpinner in mx_AppTileBody, the class name applied by default

* Apply a common CSS declaration to mx_AppTileBody

* Strictify style rule specificity to avoid visual regressions - mx_AppTileBody--*

* Run prettier

* Change --normal to --large

* Edit and add comments

When you add, edit, or remove style rules from mx_appTileBody without causing a visual regression, it is imperative to keep in mind which selector should be worked on. The comments should help developers who are not familiar with the style codebase to avoid a regression.

* Rename classes of appTileBodyClass

Include mx_AppTileBody_fadeInSpinner in mx_AppTileBody, the class name applied by default

* Apply a common CSS declaration to mx_AppTileBody

* Strictify style rule specificity to avoid visual regressions - mx_AppTileBody--*

* Run prettier

* Change --normal to --large

* Edit and add comments

When you add, edit, or remove style rules from mx_appTileBody without causing a visual regression, it is imperative to keep in mind which selector should be worked on. The comments should help developers who are not familiar with the style codebase to avoid a regression.

* Update a Jest snapshot

* Update a Jest snapshot
2023-06-16 18:24:10 +00:00
Florian Duros
77da949fd4
CreateKeyBackupDialog.tsx: Remove logic for servers which are not supporting cross-signing (#11076) 2023-06-16 13:25:24 +01:00
Richard van der Hoff
06fa49a9da
Use new accessors for VerificationRequest (#11092)
* Switch verification request accessors to go via CryptoApi

part of https://github.com/vector-im/crypto-internal/issues/97

* Update references to `requestVerification`

https://github.com/vector-im/crypto-internal/issues/98
2023-06-16 10:27:56 +00:00
Michael Telatynski
7236e48765
Allow maintaining a different right panel width for thread panels (#11064)
* Move Room context threadId our of RoomView state

* Allow maintaining a different right panel width for thread panels

* Fix types

* Fix types

* Add tests

* Increase coverage

* Increase coverage

* Add comments

* Update src/components/structures/MainSplit.tsx

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-06-15 11:57:58 +00:00
Michael Telatynski
cb2b1718ff
Remove feature_favourite_messages as it is has been abandoned for now (#11097)
* Remove `feature_favourite_messages` as it is has been abandoned for now

* i18n

* Fix test

* Remove unused css
2023-06-15 11:02:45 +00:00
Michael Weimann
386a459b9f
Remove unknown MXIDs from invite suggestions (#11055) 2023-06-15 09:07:26 +00:00
Michael Telatynski
280f6a9d93
Use MatrixClientPeg::safeGet in src/components/views/* (#10987) 2023-06-15 08:46:19 +01:00
Richard van der Hoff
b9b93264b6
Remove references to VerificationRequest (#11050)
* Update references to `VerificationRequestEvent`

* Update references to `Phase`

* update references to legacy `PHASE_*` constants

* Replace `request.canAccept` with `canAcceptVerificationRequest`

* Replace `VerificationRequest` with the interface throughout

* Minor strict type fixes

* Add a couple of tests
2023-06-14 14:35:32 +00:00
Michael Telatynski
9c48487d85
Prefer MatrixClientContext over MatrixClientPeg (#10986) 2023-06-14 13:42:07 +01:00
Suguru Hirahara
b40f29f04c
Fix visual regressions around widget permissions (#10954)
* Add a Jest snapshot of AppPermission

* Move the test inside 'for a pinned widget' category

* Make only spinner message bold

* Set font size specified with "mx_AppPermission_smallText" by default

- Add "mx_AppPermission_largeText" for elements whose size has not been specified with mx_AppPermission_smallText
- Create _AppWarning.pcss for AppWarning

* Make AppPermission panel scrollable, keeping the content at the center

* Run prettier

* Use Heading component

* Use Icon component

* Fix the test
2023-06-14 11:11:06 +00:00