Commit Graph

1762 Commits

Author SHA1 Message Date
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
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 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
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
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
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
Michael Telatynski
3c267f9aa4
Update snapshots 2024-09-24 10:53:44 +01:00
Michael Telatynski
3620c5ac62
Merge branch 'develop' into t3chguy/wat/230.1 2024-09-24 10:34:36 +01:00
David Baker
9aa09d4b15
Maybe fix flakey AddRemoveThreepid test (#81)
I have no idea why this is flaking. There are warnings about
things not being wrapped in act() which may be relevant... this makes
the warnings happy, although apparently should not be necessary.
https://github.com/testing-library/user-event/discussions/906 and
https://github.com/testing-library/user-event/issues/497 are
depressing reading (making the versions the same didn't help). I think
my conclusion might be to do this until we're able to upgrade to the
latest testing-library, then re-evaluate.

It still may or may not fix the flake.
2024-09-23 08:29:24 +00:00
David Langley
1f5571062e
Mobile registration optimizations and tests (#62)
* Mobile registration optimizations

- don't autocaptialize or autocorrect on username field
- show each password field in their own row
- improve position of tooltip on mobile so that it's visible

* Use optional prop rather than default prop.

* Redirect to welcome screen if mobile_registration is requested but not enabled in the config.

* autocorrect value should be "off"

* Add unit tests for mobile registration

* Fix test typo

* Fix typo
2024-09-20 11:24:39 +00:00
Florian Duros
fe657027bd
Update to use non deprecated methods to decode recovery key (#54)
* Replace `MatrixClient.keyBackupKeyFromRecoveryKey` by `decodeRecoveryKey`

* Replace `MatrixClient.isValidRecoveryKey` by local check with `decodeRecoveryKey`

* Replace old `decodeRecoveryKey` import

* Remove `matrix-js-sdk/src/crypto/recoverykey` import of  eslint exception

* Add tests for `RestoreKeyBackupDialog`
2024-09-19 15:39:20 +00:00
Florian Duros
4776f87775
Ignore chat effect when older than 48h (#48)
* Ignore effect later than 48h

* Add tests for `EffectsOverlay-test.tsx`
2024-09-19 09:39:32 +00:00
Michael Telatynski
7feb5a0b49
Merge branch 'develop' into t3chguy/wat/230.1 2024-09-18 11:21:55 +01:00
Florian Duros
13e67ae0eb
Add Release announcement for the pinning message list (#46)
* Add RA for the pinning message list

* Update RoomSummaryCard-test.tsx snapshot

* Update RA labels
2024-09-18 09:26:17 +00:00
Florian Duros
59852773ad
Unlabs feature pinning (#22) 2024-09-16 14:51:59 +00:00
Michael Telatynski
be59791db1
Add support for org.matrix.cross_signing_reset UIA stage flow (#34)
* Soften UIA fallback postMessage check to work cross-origin

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

* Do the same for the SSO UIA flow

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

* Add support for `org.matrix.cross_signing_reset` UIA stage flow

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

* Check against MessageEvent::source instead

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

* i18n

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

* Add tests

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

* Remove protected method

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-09-13 11:49:19 +00:00
Michael Telatynski
8044ce4c01
Fix tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-09-13 12:34:15 +01:00
Florian Duros
6b384fe9c1
Fix huge usage bandwidth and performance issue of pinned message banner. (#37)
* Return only the first 100 pinned messages

* Execute pinned message 10 by 10
2024-09-13 07:47:22 +00:00
Will Hunt
eae9d9e248
Add timezone to user profile (#20)
* [create-pull-request] automated change (#12966)

Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>

* Add timezone to right panel profile.

* Add setting to publish timezone

* Add string for timezone publish

* Automatically update timezone when setting changes.

* Refactor to using a hook

And automatically refresh the timezone every minute.

* Check for feature support for extended profiles.

* lint

* Add timezone

* Remove unintentional changes

* Use browser default timezone.

* lint

* tweaks

* Set timezone publish at the device level to prevent all devices writing to the timezone field.

* Update hook to use external client.

* Add test for user timezone.

* Update snapshot for preferences tab.

* Hide timezone info if not provided.

* Stablize test

* Fix date test types.

* prettier

* Add timezone tests

* Add test for invalid timezone.

* Update screenshot

* Remove check for profile.

---------

Co-authored-by: ElementRobot <releases@riot.im>
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
2024-09-12 13:18:25 +00:00
Florian Duros
f31776378d
Reverse pinned message list (#19) 2024-09-12 12:43:07 +00:00
David Baker
a701e3afd7
Add config option to force verification (#29)
* Add config option to force verification

If this is set, users will not have the option to skip verification
on login (they will still be able to reload and continue unverified,
currently). Default off.

* Test for complete security dialog

* I hadn't set up prettier
2024-09-11 20:55:00 +00:00
Florian Duros
07125f554d
Remove release announcement of new header (#23) 2024-09-11 09:17:44 +00:00
David Langley
491f0cd08a
Change license (#13)
* Copyright headers 1

* Licence headers 2

* Copyright Headers 3

* Copyright Headers 4

* Copyright Headers 5

* Copyright Headers 6

* Copyright headers 7

* Add copyright headers for html and config file

* Replace license files and update package.json

* Update with CLA

* lint
2024-09-09 13:57:16 +00:00
David Baker
9601be583b Update tests 2024-09-06 14:16:25 +01:00
Florian Duros
5bfbca9eb0
Migrate all pinning checks and actions into PinningUtils (#12964) 2024-09-05 14:37:24 +00:00
Florian Duros
1e3320da1e
Pinned message list: prevent sender name to overflow pinned event tile (#12947)
* Prevent sender name to overflow pinned event tile

* Add tooltip to display the sender name
2024-09-04 09:45:18 +00:00
Florian Duros
60fe70b3cc
Add a prefix to file, poll, image, video and audio in the pinned message banner (#12950)
* Move event preview to its own component

* Remove unused parameter

* Add prefix to file, audio, video and image in the pinned message banner

* Add prefix to poll in the pinned message banner

* Add tests
2024-09-04 09:07:19 +00:00