Commit Graph

2263 Commits (8cf1eb8cb63b45447a9caf9c4a41b89842363d7e)

Author SHA1 Message Date
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
Richard van der Hoff 889318d3a2
Speed up `waitForMember` if user already in room (#11110)
* Speed up `waitForMember` if user already in room

`waitForMember` waits for a user to join, or be invited, to a room. But if the
user is already in the room (ie, we miss the `NewMember` event), we end up
timing out after 1500ms.

We can save 1.5s here by returning immediately.

* fix strict type errors

* stfu SonarCloud
2023-06-19 14:11:25 +00: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
Janne Mareike Koschinski 97765613bc
Implement new model, hooks and reconcilation code for new GYU notification settings (#11089)
* Define new notification settings model

* Add new hooks

* make ts-strict happy

* add unit tests

* chore: make eslint/prettier happier :)

* make ts-strict happier

* Update src/notifications/NotificationUtils.ts

Co-authored-by: Robin <robin@robin.town>

* Add tests for hooks

* chore: fixed lint issues

* Add comments

---------

Co-authored-by: Robin <robin@robin.town>
2023-06-17 00:17:51 +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 dd46db4817
Use MatrixClientPeg::safeGet in src/{stores,hooks,components/structures}/* (#10988) 2023-06-15 15:11:49 +01: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
Germain 4243847f4f
Integrate compound design tokens (#11091)
* 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

* lintfix

* Use correct SpyInstance import

* Using npm build of design tokens
2023-06-14 15:49:14 +00: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
Florian Duros 127b542233
Use `crypto.isCrossSigningReady` in `CrossSigningPanel` (#11080) 2023-06-14 09:46:14 +00:00
Michael Telatynski ea0e9abc2b
Allow specifying help URLs in config.json (#11070)
* Allow specifying help URLs in config.json

* Fix test
2023-06-14 07:45:19 +00:00
Suguru Hirahara 0ce3664434
Conform to the naming policy - AppsContainer resizer (#11042)
* Add a snapshot to track AppTile in AppsDrawer

* Conform to the naming policy - AppsContainer resizer

* Nest 'mx_AppsContainer_resizer_container_handle' to enforce the style

- mx_AppsContainer_resizer
- mx_AppsContainer_resizer_container
- mx_AppsContainer_resizer_container_handle

* Rename "mx_AppsContainer_resizer" to "mx_AppsDrawer_resizer"

PersistentVResizer is defined by mx_AppsDrawer (see const "classes")
2023-06-13 11:13:07 +00:00
Kerry f7137b4cb4
cover more error cases in Login (#11073) 2023-06-13 03:25:21 +00:00
Kerry 41dfec20bf
add delegatedauthentication to validated server config (#11053) 2023-06-13 01:43:25 +00:00
Florian Duros d5d1ec775c
Use new api `CryptoApi.getCrossSigningStatus` in `CrossSigningPanel` (#11052)
* Use new api `CryptoApi.getCrossSigningStatus` in `CrossSigningPanel`

* Update `CrossSigningPanel-test.tsx`

* Update `publicKeysOnDevice`

* Fix `CryptoApi` import

* Fix strict type

* Fix tests

* Remove `crossSigningInfo` in `mockClientMethodsCrypto`

* Move matrix client initialization in `beforeEach`
2023-06-12 18:33:39 +00:00
alunturner e32823e5fe
Allow image pasting in plain mode in RTE (#11056)
* get rough funcitonality working

* try to tidy up types

* fix merge error

* fix signature change error

* type wrangling

* use onBeforeInput listener

* add onBeforeInput handler, add logic to onPaste

* fix type error

* bring plain text listeners in line with useInputEventProcessor

* extract common function to util file, move tests

* tidy comment

* tidy comments

* fix typo

* add util tests

* add text paste test
2023-06-12 11:28:00 +00:00
Richard van der Hoff 47ab99f908
remove references to `VerificationBase` (#10996) 2023-06-09 15:49:44 +00:00
maheichyk 53b42e3217
Show room options menu if "UIComponent.roomOptionsMenu" is enabled (#10365)
* Show room options menu if "UIComponent.roomOptionsMenu" is enabled

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

* Explicit type is removed.

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

---------

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
Co-authored-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
2023-06-09 12:33:54 +00:00
alunturner 53415bfdfe
Allow image pasting in rich text mode in RTE (#11049)
* add comments to rough first solution

* allow eventRelation prop to pass to both composers

* use eventRelation in image paste

* add image pasting to rich text mode of rich text editor

* extract error handling to function

* type the error handler

* add tests

* make behaviour mimic SendMessage

* add sad path tests

* refactor to use catch throughout

* update comments

* tidy up tests

* add special case and change function signature

* add comment

* bump rte to 2.2.2
2023-06-09 09:11:38 +00:00
Michael Telatynski a861a54fcd
Matrix matrix scheme permalink constructor not stripping query params (#11060) 2023-06-09 07:20:05 +00:00
Richard van der Hoff 34439ee652
Simplify references to `VerificationRequest` (#11045)
* Use new `VerificationRequest.getQRCodeBytes()`

* Use new `VerificationRequest.otherDeviceId`

* Remove references to `VerificationRequest.channel`

* Replace references to `VerificationRequest.{requesting,receiving}UserId`

Normally these are guarded by `request.initiatedByMe` so we can trivially
replace it with `request.otherUserId` or `client.getUserId()`. In one place we
actually need to apply some logic.

* increase test coverage

* Even more test coverage

* Even more test coverage
2023-06-07 14:43:44 +00:00
Robin ac2c9cef8d
Make group calls respect the ICE fallback setting (#11047) 2023-06-07 13:29:39 +00:00
Michael Weimann 1091e14a3d
Migrate broadcast MSC3912 redaction (#11014) 2023-06-07 13:24:01 +00:00
Richard van der Hoff 4c73903274
Use `getShowSasCallbacks()` and `getReciprocateQrCodeCallbacks()` (#11015)
* Use `getShowSasCallbacks()` and `getShowQrCodeCallbacks()`

... instead of type-casting

* Update method names

These methods got renamed in the js-sdk PR

* Fix strict typing errors
2023-06-07 13:05:23 +00:00
Michael Telatynski 2e68479577
Add config to skip widget_build_url for DM rooms (#11044)
* Add config to skip widget_build_url for DM rooms

* Add tests
2023-06-06 14:07:51 +00:00
Richard van der Hoff 2801afe570
Inline `VerificationRequest.{invalid,ready,started,done,cancelled}` (#11013)
* Inline `VerificationRequest.{invalid,ready,started,done,cancelled}`

These methods are all just shortcuts for checks on `phase`, so let's get rid of
them

* update test

* Add some more tests

* even more coverage

* fix tests
2023-06-06 08:27:53 +00:00
Florian Duros 68ebcd2956
Removed `DecryptionFailureBar.tsx` (#11027) 2023-06-05 15:02:20 +00:00
Michael Telatynski 6b46d6e4f8
Add MatrixClientPeg::safeGet and use it in tests (#10985) 2023-06-05 18:12:23 +01:00
Suguru Hirahara 43d9e30673
Fix fadein spinner placement on AppTileBody (#10970) 2023-06-01 15:17:28 +00:00
Michael Telatynski 21ffc50f1e
Pass around MatrixClients instead of using MatrixClientPeg (#10984)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-06-01 14:43:24 +01:00
Michael Telatynski b6b9ce3c46
When joining room in sub-space join the parents too (#11011)
* When joining room in sub-space join the parents too

* Fix joined state not updating on sync

* Add membership check

* Update tests

* Improve coverage

* Make TS happier

* Make TS happier
2023-06-01 12:35:47 +00:00
Michael Weimann ca53b11aa9
Apply `strictNullChecks` to `src/utils/local-room.ts` (#10915)
* Stricity local room

* Handle error
2023-06-01 11:55:26 +00:00
Michael Weimann b5727cb463
Include thread replies in message previews (#10631)
* Include thread replies to message previews

* Extend tests

* Fix type issue

* Use currentColor for thread icon

* Fix long room name overflow

* Update snapshots

* Fix preview

* Fix typing issue

* Fix type issues

* Tweak thread reply detection

* Extend tests

* Fix type issue

* Fix test
2023-06-01 07:53:48 +00:00
Kerry 143ffccb0a
Fix: server picker validates unselected option (#11020)
* add aria-label to default homeserver checkbox

* test ServerPickerDialog

* remove debug

* strict fixes

* dont validate unselected server field on ServerPickerDialog

* i18n
2023-06-01 01:08:44 +00:00
Kerry a28f44a075
OIDC: unit test ServerPickerDialog (#11019)
* add aria-label to default homeserver checkbox

* test ServerPickerDialog

* remove debug

* strict fixes

* use testid instead of aria-label

* i18n
2023-05-31 21:22:47 +00:00
Kerry e9a8f4a11d
Use semantic headings in space preferences (#11021)
* remove mx_SettingsTab_heading style

* use semantic headings in space preferences dialog

* remove unused settings style: mx_SettingsTab_subheading
2023-05-31 21:22:03 +00:00
Kerry ef8719aba7
unit test leave room action handler (#10982) 2023-05-30 22:46:08 +00:00
Kerry 7ef6e1b6f8
Use semantic headings in user settings - Ignored users (#11006)
* account password section

* account email and phone numbers

* update cypress selectors

* use settingsection for General section

* use semantic headings for profile settings

* fix show advanced spacing

* udpate snapshot

* use semantic headings in mjolnir settings

* remove debug

* unit test UI changes for mjolnir settings
2023-05-30 22:42:53 +00:00
Michael Telatynski 938aefc51c
Pass around MatrixClients instead of using MatrixClientPeg (#11000) 2023-05-30 10:36:34 +01:00
Kerry b35fb4fed2
Use semantic headings in user settings - profile (#10973)
* account password section

* account email and phone numbers

* update cypress selectors

* use settingsection for General section

* use semantic headings for profile settings

* fix show advanced spacing

* udpate snapshot
2023-05-29 01:36:09 +00:00
Kerry 520659242b
Fix spacing regression in user settings - roles & permissions (#10993)
* add content container to settingsfieldset

* fix spacing
2023-05-28 22:20:44 +00:00