Commit Graph

3116 Commits (8f353537589ca5e738dd4225b5f7ca9337f091e8)

Author SHA1 Message Date
David Baker cb383efb42
Port the flaky add/remove 3pid test to playwright (#28226)
Fixes https://github.com/element-hq/element-web/issues/28160
2024-10-17 15:45:56 +00:00
renovate[bot] 9a6dac00fc
Update browserslist (#28199)
* Update browserslist

* 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-10-17 08:50:45 +01:00
Florian Duros 7236953d07
Remove references to `MatrixClient.crypto` (#28204)
* Remove `VerificationExplorer`

* Remove `remakeolm` slash command

* Remove call to `crypto.cancelAndResendAllOutgoingKeyRequests`

* Remove crypto mock in `LoginWithQR-test.tsx`

* Remove `StopGadWidgetDriver.sendToDevice`

* Remove remaining mock
2024-10-17 08:50:44 +01:00
Florian Duros b483fdda35
Use new `CryptoEvent` import (#128)
* Use new `CryptoEvent` import

* Remove remaining old `CryptoEvent` import

* Replace `import` by `import type`
2024-10-16 12:56:10 +01:00
Florian Duros 571ada37a7
Replace `MatrixClient.isCryptoEnabled` by `MatrixClient.getCrypto` (#140)
* Replace `MatrixClient.isCryptoEnabled` by `MatrixClient.getCrypto`

* Cast `cryptoEnabled` as `boolean`

* Fix `MatrixChat-test`

(cherry picked from commit 950ab1940bfcea9443f03284f9175d319c13a44c)
2024-10-16 09:42:18 +01:00
Michael Telatynski 146968da2c
Deduplicate more icons using Compound Design Tokens (#132)
* Deduplicate more icons using Compound Design Tokens

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>
(cherry picked from commit 7448bd52e2ff354917d6e5f769ca052961c13aa0)
2024-10-16 09:42:03 +01:00
Michael Telatynski f78f6b3a9a
Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-16 09:09:41 +01:00
Michael Telatynski 68c0c4c833
Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-15 18:29:37 +01:00
Michael Telatynski 67659ab353
Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-15 16:22:11 +01:00
Michael Telatynski f0ee7f7905
Merge matrix-react-sdk into element-web
Merge remote-tracking branch 'repomerge/t3chguy/repomerge' into t3chguy/repo-merge

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-15 15:32:09 +01:00
Michael Telatynski b084ff2313
Prepare for repo merge
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-15 11:35:21 +01:00
Michael Telatynski d58c9fa7f6
Always show link new device flow even if unsupported (#147)
* Always show link new device flow even if unsupported

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

* Iterate

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

* Update screenshot

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-15 09:18:57 +00:00
Michael Telatynski d9e943d9a8
Update to Compound v7 (#151)
* Update to Compound v7

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

* Update snapshots

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

* Update test

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-15 08:56:43 +00:00
Florian Duros bce02634f7
Replace `MatrixClient.prepareToEncrypt` by `MatrixClient.getCrypto.prepareToEncrypt` (#146) 2024-10-15 07:50:38 +00:00
Florian Duros 503d9004d1
Replace `MatrixClient.userHasCrossSigningKeys` by `MatrixClient.getCrypto.userHasCrossSigningKeys` (#148) 2024-10-15 07:50:26 +00:00
Michael Telatynski 07506253f9
Update design of files list in right panel (#144)
* Update design of files list in right panel

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

* Make i18n script happier

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

* Improve coverage

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

* Improve coverage

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

* Improve coverage

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

* Discard changes to src/components/structures/MessagePanel.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>

* Update tests

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

* Fix flaky screenshot test

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

* Update screenshot

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-14 18:08:05 +00:00
Michael Telatynski d770e2afcc
Deduplicate icons using Compound Design Tokens (#150)
* Deduplicate icons using Compound Design Tokens

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>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-14 16:54:15 +00:00
R Midhun Suresh 786a0286cf
Upgrade compound also in element-web (#28157) 2024-10-14 17:11:54 +01:00
R Midhun Suresh 91e84f7951
Upgrade to latest compound-web package (#84)
* Upgrade to latest compound-web package

* Use a custom render function for jest tests

This way we don't need to manually wrap our components with
<TooltipProvider>

* Pin wrap-ansi to fix broken yarn install

* Add playwright helper to find tooltip from element

and use it in the failing test

* Exclude floating-ui divs/spans from axe testing

This is rendered outside .MatrixChat by compound and contains all the
tooltips.

* Wrap outermost components with TooltipProvider

* Remove onChange and use onSelect for toggle

* Fix jest tests and update snapshots

* Use vector-im/matrix-wysiwig

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-14 16:11:58 +00:00
Florian Duros 3bc0439fd2
Replace `MatrixClient.checkSecretStorageKey` by `MatrixClient.SecretStorage.checkKey` (#142) 2024-10-14 15:08:42 +00:00
David Langley c71dc6b0f8
Upgrade emojibase-bindings and remove local handling of emoticon variations (#127)
* Updgrade emojibase-bindings and remove local handling of emoticon variations

* bump bindings to fix issue of mission emojis with version == 0

* update lockfile

* test emoji variation in RTE
2024-10-10 14:52:45 +00:00
David Baker 3a59556749
Revert #124 and #135 (#139)
This seems to be causing a lot of weirdness, presumably because there's
another missing thing like in #135, but I don't know what it might be and
it feels like it might take a while to find. Backing these changes out
to fix develop while we sort it out.

Fixes https://github.com/element-hq/element-web/issues/28179
2024-10-10 14:08:43 +00:00
David Baker 5f113c4db0
Fix bell icons on room list hover being black squares (#135)
* Fix bell icons on room list hover being black squares

The EchoStore wasn't being set up and therefore missed the client being
injected.

Patch from @t3chguy.

* Fix tests

...by mocking out createClient so it doesn't try to start a real client.

* More mocks

* Don't need this anymore either
2024-10-09 22:44:10 +00:00
Michael Telatynski df4a223eb6
Deduplicate media & voip icons using Compound Design Tokens (#129)
* Deduplicate media & voip icons using Compound Design Tokens

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-10-08 12:00:37 +00:00
Michael Telatynski 197168b3ba
Refactor stores and their relationship to the MatrixClientPeg (#124)
* Refactor stores and their relationship to the MatrixClientPeg

to avoid import cycles and webpack weirdness

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-10-08 09:12:21 +00:00
David Langley a0cb9470cc
Update to @vector-im/matrix-wysiwyg (#125) 2024-10-07 14:56:34 +00:00
Tulir Asokan 5fbc5af884
Add support for rendering media captions (#43)
* Add support for rendering media captions

* Run prettier

* Deduplicate body props

* Add basic test

* Fix import order in test

* Fix test?
2024-10-04 13:58:22 +00:00
Michael Telatynski 26b0e83ac4
Replace composer icons with Compound variants (#123)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-04 12:42:23 +00:00
Michael Telatynski 7ef8663388
Prefer wrapped Compound React icon assets (#122)
* Prefer wrapped Compound React icon assets

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

* Add eslint rule for CDT svg imports

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

* Update snapshots

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

* Fix height

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

* Iterate

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-10-04 12:42:15 +00:00
Michael Telatynski 0a9b4aecd3
Tweak default right panel size to be 320px except for maximised widgets at 420px (#110)
* Add extra buttons to room summary card

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

* Remove right panel tabs in favour of X button on each panel

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

* Update room summary card header to align close button correctly

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

* Fix typo in pinned messages heading

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

* Update snapshots

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

* Update tests

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

* Iterate

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

* Update snapshots

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

* Update screenshot

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

* Improve coverage

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

* Tweak default right panel size to be 320px except for video rooms/maximised widgets at 420px

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

* Iterate

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

* Update tests

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

* Update snapshots

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

* Track panel resizing in analytics

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

* Fix import cycle

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

* Update screenshots

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

* Improve coverage

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

* Fix tests

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

* Update snapshot

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

* Update test/components/structures/MainSplit-test.tsx

Co-authored-by: David Baker <dbkr@users.noreply.github.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2024-10-04 09:41:00 +00:00
Florian Duros 70418f8f3d
Add a pinned message badge under a pinned message (#118)
* Add pinned message badge for Modern Layout

* Add Bubble layout support

* Add thread support

* Add irc support

* Rename event tile badges

* Don't render footer when there is no reactions

* Add a test for `PinnedMessageBadge.tsx`

* Add a test in EventTile-test.tsx

* Add e2e test
2024-10-04 07:11:37 +00:00
Michael Telatynski 2dbaf00e71
Ditch right panel tabs and re-add close button (#99)
* Add extra buttons to room summary card

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

* Remove right panel tabs in favour of X button on each panel

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

* Update room summary card header to align close button correctly

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

* Fix typo in pinned messages heading

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

* Update snapshots

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

* Update tests

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

* Iterate

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

* Update snapshots

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

* Update screenshot

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

* Improve coverage

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

* i18n

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

* Fix base card title colours

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-10-03 08:59:41 +00:00
David Baker 67cb8b7590
Force verification even for refreshed clients (#44)
* Force verification even for refreshed cients

Set a flag on login to remember that the device needs to be verified
so that we don't forget if the user refreshes the page, but still allow
user with an existing unverified session to stay logged in.

* Hopefully make matrixchat tests pass?

Much, much tweaking to make the matrixchat tests pass again. Should
hopefully make them a bit more solid in general with judicious use of
waitFor rather than flushPromises(). Also lots of fun to stop the state
bleeding between tests.

* Manual yarn.lock manipulation

to hopefully resolve infinite package sadness

* Make final test pass(?)

Mock out the createClient method to return the same client, because
we've mocked the peg to always return that client, so if we let the
code make another one having still overridden the peg, everything becomes
cursed.

Also mock out the autodiscovery stuff rather than relying on fetch-mock.

* another waitFor

* death to flushPromises

* Put the logged in dispatch back

Actually it breaks all sorts of other things too, having fixed all the
MatrixChat tests (although this is useful anyway).

* Try displaying the screen in onClientStarted instead

* Put post login screen back in logged in

but move ready transition to avoid flash of main UI

* Rejig more in the hope it does the right thing

* Make hook work before push rules are fetched

* Add test for unskippable verification

* Add test for use case selection

* Fix test

* Add playwright test for unskippable verification

* Remove console log

* Add log message to log line

* Add tsdoc

* Use useTypedEventEmitter

* Remove commented code

* Use catch instead of empty then on unawaited promises

or in one case just await it because the caller was async anyway

* Add new mock
2024-10-03 08:55:06 +00:00
Michael Telatynski 9895a8fb4f
Disable ICE fallback based on well-known configuration (#111)
* Refactor MatrixClientBackedController.ts

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

* Disable ICE fallback based on well-known configuration

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

* Add tests

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-02 14:08:15 +00:00
Michael Telatynski 8a263ac1b0
Remove legacy room header and promote beta room header (#105)
* Remove legacy room header and promote beta room header

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

* Tidy up

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

* Remove unused component

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

* Prune i18n

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-02 12:10:58 +00:00
Michael Telatynski 5d9996c281
Use Compound close icon in favour of mishmash of x/close icons (#108)
* Use Compound close icon in favour of mishmash of x/close icons

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

* Update snapshots

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

* Remove stale CSS

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>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-02 10:06:17 +00:00
Florian Duros c2c316831a
Allow to unpin redacted event (#98) 2024-10-02 08:23:22 +00:00
Florian Duros 33198cca35
Use new AES functions (#97) 2024-10-01 14:12:46 +00:00
Richard van der Hoff 36fae00cf3
Change device isolation mode to set `errorOnVerifiedUserProblems` to `false` (#104)
https://github.com/element-hq/matrix-react-sdk/pull/92 changed the default mode
for encryption to throw an error when sending a message and the room contains either:
 - a verified user with an unverified device
 - a verifeid user who has changed their identity.

We're not really ready for this (we lack the UI to deal with it), so roll that
back.
2024-09-30 20:33:23 +00:00
Michael Telatynski 33c900e307
Remove right panel toggling behaviour on room header buttons (#100)
* Remove right panel toggling behaviour on room header buttons

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

* Remove stale test

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

* Fix tests

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-09-30 16:36:24 +00:00
Michael Telatynski fe402e28bb
Fix flaky mobile registration tests (#102)
* Fix flaky mobile registration tests

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

* Discard changes to src/theme.ts

* Add comment

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-09-30 16:34:39 +00:00
Robin bd793a0970
Allow joining calls and video rooms without enabling the labs flags (#95)
Since Element Call has now reached production on Element X, Element Web needs to be able to at least participate in group calls. Starting a group call or creating a video room will still require the labs flags, for now.

Note that Jitsi-based video rooms are also affected by this change. This is not because we intend to delabs them (rather, we intend to get rid of them in favor of Element Call video rooms), but because it's easiest to handle both video room variants consistently.
2024-09-30 14:07:53 +00:00
Richard van der Hoff f28f1d998f
Improve error display for messages sent from insecure devices (#93)
* Add labs option to exclude unverified devices

Add a labs option which will, when set, switch into the "invisible crypto"
mode of refusing to send keys to, or decrypt messages from, devices that have
not been signed by their owner.

* DecryptionFailureBody: better error messages

Improve the error messages shown for messages from insecure devices.

* playwright: factor out `createSecondBotDevice` utility

* Playwright test for messages from insecure devices

* fixup! DecryptionFailureBody: better error messages

Use compound colour tokens, and add a background colour.

* fixup! DecryptionFailureBody: better error messages

Use compound spacing tokens
2024-09-30 12:39:25 +00:00
Richard van der Hoff be2c1fcf64
Add labs option to exclude unverified devices (#92)
Add a labs option which will, when set, switch into the "invisible crypto"
mode of refusing to send keys to, or decrypt messages from, devices that have
not been signed by their owner.
2024-09-30 10:29:14 +00:00
renovate[bot] 81192f6989
Update dependency typescript to v5.6.2 (#71)
* Update dependency typescript to v5.6.2

* Fix TS errors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
2024-09-26 14:25:49 +00:00
Michael Telatynski 34d1875534
Open room settings on room header avatar click (#88)
* Open room settings on room header avatar click

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

* Fix nested interactive elements aria fail

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

* Update things for a11y and update snapshots

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

* Fix tests

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

* Iterate tests

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-09-26 10:14:53 +00:00
Michael Telatynski e6404daf3c
Update test assertions
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-09-25 17:34:06 +01:00
Michael Telatynski 9e4348e8f1
Update test assertions
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-09-25 17:27:42 +01:00
Michael Telatynski dd7479accb
Merge branch 'develop' of github.com:element-hq/matrix-react-sdk into t3chguy/wat/230.1
# Conflicts:
#	src/components/views/settings/CryptographyPanel.tsx
#	test/components/views/settings/tabs/user/__snapshots__/SecurityUserSettingsTab-test.tsx.snap
2024-09-25 17:02:32 +01:00
Richard van der Hoff 2e895da39f
Crypto: fix display of device key (#86)
* CryptographyPanel: fix display of device key

* CryptographPanel: Fix HTML nesting

you're not supposed to put <tr> directly inside <table>; doing so causes
warnings.

* Update tests
2024-09-24 15:48:37 +00:00