Commit Graph

2250 Commits

Author SHA1 Message Date
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
Kerry
9080f3dd55
await promises (#10992) 2023-05-28 22:19:37 +00:00
Andy Balaam
67313743fc
Fall back to receipt timestamp if we have no event (react-sdk part) (#10974) 2023-05-26 14:14:47 +00:00
Richard van der Hoff
810b8ff6d7
Update references to QrCodeEvent, SasEvent and VerificationEvent (#10991)
* Basic test for IncomingSasDialog

* Basic test for VerificationPanel

* Replace references to IGeneratedSas and ISasEvent

* Some secret references to the callbacks types

* Update references to `QrCodeEvent`, `SasEvent` and `VerificationEvent`
2023-05-26 09:29:32 +00:00
Kerry
530197bfcd
Move session manager out of beta (#10968)
* remove old device manager

* undo type fix for cypress crypto

* update test case
2023-05-26 01:58:28 +00:00
Kerry
e326526c10
set correct action for view device list button (#10979) 2023-05-25 22:44:40 +00:00
Kerry
d0d9a36d07
Use semantic headings in user settings - account (#10972)
* account password section

* account email and phone numbers

* update cypress selectors
2023-05-25 22:42:01 +00:00
Richard van der Hoff
5593872b7a
Fix display of devices without encryption support in Settings dialog (#10977)
* Update tests to demonstrate broken behaviour

* Fixes and comments

* Remove exception swallowing

This seems like it causes more problems than it solves.
2023-05-25 16:12:01 +00:00
Michael Telatynski
796ed35e75
Refactor SlashCommands to not use MatrixClientPeg (#10905) 2023-05-25 16:29:48 +01:00
Michael Telatynski
f52fab39fc
Use aria descriptions instead of labels for TextWithTooltip (#10952)
* Use aria descriptions instead of labels for TextWithTooltip

to prevent clobbering the reading of the content

* Update snapshot

* Fix snapshots

* Iterate

* Update snapshots

* delint
2023-05-25 08:42:09 +00:00
Michael Telatynski
f4a265b2c7
Use grapheme-splitter instead of lodash for saving emoji from being ripped apart (#10976)
* Use grapheme-splitter instead of lodash for saving emoji from being ripped apart

* Move to a more appropriate place

* Add tests and improve types
2023-05-25 08:32:20 +00:00
Michael Telatynski
277a3c0146
Conform more of the codebase to strict typescript (#10841) 2023-05-25 09:39:23 +01:00
Kerry
02bf39cc72
Add basic unit test setup for MatrixChat (#10971)
* mock enough things to get to welcome page

* lint

* add simple test for view room settings action

* fussy spacing

* some strict fixes
2023-05-25 02:35:22 +00:00
Suguru Hirahara
0c30f0c838
Simplify nodes on ThirdPartyMemberInfo (#10889)
* Remove mx_MemberInfo_profileField

* Merge mx_MemberInfo_profile with mx_MemberInfo_container

* Remove redundant div elements

* Update a Jest snapshot
2023-05-24 08:28:15 +00:00