* 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>
* [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>
* 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
* tokens.ts: improve documentation
Improve variable naming and documentation on the methods in `tokens.ts`.
* rename restoreFromLocalStorage
Since the session data isn't actually stored in localstorage, this feels like a
misleading name.
* Lifecycle: bail out if picklekey is missing
Currently, if we have an accesstoken which is encrypted with a picklekey, but
the picklekey has gone missing, we carry on with no access token at all. This
is sure to blow up in some way or other later on, but in a rather cryptic way.
Instead, let's bail out early.
(This will produce a "can't restore session" error, but we normally see one of
those anyway because we can't initialise the crypto store.)
* 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
* Fix read receipt animation
The way it was done involved remembering dom nodes and then getting
their position later when animating the receipt to its next position,
but I'm not sure how this worked since the DOM node may not neccessarily
be in the DOM anymore. Instead, just remember the bounding box coordinates.
At worst it might go weird if the window is resized but seems fine in
practice. Also, keeping references to dom nodes feels like a fast road
to memory leaks.
Fixes https://github.com/element-hq/element-web/issues/27916
* Attempt to write a test for read receipts
and fix naming
* Another test
also change a condition to make it testable
* Fix when an event is pinned and the banner displays the correct event.
Fix when an event is pinned and the banner displays the good event.
* Update e2e tests
* Implement download_file in widget driver
Signed-off-by: Michael Weimann <michael.weimann@nordeck.net>
* Fix test URIs
Signed-off-by: Michael Weimann <michael.weimann@nordeck.net>
* Use download-file branch as widget-api source
Signed-off-by: Michael Weimann <michael.weimann@nordeck.net>
* bump matrix-widget-api to 1.9.0
Signed-off-by: Kim Brose <kim.brose@nordeck.net>
* prettier
Signed-off-by: Kim Brose <kim.brose@nordeck.net>
---------
Signed-off-by: Michael Weimann <michael.weimann@nordeck.net>
Signed-off-by: Kim Brose <kim.brose@nordeck.net>
Co-authored-by: Kim Brose <kim.brose@nordeck.net>
* Move pinned message hooks to a dedicated file
* Add a banner at the top of a room to display the pinned messages
* Put the pinning banner behind labs pinning labs flag
* Add redacted event support
* Handle UTD in pinning message banner
* Add tests for redaction
* Make all the banner clickable
* Add tests for PinnedMessageBanner.tsx
* Add e2e tests for the pinned message banner
* Review changes
* Improve PinningUtils.ts doc and use common methods to check pin or unpin.
Removed unused methods.
* Send room account data and state event in parallel
* Rerender MessageActionBar.tsx if there is a room pinned event
* Update pinning util tests
* Add test for room pinned events in MessageActionBar-test.tsx
* Remove unused `onSecretRequested` callback
This thing is unused with the rust crypto stack (which is lucky, because it
uses methods that only work with the legacy stack).
* Remove unused `getDehydrationKey` method
This callback is no longer used, so there is no need for an implementation.
* Remove unused `dehydrationCache`
This is no longer written to, so is redundant.
* Remove another write to `CryptoCallbacks.getDehydrationKey`
As before: this hook is no longer used by the js-sdk, so writing to it is
pointless.
* Add drafts to the RTE and tests
* test drafts in threads
* lint
* Add unit test.
* Fix test failure
* Remove unused import
* Clean up wysiwyg drafts and add test.
* Fix typo
* Add timeout to allow for wasm loading.
---------
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
* Add Pin/Unpin action in quick access of the message action bar
* Add tests for `MessageActionBar`
* Add tests for `PinningUtils`
* Fix `MessageContextMenu-test`
* Add e2e test to pin/unpin from message action bar
* Fix pinning event loading after restart
* Update deps
* Replace pinned event list
* Add a dialog to confirm to unpin all messages
* Use `EmptyState` when there is no pinned messages
* Rework `PinnedEventTile` tests
* Add comments and refactor `PinnedMessageCard`
* Rework `PinnedMessageCard` tests
* Add tests for `UnpinAllDialog`
* Add e2e tests for pinned messages
* Replace 3px custom gap by 4px gap
* Use string interpolation for `Pin` action.
* Update playright sceenshot for empty state
* Refactor the various email/phone management UI into a single component
These were basically the same component copied & pasted 3 times and
tweaked to match the behaviour of each case. This de-dupes them into
one component.
This all could really benefit from playwright tests, but would require
setting up a dummy ID server in the playwright tests. This is all legacy
pre-MAS stuff so its questionable whether its worth the effort.
* Basic test, remove old tests
* Use different text to confirm remove & put headers back
although the two texts are both 'Remove' in practice
* Remove string
This was never triggered anyway with sydent & synapse because they
don't seem to agree on what error to return. In any case, I think it
makes more sense for it to be consistent with the email path, ie. using
a dialog.
* Avoid nested forms
* Snapshots
* More snapshots
* Test the hs side
* Snapshots
* Test IS bind/revoke
* Test remove can be cancelled
* Test unvalidated cases & fix phone error
* Reset state between tests
* Import useState directly
* One more direct React import
* Add chat button to new room header for video room & maximised widgets
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
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>
* Update snapshot
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>
* Update `@vector-im/compound-design-tokens`
* Update jest snapshots
* Update playwright snapshots
* Use `--cpd-font-body-lg-semibold` for toast
* Use `--cpd-font-body-lg-semibold` for other elements
* Remaining heading fix
The Widget API spec for delayed events is defined by MSC4157.
Also support "parent" delayed events, which were in a previous version
of MSC4140 and may be reintroduced or be part of a new MSC later.
* Detect autoReplaceEmoji setting
* Add plain text emoticon to emoji replacement for plain and rich text modes of the RTE.
* Use latest wysiwyg
* lint
* fix existing jest tests and docs
* Add unit tests
* Update wysiwyg to fix flakes.
* fix wording of tests and comments
* use useSettingValue
* Clean up editor drafts for unknown rooms and add tests.
* lint
* Call cleanUpDraftsIfRequired when we know a live update has completed.
* Fix test for new call site of draft cleaning
* fix test
* Make tests more resilient for React 18 upgrade
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>
* Delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Rename general user settings to account
Everything 'general' is now elsewhere, so this is ready for its
new name.
* Update snapshots
* Rename & update playwright test
* Rename class & remove unused CSS class
* Change test ID
* rethemendex
* More tests!!
* snapshots
* Put the screenshots back in the new place
* Fix tests with restoreAllMocks
* More screenshot renaming
* More test fixes & screenshot updates
* More test fixes
* un-skip
* Typo
Co-authored-by: Robin <robin@robin.town>
---------
Co-authored-by: Robin <robin@robin.town>
* Change icon for general/account tab
...and add support for compound design token icons to TabbedView,
changing all the other icons over while we're at it.
* Update snapshots
* Fix responsive mode
* Missed one
* truthy-check the whole block
* Use asset imports
* Update snapshots
* Disable User Info jump to read receipt button instead of hiding it when no RR
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove non-functional code
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add missing presence indicator to new room header
DecoratedRoomAvatar doesn't match Figma styles so created a composable avatar wrapper
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add oobData to new room header avatar
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Simplify
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Simplify
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>