* Update "your chats are backed up" copy
... in the Settings dialog (RecoveryPanel), and the "set up recovery" toast.
* Change labels on "set up recovery" UI
* Add help text to 'Allow key storage' toggle
* update playwright snapshots
The redaction guard compared the redacted event's id with itself, so any
redaction in the room dismissed the ringing toast. The test did not catch
it because its mock notification used "m.relation" instead of
"m.relates_to", so the call event was never actually referenced.
* Strip CSS module hashes from apps/web snapshots
shared-components and compound-web build their CSS module class names
with postcss-modules' default `_<class>_<hash of the stylesheet>_<line>`,
so any edit to a stylesheet renames every class in it and changes every
apps/web snapshot that renders it. Two unrelated PRs touching the same
stylesheet then always conflict in those snapshots.
Add a snapshot serializer, alongside the React useId one, that reduces
those names to `_<class>` in DOM and string snapshots. The shipped class
names keep their content hash, so two copies of the library loaded at
once (e.g. by a module) stay isolated.
Signed-off-by: David Langley <davidl@element.io>
* Update snapshots for the CSS module hash serializer
Signed-off-by: David Langley <davidl@element.io>
* Only strip CSS module hashes inside class attributes
The serializer ran its regex over the whole snapshot, so text or other
attributes shaped like a CSS module name would have been shortened too.
Restrict it to entries of `class="…"` lists, which is where DOM and HTML
string snapshots put class names, and match each entry whole.
String snapshots are now picked up by a cheap `class="` check, which also
removes the `lastIndex` reset the global regex needed.
Signed-off-by: David Langley <davidl@element.io>
* Explain the CSS module class regexes
Signed-off-by: David Langley <davidl@element.io>
* Strip CSS module hashes by splitting on underscores
Rather than matching the exact `_<class>_<hash>_<line>` shape, drop the
last two `_`-separated parts of any class that starts with `_` and has
all three parts. Simpler to read, and produces the same snapshots.
Signed-off-by: David Langley <davidl@element.io>
---------
Signed-off-by: David Langley <davidl@element.io>
The room guard in IncomingCallToast's CallStore listener was
'!roomId && roomId !== callRoomId', which never returns early, so any
room's call object being replaced or dropped (e.g. hanging up a call
in the PIP) dismissed every ringing toast.
* Update date for exclude insecure devices banner.
* Fix visual tests.
* Use a Link to avoid styling issues.
* update snaps
---------
Co-authored-by: Will Hunt <2072976+Half-Shot@users.noreply.github.com>
Co-authored-by: Half-Shot <will@half-shot.uk>
* Port GenericToast to a shared component
* Update imports of GenericToast
* Remove legacy styles
* update test ids
* Move from classes to testIds
* update snap
* update toasts
* Add a test for coverage
* Remove legacy Module & Customisation API
in favour of the new runtime modules system
* Delint
* Remove unused i18n string
* Fix tests
* Fix test
* Fix tests
* Iterate
* Fix bad merge
* Bump Module API version
* Bump module-api compatibility ranges
* Update docs
* Fix semver ranges
* Update test module API version
* Too many versions
* Too many versions again
* Remove redundant `forgotRecovery` argument from
`keyStorageOutOfSyncNeedsCrossSigningReset`.
* Do not force identity reset if user forgets recovery key
If we are missing the backup decryption key, and the user has forgotten the
recovery key, we do not need to reset the user's identity: it is adequate to
change the recovery key and create a new key backup.
We already support this for the "key storage out of sync" toast, but if the
user opens the encryption settings and clicks "forgot recovery key" on the
"storage out of sync" panel there, we currently force them to do an identity
reset.
Fixes: #35004
* Remove support for MSC3391 & MSC3852
As they were both rejected & closed.
Synapse already removed support for MSC3852 which means it already did nothing: https://github.com/element-hq/synapse/pull/19430
* Update snapshot
* Expose SDKContextClass via window for debugging
* Remove stores from window if they are exposed via sdkContext
* Avoid usages of global store instance where React context is accessible
* Remove more usages of singleton store getter in favour of contexts
* Remove more usages of singleton store getter in favour of contexts
* Fix tests by adding SDKContext.Provider
* Fix tests by adding SDKContext.Provider
* Fix tests by adding SDKContext.Provider
* Fix tests by adding SDKContext.Provider
* Fix tests
* Fix tests
* Fix tests
* Iterate
* Fix bad merge
* Iterate
* Fix tests
* Iterate
* Iterate
* Iterate
* Iterate
* Iterate
* Improve coverage
* Improve coverage
* Fix Notifier import cycle
* Fix tests
* Delint
* Iterate
* Handle SDKContextClass `client` initialisation internally
Rather than via MatrixChat - this is predominantly for Lifecycle tests as they don't use a MatrixChat and it doesn't make much sense for this component to own this state.
* Fix tests
* Iterate
* Improve coverage
* Improve coverage
* Fix bad merge
* Iterate
* Update button in incoming call toast to say 'Decline'
Rather than 'Ignore'. This change has been agreed with design since 'Ignore' did not properly communicate that clicking the button would inform the caller that you deliberately rejected their call.
* Update incoming call toast screenshots
* Update design of incoming call notifications
* Make toast show avatars of group call participants
* Further expand test coverage for call notifications
* Update screenshots
* Update screenshots
* Delete unused variables
* Upgrade Element Call to v0.19.2
For the new group call intents.
* Consolidate some branches
* Apply Compound spacing variables a little more
* Fix lints
* Exclude Element Call assets from being re-minified to fix build
* Update dependency @vector-im/compound-web to v9.2.1
* Update button sizes
* More button size updates
* Another button size
* Button size
* Snapshot updates
* Snapshots
* More sm/md
* More button size updates
* snapshot
* and one more from merging develop
* More snapshots
* Phantom typing
* yep, more snapshots
* More snapshots
* More snapshots
* Last ones?
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
* Set up the MatrixClient before each RecoveryPanelOutOfSync test
Without this, we can't override MatrixClient methods until we've called
`renderComponent`, which is awkward.
* Actually test that we load the decryption key in RecoveryPanelOutOfSync
It turns out the existing test didn't actually go down the expected code
path and call loadSessionBackupPrivateKeyFromSecretStorage.
* Reset key storage if restoring from Recovery encounters the wrong decryption key
Fixes https://github.com/element-hq/element-web/issues/31793
Depends on https://github.com/matrix-org/matrix-js-sdk/pull/5202
When we try to load the key storage decryption key from Recovery, but we
find that it does not match the public key of the current key storage
backup, create a new key storage backup.
mkdir apps/web/scripts
mv scripts/{cleanup.sh,ci_package.sh,copy-res.ts,deploy.py,package.sh} apps/web/scripts
And a couple of gitignore tweaks
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>