Commit graph

2311 commits

Author SHA1 Message Date
Michael Telatynski
a8f632ae19
Warn when demoting self via /op and /deop slash commands (#11214)
* Warn when demoting self via /op and /deop slash commands

* Iterate and DRY

* i18n

* Improve coverage

* Improve coverage

* Improve coverage

* Iterate
2023-07-11 12:53:33 +00:00
Janne Mareike Koschinski
b179f5562e
GYU: Fix issues with audible keywords without activated mentions (#11218) 2023-07-11 10:38:26 +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
Timo
58710d129d
Autoapprove Element Call oidc requests (#11209)
* autoapprove Element Call oidc requests

Signed-off-by: Timo K <toger5@hotmail.de>

* update comment

Signed-off-by: Timo K <toger5@hotmail.de>

* add tests for oidc element-call

Signed-off-by: Timo K <toger5@hotmail.de>

* fix ES lint

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
2023-07-10 15:06:58 +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
Kerry
01bd80fe59
OIDC: update to oidc-client-ts functions from js-sdk (#11193)
* test util for oidcclientconfigs

* rename type and lint

* correct oidc test util

* store issuer and clientId pre auth navigation

* update for js-sdk userstate, tidy
2023-07-10 00:57:16 +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
Michael Telatynski
285847560b
Conform more of the codebase to strict typing (#11195) 2023-07-07 09:02:13 +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
d7677c7e21
Handle newlines in user pills (#11166)
* Handle newlines in user pills

Fixes: vector-im/element-web#10994

* Fix typo in comment

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

* Refactor link generation for better readability

* Use `<br>` instead of `<br/>`

* Fix copy/paste error

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-07-05 22:00:27 +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
209f5bdf33
Consider the empty push rule actions array equiv to deprecated dont_notify (#11155)
* Consider the empty push rule actions array equiv to deprecated dont_notify

* Switch primary tests to empty actions, add test for dont_notify

* strict types
2023-06-28 14:07:02 +00: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
Michael Telatynski
e1cad41bc3
Conform more of the codebase to strictNullChecks (#11134) 2023-06-27 17:39:56 +01:00
Johannes Marbach
bde51ae524
Update linkify to 4.1.1 (#11132)
* Update linkify to 4.1.1

Fixes: vector-im/element-web#23806

* Empty commit to nudge CI

* Remove obsolete `any` types

* Allow hyphens in domainpart

* Improve test name
2023-06-27 11:23:37 +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
Michael Telatynski
5cf818fefa
Fix spurious notifications on non-live events (#11133)
* Fix notifier not discriminating removed and backpaginated events

* Ignore events on the thread list generated timelines

* Add test

* tsc strict
2023-06-27 09:39:55 +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
Johannes Marbach
ab98268901
Fix caret jump when backspacing into empty line at beginning of editor (#11128)
Fixes: vector-im/element-web#22335
2023-06-23 15:24:05 +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
Michael Telatynski
7b3a4e556a
Conform more of the codebase to strictNullChecks (#11100) 2023-06-22 14:39:36 +01: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
767cd628f9
Consider the unthreaded read receipt for Unread dot state (#11117)
* Consider the unthreaded read receipt for Unread dot state also

* Add tests

* Fix strict types
2023-06-21 15:07:16 +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
Richard van der Hoff
8570f16e31
Fix access to deprecated methods in SetupEncryptionStore (#11107)
* Fix access to deprecated methods in `SetupEncryptionStore`

* Updte tests

* more tests
2023-06-19 22:20:14 +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