Commit Graph

3236 Commits (baaed75c4b722a5670a2414d5ab777066523195c)

Author SHA1 Message Date
Michael Telatynski cd7cf86b96
Remove AccountPasswordStore and related flows (#28750)
* Remove AccountPasswordStore and related flows

As they are no longer needed since MSC3967

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Improve coverage

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update src/CreateCrossSigning.ts

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

* Update comment

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-12-19 11:55:05 +00:00
renovate[bot] 9099338af8
Update dependency typescript to v5.7.2 (#28565)
* Update dependency typescript to v5.7.2

* Fix types

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix types

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-19 00:09:12 +00:00
Florian Duros 117bee787f
Fix url preview display (#28765) 2024-12-18 16:42:37 +00:00
Michael Telatynski 95c879c9e5
Move room header info button to right-most position (#28754)
* Move room header info button to right-most position

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshot

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-18 09:55:59 +00:00
David Baker 980b922348
Enable key backup by default (#28691)
* Factor out crypto setup process into a store

To make components pure and avoid react 18 dev mode problems due
to components making requests when mounted.

* fix test

* test for the store

* Add comment

* Enable key backup by default

When we set up cross signing, so the key backup key will be stored locally along with the cross signing keys until the user sets up recovery (4s). This will mean that a user can restore their backup if they log in on a new device as long as they verify with the one they registered on.

Replaces https://github.com/element-hq/element-web/pull/28267

* Fix test

* Prompt user to set up 4S on logout

* Fix test

* Add playwright test for key backup by default

* Fix imports

* This isn't unexpected anymore

* Update doc

* Fix docs and function name on renderSetupBackupDialog()

* Use checkKeyBackupAndEnable

* Docs for setup encryption toast

* Also test the toast appears

* Update mock for the method we use now

* Okay fine I guess we need both

* Swap here too

* Fix comment & doc comments
2024-12-17 14:50:48 +00:00
Florian Duros 2aa72bb40b
Update `@vector-im/compound-web` to `7.5.0` (#28700)
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2024-12-11 19:35:59 +00:00
David Baker a755e399cf
Change to en-US locale for date tests (#28723)
* Change to en-US locale for date tests

As per comment. Fixes the tests.

* Spell locale right

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>
2024-12-11 19:00:24 +00:00
David Baker cf3bdbdc7a
Fix Read Receipt Test (#28719)
* Update test snapshot

as the date formatting appears to have gained a comma, and somehow
got through the merge tests on the dependency bump.

* Actually this was the problem
2024-12-11 14:25:56 +00:00
David Baker b330de5d6e
Factor out crypto setup process into a store (#28675)
* Factor out crypto setup process into a store

To make components pure and avoid react 18 dev mode problems due
to components making requests when mounted.

* fix test

* test for the store

* Add comment
2024-12-11 13:10:27 +00:00
Michael Telatynski 01304439ee
Make tsc faster again (#28678)
* Stash initial work to bring TSC from over 6 mins to under 1 minute

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Stabilise types

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix incorrect props to AccessibleButton

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Swap AccessibleButton element types to match the props they provide

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Changed my mind, remove spurious previously ignored props

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-06 17:49:32 +00:00
David Baker c659afa8db
Rename CreateCrossSigningDialog to InitialCryptoSetupDialog (#28658)
* Rename CreateCrossSigningDialog to InitialCryptoSetup

because it will soon encompass things other than just creating cross
signing.

* Fix name & tests

* Fix import

* Remove code creating key backup

Because this was split out from my key backup by default PR

* Fix comment

* Convert to named export
2024-12-06 10:26:26 +00:00
Florian Duros dbdb23f6bc
Notify to resize the timeline when the pinned message banner is displayed or hidden (#28654) 2024-12-05 16:11:40 +00:00
Michael Telatynski 085854b125
Merge pull request #28626 from element-hq/t3chguy/web-friendly-buffers
Remove usages of Buffer so we don't need to ship the polyfill
2024-12-04 22:10:30 +00:00
Florian Duros 5a418f3f19
Fix font & spaces in settings subsection (#28631)
* Fix settings header

* Fix gap between subsection

* Update tests

* Update e2e tests

* Update snapshots
2024-12-04 14:11:02 +00:00
Michael Telatynski c1838b34b6
Merge branch 'develop' into t3chguy/web-friendly-buffers 2024-12-04 11:34:13 +00:00
Michael Telatynski d0fea745bb
Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-03 17:41:28 +00:00
Michael Telatynski f3ef9e6602
Update test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-03 17:38:24 +00:00
Florian Duros d2acce1221
Remove manual device verification which is not supported by the new cryptography stack (#28588)
* Remove call of `MatrixClient.setDeviceVerified`

* Replace usage of deprecated crypto events

* Replace deprecated imports

* Remove legacy button in `UntrustedDeviceDialog`

* Review fixes

* Add tests

* Fix doc
2024-12-03 15:26:37 +00:00
Florian Duros b72c053d1a
Add `Close` tooltip to dialog (#28617)
* Add `Close` tooltip to dialog

* Update snapshots
2024-12-03 14:25:06 +00:00
Florian Duros 0429809c00
New UX for Share dialog (#28598)
* New UX for `ShareDialog`

* Use new named import

* Rewrite tests

* Add e2e tests

* Use `box-sizing` for social buttons

* Update e2e tests
2024-12-02 18:10:17 +00:00
Michael Telatynski 84709df3c9
Remove remaining reply fallbacks code (#28610)
* Remove remaining reply fallbacks code

as MSC2781 has been merged

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-02 13:13:12 +00:00
Michael Telatynski 00aadf1580
Merge pull request #28538 from element-hq/t3chguy/fix/20721 2024-12-02 11:23:18 +00:00
Michael Telatynski d8ebc68aa8
Remove abandoned Voice Broadcasts labs flag (#28548)
* Remove abandoned Voice Broadcasts labs flag

Any existing voice broadcasts will be shown as a series of voice messages which will sequence play as normal

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove dead code

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-02 10:53:27 +00:00
Michael Telatynski 2099aaa663
Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-02 10:29:04 +00:00
Florian Duros 6d8cbf39f5
Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `EventTile.tsx` (#28510)
* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `EventTile.tsx`

* Use `roomContext.isRoomEncrypted`
2024-12-02 10:20:13 +00:00
Michael Telatynski b87437d439
Improve performance of RoomContext in RoomHeader (#28574)
* Improve performance of RoomContext in RoomHeader

This allows a component to subscribe to only part of the RoomContext so they do not need to re-render on every single change

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Prettier

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add comment

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-02 09:49:52 +00:00
renovate[bot] 418f121f96
Update all non-major dependencies (#28556)
* Update all non-major dependencies

* Prettier

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-02 09:39:36 +00:00
Michael Telatynski 351774d3e3
Merge branch 'develop' into t3chguy/fix/20721 2024-12-02 09:22:51 +00:00
Michael Telatynski 70f898c71d
Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-02 09:13:33 +00:00
Michael Telatynski 95175caf0c
Remove redundant MSC implementation for io.element.rendezvous (#28583)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-28 08:39:51 +00:00
Florian Duros 08418c16c9
Remove `Features.RustCrypto` (#28582) 2024-11-27 16:56:20 +00:00
Michael Telatynski 1bee3becfb
Merge branch 'develop' of https://github.com/vector-im/element-web into t3chguy/fix/20721 2024-11-27 14:53:20 +00:00
Michael Telatynski 3dbcb5efa3
Merge branch 'develop' of https://github.com/vector-im/element-web into dbkr/stateafter
# Conflicts:
#	test/unit-tests/components/structures/RoomView-test.tsx
#	test/unit-tests/components/structures/TimelinePanel-test.tsx
2024-11-27 10:47:35 +00:00
renovate[bot] af3a9777e8
Update dependency caniuse-lite to v1.0.30001684 (#28559)
* Update dependency caniuse-lite to v1.0.30001684

* Update tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-27 09:38:01 +00:00
Florian Duros af846f8be9
Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in RoomView (#28278)
* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in RoomView

* Add `isRoomEncrypted` to room

* Update e2eStatus and urlPreview when isRoomEncrypted is computed

* Fix e2e test

* Add tests when user verification change

* Reduced abusive timeout in e2e test
2024-11-26 21:34:32 +00:00
renovate[bot] df7703a4a5
Update linkify to v4.1.4 (#28560)
* Update linkify to v4.1.4

* Fix types

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-26 18:11:39 +00:00
Hubert Chathi 85711be352
Show the correct shield status in tooltip for more conditions (#28476)
* Add support for new shield codes in JS SDK

* change string used for shield message

* fix test
2024-11-26 16:00:52 +00:00
Florian Duros 2ac2bae4fa
Add spinner when room encryption is loading in room settings (#28535) 2024-11-26 09:43:21 +00:00
Michael Telatynski 3f221891f7
Remove space-specific right panel store handling
This is no longer needed as the right panel always corresponds to the currently viewed room/space only.

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-25 17:29:32 +00:00
Florian Duros ede91bf921
Use `CryptoApi.getKeyBackupInfo` instead of deprecated `MatrixClient.getKeyBackupVersion` (#28450)
* Use `CryptoApi.getKeyBackupInfo` instead of deprecated `MatrixClient.getKeyBackupVersion`

* Review changes

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-25 09:30:42 +00:00
Hubert Chathi c2ce7dbc5e
Display a warning when an unverified user's identity changes (#28211)
* display a warning when an unverified user's identity changes

* use Compound and make comments into doc comments

* refactor to use functional component

* split into multiple hooks

* apply minor changes from review

* use Crypto API to determine if room is encrypted

* apply changes from review

* change initialisation status to a tri-state rather than a boolean

* fix more race conditions, and apply changes from review

* apply changes from review and switch to using counter for detecting races

* Remove outdated comment

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

* fix test

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-11-21 20:31:29 +00:00
Michael Telatynski eddaf7c47e
Swap out Twitter link for Mastodon on auth footer (#28508)
* Swap out Twitter link for Mastodon on auth footer

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshots & screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-21 10:59:43 +00:00
Michael Telatynski 95630f525f
Remove usage of legacyRoot in RTL tests (#28485)
* Remove usage of legacyRoot in RTL tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-20 18:09:51 +00:00
Florian Duros d5c111f656
Rework `UrlPreviewSettings` to use `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` (#28463)
* Rework `UrlPreviewSettings` to use `MatrixClient.CryptoApi.isEncryptionEnabledInRoom`

* Handle loading state

* Update `@vector-im/compound-web` to have `InlineSpinner`

* Use `InlineSpinner` instead of a loading text.
2024-11-20 17:08:34 +00:00
Florian Duros 5cdcf44b6f
Second batch: Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` (#28466)
* Add `asyncFilter`

* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `MemberListStore.tsx`

* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `EventIndex.tsx`

* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `SendMessageComposer.tsx`

* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `ScalarMessaging.ts`

* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `RolesRoomSettingsTab.tsx`

* Add reject doc to `asyncFilter`

* Reverse `MemberListStore.loadMembers` condition

* Remove async for `ScalarMessaging.ts`

* Display permission section only after `isEncrypted` is computed

* Display composer only after `isEncrypted` is computed

* Revert "Display composer only after `isEncrypted` is computed"

This reverts commit 4d4e037391.

* Revert "Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `SendMessageComposer.tsx`"

This reverts commit 6bf06da02c.
2024-11-20 14:27:09 +00:00
Michael Telatynski ca33d9165a
Migrate to React 18 createRoot API (#28256)
* Migrate to React 18 createRoot API

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Discard changes to src/components/views/settings/devices/DeviceDetails.tsx

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Attempt to stabilise test

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* legacyRoot?

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Improve coverage

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Improve coverage

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-20 13:29:23 +00:00
Florian Duros d4ab40990b
First batch: Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` (#28242)
* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `DeviceListener.ts`

* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `Searching.ts`

* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `SlidingSyncManager.ts`

* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `EncryptionEvent.tsx`

* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `ReportEventDialog.tsx`

* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `RoomNotifications.tsx`

* Fix MessagePanel-test.tsx

* ReplaceReplace `MatrixCient..isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `shouldSkipSetupEncryption.ts`

* Add missing `await`

* Use `Promise.any` instead of `asyncSome`

* Add `asyncSomeParallel`

* Use `asyncSomeParallel` instead of  `asyncSome`
2024-11-19 10:09:25 +00:00
Hubert Chathi 0ae74a9e1f
Reset cross-signing before backup when resetting both (#28402)
* reset cross-signing before backup when resetting both

* add test for AccessSecretStorageDialog

* fix unit test
2024-11-19 03:17:24 +00:00
Hubert Chathi ed9795137b
Listen to events so that encryption icon updates when status changes (#28407)
* listen to events so that encryption icon updates when status changes

* remove debugging message
2024-11-18 23:27:34 +00:00
Michael Telatynski 4f8e9eb9ac
Standardise icons using Compound Design Tokens (#28217)
* De-duplicate icons using Compound Design Tokens

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* delint

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Deduplicate more icons using Compound Design Tokens

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update icon

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Discard changes to res/css/structures/_RoomSearch.pcss

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Discard changes to res/fonts/Open_Sans/LICENSE.txt

* Discard changes to res/css/views/elements/_CopyableText.pcss

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-18 15:47:15 +00:00