* 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>
* 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
* 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>
* 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
* 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>
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.
* 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>
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.
* 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
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.
* 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>
* 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
* Grant Element Call widget caps for "raise hand"
This allows the widget to send and receive event types used by the
"raise hand" feature (element-hq/element-call#2542) without prompting
the user to grant the capabilities to do so.
* Lint
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.
* 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
* 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`
* 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>
* Invite dialog: display MXID on its own line
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
* Refactor to satisfy i18n linter
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
---------
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
* Ignore permalink_prefix when serializing Markdown
fixes vector-im/element-web/issues/26002
During serialization of messages, pills were wrongfully serialized to a URL
starting with `permalink_prefix`. This is against the Spec (which mandates
https://matrix.to/#/ links) and the resulting pills were not recognized as
pills in other clients.
Spec-Appendix concerning matrix.to links: https://spec.matrix.org/v1.8/appendices/#matrixto-navigation
Signed-off-by: Lars Wickel <git@herkulessi.de>
* Test for pill serialization with permalink_prefix set
Signed-off-by: Lars Wickel <git@herkulessi.de>
* Test that permalink_prefix is used for permalink creation
Signed-off-by: Lars Wickel <git@herkulessi.de>
* Fix lint issues introduced
Signed-off-by: Lars Wickel <git@herkulessi.de>
* Incorporate requested changes
Signed-off-by: Lars Wickel <git@herkulessi.de>
---------
Signed-off-by: Lars Wickel <git@herkulessi.de>
Co-authored-by: herkulessi <git@herkulessi.de>
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
* Fix alignment of RTL messages
Inspired by https://github.com/matrix-org/matrix-react-sdk/pull/5453 but
hopefully with the edited marker in the right place.
This is a PoC: types aren't correct and the style needs pulling
out to a class. Plus it would probably need more visual tests added.
If this looks acceptable, I can make these changes.
* Fix spacing between text and edited annotation
* Update snapshot
* Update more snapshots
* More snapshots
* More more snapshots
* Split out style
* Fix emotes
This will cause them always be right-justified if the display name
is rtl.
* Add playwright test for ltr/rtl message rendering
* Better snapshots
* Await on message sending
* Better waiting, hopefully
* Old snapshot files
* Really hopefully fixed screenshots this time
* Don't include the message action bar in the screenshots
* Handle media download errors better
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Show error if media download failed
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* More tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Extract useIsVideoRoom hook
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Move useWidgets hook to WidgetUtils
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Extract Extensions into their own right panel tab
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove unused components & classes
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tests
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>
* Remove topic from new Room Header
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Hide topic edit in right panel unless user has permission to edit
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Expand right panel room topic by default
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix text align of topic in right panel
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix topic colour in right panel
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Exclude `Add topic` from text-align
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Don't show `Add topic` if !perms
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Rework how the onboarding notifications task works
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add test
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>
* Split up bodyToHtml
This (very incrementally) splits up the bodyToHtml function to avoid
the multiple return types and hopefully make it a touch easier to
comprehend. I'd also like to see what the test coverage says about
this, so this is is somewhat experimental. This shouldn't change
any behaviour but the comments in this function indiciate just how
subtle it is.
* Remove I prefix
* Missed emoji formatting part
* Warn users on unsupported browsers before they lack features
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update Learn more link
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 toast styles to match Figma
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove test code
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* update tests
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>
* Warn users on unsupported browsers before they lack features
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update Learn more link
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>
* Add comments
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add sign out button to settings profile section
And move the logic for displaying the dialog out of the user menu
to somewhere it can be re-used.
Also close any open dialog on logout, because otherwise, well... you
can guess.
* Missing import
* Update screenshot
* This button doesn't need to be an anchor
* Use Flex component
* Use new force-close function
* More tests
* support message translation in chat
* Update src/HtmlUtils.tsx
* update snapshots
* Convert TextualBody-test to use snapshots
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: Richard van der Hoff <richard@matrix.org>
* Fix call ringing on other device when already joined.
This is done by checking if a user is already connected to the call on
another device before playing the ring sound.
* Add test
* Default the room header to on
* Refactor code into helper method
Add a method to open/close the room info panel and use it everywhere.
* Fix broken tests, update snapshots and screenshots
* Update room header tests to make sense with the new header
* Add reusable empty state for the right panel
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update Thread Panel to match latest Figma
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* i18n
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use --cpd-space var
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add reusable empty state for the right panel
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update 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>
* Stop using the js-sdk's compare function
The file is supposed to be a js-sdk internal module so we shouldn't
have been using it, and now it uses the native collator, it's completely
trivial. It was also causing Intl.Collator to be accessed at the module
scope which risked it beating the modernizr check.
* add test
* Fix tests
Move the restoreAllMocks to prevent mock leakage and also add
some custom themes to test the ordering of those.
* Move spy to the right place
* Add ANOTHER test
* Add test for integration manager ordering
* Remove SpaceScopeHeader
It is no longer necessary as we no longer offer the ability to open the member list for a space from any random room.
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove stale test
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>
And clear it in the widget layout store test, also fixing the tests
which didn't actually individually as they actually relied on the state
bleeding between tests.
* Let Element Call widget receive m.room.create
This allows the widget to check the room version without prompting the
user to grant that capability, so the widget can know about
version-specific auth rules (namely MSC3779).
* Test that call widgets get RoomCreate events
* Let Element Call widget set session memberships
Grant Element Call widgets permission to set device-specific session
membership state events.
* Lint
* Test that call widgets can set session membership
* Add comments for each membership type
* Update base card styling to match Compound
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>
* Align `widget_build_url_ignore_dm` with call behaviour switch between 1:1 and Widget
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>
* remove "Manually verify all remote sessions" setting
And remove all of the advanced encryption settings section, since that was the
only setting in there.
* yarn i18n
* also remove now-unused OrderedMultiController and PushToMatrixClientController
* Move integrations switch
This is the last thing to move out of 'general' now.
* unused import
* Move tests out to the SetIntegrationManager component
* Only a decade out
* Move playwright test to the new tab
* Update snapshot
* Update other snapshot
* Remove refs to deprecated method
`MatrixEvent.isEncryptedDisabledForUnverifiedDevices` is now deprecated
* Report new posthog code for withheld message keys
* Create new method for header button behaviour
With the introduction of tabs, the behaviour of the header buttons is
changed as follows:
- Close any right panel if open
- Open the correct right panel if no panel was open before
The old method (and behaviour) is retained as showOrHidePhase.
* Implement tabs in the right panel
There are three tabs: Info, People and Threads
* Remove unwanted code from RoomSummaryCard
- Remove the menu item for opening the memberlist since that is now
taken of by the tabs.
- Remove the close button
* Remove code for focusing close button from tac item
See https://github.com/matrix-org/matrix-react-sdk/pull/12410
There's no longer a close button to focus so we instead focus the thread
tab. This is done in RightPaneltabs.tsx so we just need to remove this
code.
* Introduce a room info icon to the header
This was previously present in the legacy room header but not in the new
header.
* BaseCard changes
- Adds id, ariaLabelledBy and role props to implement tab accessibility.
- Adds hideHeaderButtons prop to hide header buttons (think back and
close buttons).
- Change confusing header rendering code:
header is not rendered ONLY when no header is passed AND
hideHeaderButtons is true.
* Refactor repeated code into function
Created a new function createSpaceScopeHeader which returns the
component if the room is a space room. Previously this code was
duplicated in every component that uses SpaceScopeHeader component.
* Pass BaseCard attributes and use helper function
Actually using the code from the last two commits
* Add, update and remove tests/screenshots/snapshots
* Fix distance between search bar and tabs
* Update compound
* Update screenshots/snapshots
* Promote new room header from labs to Beta
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix reload warning
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>
* Extract SearchInfo interface and SearchScope enum
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix in-progress and update behaviour of RoomSearchView
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove search button from legacy header
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Move search from aux panel to room summary card
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Wire up Cmd/Ctrl F for moved search field
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use cpd space tokens
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove stale props
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix ctrl/cmd f search shortcut
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update Compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Revert the back button for now
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* i18n
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>
* Cancel search on escape
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix missing X
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Extract SearchScope and SearchInfo into Searching
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Switch to icon button for cancel search
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* yarn.lock
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* lint
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 screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* i18n
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update locators
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Revert screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
* Discard changes to package.json
* i18n
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Handle narrow viewports
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>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Revert copy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Move language settings to 'preferences'
Their new home is in this tab
* Update snapshot
* Move playwright test code
* Add test
* tests
* Update screenshot
* Fix closing all modals
We used `Modal.closeCurrentModal()` in a bunch of places, in all cases
(as far as I can see: it wasn't commented) we meant to close all open
modals. This swaps that function for one that closes all open modals.
Also types the close reason which claimed to be something in a comment,
of course, was wrong because a load of places passed their own random
string which was never used.
* Force close modals
* Try with minimal changes
* Already had a method for this
* Add test
* More tests
* Unused importsd
* Use WebAudio API to play notification sound
So that it won't appear in system media control.
* Run prettier
* Chosse from mp3 and ogg
* Run prettier
* Use WebAudioAPI everywhere
There's still one remoteAudio. I'm not sure what it does. It seems it's
only used in tests...
* Run prettier
* Eliminate a stupid error
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update setupManualMocks.ts
* 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>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* mocks
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* mocks
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>
* Simplify
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* covg
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>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Don't consider textual characters to be emoji
We were using emojibase-regex to match emoji within messages. However, the docs (https://emojibase.dev/docs/regex/) state that this regex matches both emoji and text presentation characters. This is not what we want, and will result in false positives for characters like '↔' that could turn into an emoji if paired with a variation selector. Unfortunately, none of the other regexes provided by Emojibase do what we want either (https://github.com/milesj/emojibase/issues/174). In the meantime, browser support for the RGI_Emoji character sequence class has made it feasible to write an emoji regex by hand, so that's what I've done.
* Add a fallback for BIGEMOJI_REGEX as well
* Disable profile controls if the HS doesn't allow them to be set
Also updates to the js-sdk interface changes in https://github.com/matrix-org/matrix-js-sdk/pull/4246
* Remove unnecessary await
* Pass disabled prop to accessiblebutton in avatarsetting
* Move the account management button
The section it lives in with the server name goes, and the button
just lives on its own in the profile section.
* Update test
* Revert bits of previous PR that are no longer wanted
because we squash merge so git can no longer make sense of what changes
have been applied.
* More squash-merge fails
* More more squash merge fails
* Disable profile controls if the HS doesn't allow them to be set
Also updates to the js-sdk interface changes in https://github.com/matrix-org/matrix-js-sdk/pull/4246
* Remove unnecessary await
* Pass disabled prop to accessiblebutton in avatarsetting
* Use getCapabilities
in case there are no cached capabilities
* Fix test
* Go back to just using getCapabilities
Rather than change the other places
* Clear autocomplete input on selection accept
Fixes https://github.com/element-hq/element-web/issues/27194
* Playwright: use rust crypto for the bot user (#12708)
... because legacy crypto is legacy
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* WIP update of threepid settings section
* Remove email / phone number section from original place
and don't show the new one if 3pids are disabled
* Update snapshots
* Pull identity server / 3pid binding settings out to separate component
and put it in the security & privacy section which is its new home
* Update snapshot
* Move relevant part of test & update screenshots / snapshots
* Remove unnecessary dependency
* Add test for discovery settings
* Add spacing in terms agreement
* Extract SearchScope and SearchInfo into Searching
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Comments
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>