Commit graph

2790 commits

Author SHA1 Message Date
David Baker
3c8010b719
Fix display of no avatar in avatar setting controls (#12558)
* New user profile UI in User Settings

Using new Edit In Place component.

* Show avatar upload error

* Fix avatar upload error

* Wire up errors & feedback for display name setting

* Implement avatar upload / remove progress toast

* Add 768px breakpoint

* Fix display of no avatar in avatar setting controls

There was supposed to be a person icon but it was invisible, and also
would have been inappropriate for room avatars anyway.

This makes it match the designs by being the same as whatever the
default avatar is.

* Fix room profile display

* Update to released compund-web with required components / fixes

* Require compound-web 4.4.0

because we do need it

* Update snapshots

Because of course all the auto-generated IDs of unrelated things
have changed.

* Fix duplicate import

* Fix CSS comment

* Update snapshot

* Run all the tests so the ids stay the same

* Start of a test for ProfileSettings

* More tests

* Test that a toast appears

* Test ToastRack

* Update snapshots

* Add the usernamee control

* Fix playwright tests

 * New compound version for editinplace fixes
 * Fix useId to not just generate a constant ID
 * Use the label in the username component
 * Fix widths of test boxes
 * Update screenshots

* Put ^ back on compound-web version

* Split CSS for room & user profile settings

and name the components correspondingly

* Fix playwright test

* Update room settings screenshot

* Use original screenshot instead

* Add required props in test

* Fix test

* Also here

* Update screenshots

* Remove user icon

...which is unused now, as far as I can see.

* Fix styling of unrelated buttons

Needed to be added in other places otherwise the specificity changes.

Also put the old screenshots back.

* Add copyright year

* Fix copyright year

* Switch to useMatrixClientContext

* Fix other test
2024-06-06 17:35:44 +00:00
David Baker
cfa322cd62
New user profile UI in User Settings (#12548)
* New user profile UI in User Settings

Using new Edit In Place component.

* Show avatar upload error

* Fix avatar upload error

* Wire up errors & feedback for display name setting

* Implement avatar upload / remove progress toast

* Add 768px breakpoint

* Fix room profile display

* Update to released compund-web with required components / fixes

* Require compound-web 4.4.0

because we do need it

* Update snapshots

Because of course all the auto-generated IDs of unrelated things
have changed.

* Fix duplicate import

* Fix CSS comment

* Update snapshot

* Run all the tests so the ids stay the same

* Start of a test for ProfileSettings

* More tests

* Test that a toast appears

* Test ToastRack

* Update snapshots

* Add the usernamee control

* Fix playwright tests

 * New compound version for editinplace fixes
 * Fix useId to not just generate a constant ID
 * Use the label in the username component
 * Fix widths of test boxes
 * Update screenshots

* Put ^ back on compound-web version

* Split CSS for room & user profile settings

and name the components correspondingly

* Fix playwright test

* Update room settings screenshot

* Use original screenshot instead

* Fix styling of unrelated buttons

Needed to be added in other places otherwise the specificity changes.

Also put the old screenshots back.

* Add copyright year

* Fix copyright year
2024-06-06 13:56:38 +00:00
Hubert Chathi
c4c1faff97
Add flag for tests to avoid double-reporting check (#12569)
* Add flag for tests to avoid double-reporting check

Some of the tests were flaking.  Our best guess is that it's failing to track
some events due to false positives in the Bloom filter used to guard against
double-reporting.  So we add a flag to disable using that in tests (except for
tests that test that functionality).

* invert logic to avoid double negative
2024-06-06 13:02:34 +00:00
Michael Telatynski
1677ed1be0
MSC4108 support OIDC QR code login (#12370)
Co-authored-by: Hugh Nimmo-Smith <hughns@matrix.org>
2024-06-06 09:57:28 +01:00
Michael Telatynski
ca7760789b
Use LegacyRendezvousFailureReason over RendezvousFailureReason (#12578) 2024-06-06 09:19:49 +01:00
Richard van der Hoff
0a01320fca
Element-R: pass pickleKey in as raw key for indexeddb encryption (#12543)
* Element-R: pass pickleKey in as raw key for indexeddb encryption

Currently, we pass the `pickleKey` to the rust library for use as a passphrase
for encrypting its crypto store. The Rust libary then passes that passphrase
through 200000 rounds of PBKDF2 to generate an encryption key, which is
(deliberately) slow.

However, the pickleKey is actually 32 bytes of random data (base64-encoded). By
passing the raw key into the rust library, we can therefore save the PBKDF
operation.

Backwards-compatibility with existing sessions is maintained, because if the
rust library discovers that the store was previously encrypted with a key based
on a PBKDF, it will re-base64 and PBKDF the key we provide, thus reconstructing
the right key.

* Update src/Lifecycle.ts

Co-authored-by: Florian Duros <florianduros@element.io>

* Lifecycle-test: clean up test setup

Rely less on the unit under test for setting up the test preconditions -- not
least because we don't really want to fire up matrix clients and the like
during test setup.

* Factor out "encryptPickleKey" method

For a start it makes it easier to grok what's going on, but also I went to use
this in a test

* Improve tests for `Lifecycle.restoreFromLocalStorage`

---------

Co-authored-by: Florian Duros <florianduros@element.io>
2024-06-05 08:52:28 +00:00
Florian Duros
679b170bc5
Close the release announcement when a dialog is opened (#12559)
* Fire `ModalManagerEvent.Closed` when a dialog is closed

* Listen to modal events in the RA

* Fix first RA test
2024-05-29 07:22:50 +00:00
Florian Duros
17ab522942
Tooltip: close field tooltip when ESC is pressed (#12553)
* Close field tooltip when ESC is pressed

* Use `Key.ESCAPE`
2024-05-28 12:55:47 +00:00
Michael Telatynski
148a360598
Avoid using deprecated exports, fields, and duplicate code (#12555) 2024-05-28 08:41:20 +01:00
Florian Duros
d9f718e589
Add more test for ReactionsRowButton.tsx 2024-05-22 16:24:09 +02:00
Florian Duros
8f07672da1
Add more tests for ReadReceiptGroup.tsx 2024-05-22 15:56:12 +02:00
Florian Duros
b6132db68f
Merge branch 'develop' into florianduros/tooltip/legacy-tooltip 2024-05-22 15:12:34 +02:00
Florian Duros
04741ae6a6
Add tests for ReadReceiptGroup.tsx 2024-05-22 15:07:57 +02:00
Florian Duros
1190de9028
Migrate TooltipTarget usage to compound Tooltip (#12542)
* Use new tooltip in `RoomTopic.tsx`

* Use new tooltip in `MLocationBody.tsx`

* Fix room topic

* Update location snapshot

* Use new tooltip in `AppPermission.tsx`

* Remove `TooltipTarget`

* Add tests for `RoomTopic`
2024-05-22 12:15:07 +00:00
Florian Duros
a6907a033e
Use compound tooltip in ReactionRowButton 2024-05-22 11:27:01 +02:00
Valere
a29cabe45a
Report verification and recovery state to posthog (#12516)
* Report verification and recovery state to posthog

* Fix CryptoApi import

* Fix js-sdk import

* Review: Use DeviceVerificationStatus instead of CrossSigningStatus

* Review: Clean condition to check secrets in 4S

* review: Fix redundent !!
2024-05-21 14:37:00 +00:00
David Baker
3342aa5ff8
Refactor some logic into common AvatarSetting component (#12544)
* Refactor some logic into common AvatarSetting component

We duplicated some of the logic of setting avatars between profiles &
rooms. This pulls some of that logic into the AvatarSetting component
and hopefully make things a little simpler.

* Unsed import

* Convert JS based hover to CSS

* Remove unnecessary container

* Test avatar-as-file path

* Test file upload

* Unused imports

* Add test for RoomProfileSettings

* Test removing room avatar

* Move upload control CSS too

* Remove commented code

Co-authored-by: Florian Duros <florianduros@element.io>

* Prettier

* Coments & move style to inline as per PR suggestion

* Better test names

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Fix test

Upload input doesn't have that class anymore

---------

Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-05-21 10:37:02 +00:00
Hubert Chathi
1bb70c5b3b
Only report undecryptable events once (#12501)
* persist previously-reported event IDs as a bloom filter

* Pin to older `@types/seedrandom`

... to work around https://github.com/Callidon/bloom-filters/issues/72

* Inline `DecryptionFailureTracker.addDecryptionFailure`

* Remove redundant TRACK_INTERVAL

There really doesn't seem to be much point to this batching up of decryption
failure reports. We still call the analytics callback the same number of times.

* Rename `trackedEvents` to `reportedEvents`

* Fix incorrect documentation on `visibleEvents`

This *does* overlap with `failures`.

* Combine `addFailure` and `reportFailure`

* Calculate client properties before starting reporting

* Clear localstorage after each test

... otherwise they interfere

* Remove redundant comment

* Ensure that reports are cleared on a logout/login cycle

* make private const private and const

---------

Co-authored-by: Richard van der Hoff <richard@matrix.org>
2024-05-20 14:53:50 +00:00
Richard van der Hoff
3e103941d6
Cleanup work on DecryptionFailureTracker (#12546)
* Inline `DecryptionFailureTracker.addDecryptionFailure`

* Remove redundant TRACK_INTERVAL

There really doesn't seem to be much point to this batching up of decryption
failure reports. We still call the analytics callback the same number of times.

* Rename `trackedEvents` to `reportedEvents`

* Fix incorrect documentation on `visibleEvents`

This *does* overlap with `failures`.

* Combine `addFailure` and `reportFailure`

* Calculate client properties before starting reporting
2024-05-17 16:19:31 +00:00
Florian Duros
75562b1d1b
Tooltip: migrate remaining tooltips from AccessibleTooltipButton to AccessibleButton (#12522)
* Use `AccessibleButton` in `RovingAccessibleTooltipButton`

* Update snapshots

* Update @vector-im/compound-web

* Update composer

* Update formating buttons

* Update snapshots

* Update `ContextMenuTooltipButton.tsx`

* Fix placement

* Update tests

* Remove placement

* Update space panel snapshot

* Remove default placement

* Update snapshots

* Update snapshots

* Use kbd

* Update ``@vector-im/compound-web`

* Migrate remaining files

* Remove `AccessibleTooltipButton.tsx`

* Add test to `InteractiveAuthEntryComponents`

* Add test to `InteractiveAuthEntryComponents`

* Back to old RoomList-test.tsx

* Improve `InteractiveAuthEntryComponent` tests

* Review changes
2024-05-17 14:11:07 +00:00
Florian Duros
8f3c8b3515
Use RovingAccessibleButton instead of RovingAccessibleTooltipButton (#12539) 2024-05-17 10:29:30 +00:00
Hubert Chathi
eed8d1538b
Add more encryption properties to PostHog (#12415)
* report time to decrypt an event if it's slow

* add more stats

* fix some tests

* keep original timestamp, and report non-visible decryption failures

* add statistic for whether the user trusts their own device

* revert local playwright docker changes

* apply changes from review

* also remove logout event handler on logout

* apply changes from review

* make eventDecrypted callback private
2024-05-16 00:25:58 +00:00
Michael Telatynski
113c365563
Stop using deprecated methods, fields & exports (#12524)
* Remove legacy `threepidCreds` field

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

* Remove `user` field legacy UIA fallback

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

* Update imports

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

* Fix test

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-05-15 14:58:28 +00:00
Florian Duros
bec8fdb3d3
Tooltip: Improve accessibility for context menus (#12462)
* Update `ContextMenuTooltipButton.tsx`

* Fix placement

* Update tests

* Update space panel snapshot

* Remove default placement

* Update snapshots

* Fix tooltip child rerender

* Remove useless props title
2024-05-15 14:25:30 +00:00
Florian Duros
580bc8771c
Fix avatar in chat export (#12537)
* Update `@vector-im/compound-web`

* Update test snapshots
2024-05-15 13:34:27 +00:00
Michael Telatynski
667a7548a7
Use * for italics as it doesn't break when used mid-word (#12523)
* Use `*` for italics as it doesn't break when used mid-word

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-05-15 09:01:45 +00:00
Florian Duros
77a724526e
Tooltip: Improve the accessibility of the composer and the rich text editor (#12459)
* Use `AccessibleButton` in `RovingAccessibleTooltipButton`

* Update snapshots

* Update @vector-im/compound-web

* Update composer

* Update formating buttons

* Update snapshots

* Remove placement

* Update snapshots

* Use kbd

* Update ``@vector-im/compound-web`
2024-05-15 08:32:53 +00:00
Michael Telatynski
f0281886d7
Fix well-known lookup for sliding sync labs check (#12519)
* Fix well-known lookup for sliding sync labs check

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>
2024-05-14 12:40:10 +00:00
Michael Telatynski
d0b30d1631
Allow explicit configuration of OIDC dynamic registration metadata (#12514)
* Fix `element-desktop-ssoid being` included in OIDC Authorization call

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

* Split out oidc callback url into its own method

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

* Allow explicit configuration of OIDC dynamic registration metadata

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

* Fix test

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

* Fix unexpected hash on oidc callback url

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

* undefined > []

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-05-14 09:38:33 +00:00
Michael Telatynski
cc6958980b
Fix element-desktop-ssoid being included in OIDC Authorization call (#12495)
* Fix `element-desktop-ssoid being` included in OIDC Authorization call

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

* Split out oidc callback url into its own method

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

* Fix unexpected hash on oidc callback url

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

* Update src/BasePlatform.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-05-13 13:31:08 +00:00
Michael Telatynski
eee0b2a9c3
Add room topic to right panel room info (#12503)
* Add room topic to right panel room info

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

* Tweak styles

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

* Update snapshot

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>

* Iterate

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

* Add snapshot tests

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-05-10 10:00:43 +00:00
R Midhun Suresh
706c4b7101
Use h tag for widget title instead of b tag (#12504)
* Change b tag to h3 tag

* Remove margin

* Update snapshots
2024-05-08 13:57:17 +00:00
Michael Telatynski
580bb5537d
OIDC: pass id_token via id_token_hint on Manage Account interaction (#12499)
* Store id_token rather than just id_token_claims

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

* Pass id_token via `id_token_hint` on `Manage Account` interaction

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-05-07 11:27:37 +00:00
Florian Duros
febb60ee45
Tooltip: improve accessibility for call and voice messages (#12489)
* Move to `AccessibilityButton`

* Update snapshots

* Add tests

* Update snapshots
2024-05-07 10:20:52 +00:00
David Baker
18ef97161a
Move the active tab in user settings to the dialog title (#12481)
* Convert tabbedview to functional component

The 'Tab' is still a class, so now it's a functional component that
has a supporting class, which is maybe a bit... jarring, but I think
is actually perfectly logical.

* put comment back

* Fix bad tab ID behaviour

* Make TabbedView a controlled component

This does mean the logic of keeping what tab is active is now in each
container component, but for a functional component, this is a single
line. It makes TabbedView simpler and the container components always
know exactly what tab is being displayed rather than having to effectively
keep the state separately themselves if they wanted it.

Based on https://github.com/matrix-org/matrix-react-sdk/pull/12478

* Move the active tab in user settings to the dialog title

Separated by a colon, as per the new design.

* Update snapshots

* Update a playwright test

* Fix more tests / snapshots

* Attempt to test all the cases of titleForTabID

* More tests
2024-05-07 09:32:24 +00:00
Florian Duros
f8e040a890
Tooltip: Remove extra data attribute (#12483)
* Update `@vector-im/compound-web`

* Update snapshots

* Update jest snapshotss

* Update snapshots
2024-05-06 08:54:40 +00:00
Travis Ralston
f29823cdcc
Check native sliding sync support against an unstable feature flag (#12498)
* Check native sliding sync support against an unstable feature flag

The `OPTIONS` approach from https://github.com/matrix-org/matrix-react-sdk/pull/12492 doesn't work because Synapse *always* responds with 204 (success) to `OPTIONS` requests, as described here: https://github.com/element-hq/synapse/issues/17153

We further can't use `HEAD` because it's not part of the allowed CORS methods, meaning the browser will mask the exact status code and error message from us, and the proxy hangs on the request anyways: https://github.com/matrix-org/sliding-sync/pull/429

To avoid these problems, we instead search for an unstable feature flag to be exposed by the server. Presence of this flag denotes native support. See https://github.com/matrix-org/matrix-spec-proposals/pull/3575/files#r1588877046 for details.

Implementations which support sliding sync natively will need to update to support this new unstable feature flag usage.

* Appease the linter

* Appease the tests
2024-05-03 18:45:26 +00:00
David Baker
9684dd5145
Make TabbedView a controlled component (#12480)
* Convert tabbedview to functional component

The 'Tab' is still a class, so now it's a functional component that
has a supporting class, which is maybe a bit... jarring, but I think
is actually perfectly logical.

* put comment back

* Fix bad tab ID behaviour

* Make TabbedView a controlled component

This does mean the logic of keeping what tab is active is now in each
container component, but for a functional component, this is a single
line. It makes TabbedView simpler and the container components always
know exactly what tab is being displayed rather than having to effectively
keep the state separately themselves if they wanted it.

Based on https://github.com/matrix-org/matrix-react-sdk/pull/12478

* Fix some types & unused prop

* Remove weird behaviour of using first tab is active isn't valid

* Don't pass initialTabID here now it no longer has the prop

* Fix test

* bleh... id, not icon

* Change to sub-components

and use contitional call syntax

* Comments

* Fix element IDs

* Fix merge

* Test DesktopCapturerSourcePicker

to make sonarcloud the right colour

* Use custom hook for the fllback tab behaviour
2024-05-03 15:01:01 +00:00
Florian Duros
2f3c84f1f4
Tooltip: improve accessibility of spaces (#12497)
* Migrate to `AccessibleButtons`

* Update snapshots
2024-05-03 14:07:11 +00:00
Florian Duros
95ee2979c8
Tooltip: improve accessibility of the right panel (#12490)
* Move to `AccessibleButton`

* Update snapshots

* Update playwright snapshots
2024-05-03 08:44:04 +00:00
Travis Ralston
3059b5b1e2
Use OPTIONS for sliding sync detection poke (#12492)
* Use OPTIONS for sliding sync detection poke

This avoids unintended consequences, including high resource usage, which would accompany a "full" sync request. Instead, we just grab headers and enough information for CORS to pass, revealing likely support.

Fixes https://github.com/element-hq/element-web/issues/27426

* Appease the linter

* Reset for each test
2024-05-03 06:31:34 +00:00
Travis Ralston
d25d529e86
Extract functions for service worker usage, and add initial MSC3916 playwright test (when supported) (#12414)
* Send user credentials to service worker for MSC3916 authentication

* appease linter

* Add initial test

The test fails, seemingly because the service worker isn't being installed or because the network mock can't reach that far.

* Remove unsafe access token code

* Split out base IDB operations to avoid importing `document` in serviceworkers

* Use safe crypto access for service workers

* Fix tests/unsafe access

* Remove backwards compatibility layer & appease linter

* Add docs

* Fix tests

* Appease the linter

* Iterate tests

* Factor out pickle key handling for service workers

* Enable everything we can about service workers

* Appease the linter

* Add docs

* Rename win32 image to linux in hopes of it just working

* Use actual image

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Improve documentation

* Document `??` not working

* Try to appease the tests

* Add some notes

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-05-02 22:19:55 +00:00
David Baker
374cee9080
Fix flaky jest tests (#12486)
...and remove the code that causes them to be retried in CI. Most of
these were just lack of waiting for async things to happen, mostly
lazy loading components, hence whythey worked on the retry: because
the code had been loaded by then.
2024-05-02 14:53:35 +00:00
Florian Duros
7193d4c695
TAC: Fix accessibility issue when the Release announcement is displayed (#12482)
* Update `@vector-im/compound-web`

* Update TAC snapshots

* Update space panel snapshots
2024-05-02 13:23:25 +00:00
Florian Duros
6a3741b779
TAC: Close Release Announcement when TAC button is clicked (#12475)
* Close RA when TAC button is clicked

* Update snapshots
2024-05-02 08:14:50 +00:00
Florian Duros
ad7f626e22
Do not render tooltip when RA is displayed on TAC (#12472) 2024-05-01 20:39:08 +00:00
David Baker
906c9dd948
Convert UserSettings to functional component (#12474)
* Convert UserSettings to functional component

* Put comment back

* Fix test

* Unused imports
2024-04-30 18:52:32 +00:00
Ed Geraghty
bb4f57583f
MSC3575 (Sliding Sync) add well-known proxy support (#12307)
* Initial commit

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Remove commented code

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Change function to reflect it's proxy not native support

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Re-add check for servers with native support

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Add native support check back in

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Re-add endpoint health check function

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Use inbuilt `getWellKnown` function

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Change the error message to the correct function

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Stop storing the proxyurl in the settings for now

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Make the logger messages more useful

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Start moving the checking logic directly into the controller

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Add missing import

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Get the client rather than passing it in to the functions

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* remove invalid `function` keyword

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Fix imports

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Our new functions are private

We shouldn't(?) have to use these check in future elsewhere

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Change our proxy check function to return a boolean

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Make `nativeSlidingSyncSupport` also return boolean, add in health check

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Disable the sliding sync option if the server doesn't support

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Only enable the setting if it passes (again)

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Update our comments to better match what's going on

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Remove unused dialog

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Add a well-known check on start-up, if sliding sync has been enabled

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Check against the correct endpoint...

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Extract baseUrl as we'll reuse it

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Make the logs differentiate between the types of proxy

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Grab the client well-known directly for use

Can't use the client object at this point, it hasn't read in the well-known

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Add myself to the copyright assignation

I wrote the majority of this file...

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Only return `true` if it's actually there

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Correct the `proxySlidingSyncSupport` function comment to match the code

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Correct the `nativeSlidingSyncSupport`function comment to match the code

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Another comment/functionality paring

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Remove duplicated types from the doc

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Move await to the previous line

Removes brackets, and corrects `wellKnown` from being a `Promise`
Signed-off-by: Ed Geraghty <ed@geraghty.family>

* use `waitForClientWellKnown` to avoid a race condition with the request

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Move getting the client out of the `if`, use `waitForClientWellKnown`

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Remove `beforeChange` override

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Move proxy setup logic into `SlidingSyncManager`

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Swap `configure` to private, we call it from `setup` which handles proxy

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Promises are always `true`

TIL.
Signed-off-by: Ed Geraghty <ed@geraghty.family>

* use `timeoutSignal`

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Change message when there's no server support

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Refactor `slidingSyncHealthCheck`

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Refactor `nativeSlidingSyncSupport` with try/catch

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Change comment to hotlink

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Try and make the toggle disabled when there's no endpoint

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Move the if statement outside the refactored fn to avoid an await

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Revert "Swap `configure` to private, we call it from `setup` which handles proxy"

This reverts commit c80a00b50c261becc9ad58e08d2a893d572d8426.

* Remove unused import

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Further refactor `slidingSyncHealthCheck`

`proxySlidingSyncSupport` already checks the client well-known is there
Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Make `proxySlidingSyncSupport` log on success

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Clarify log message for proxy being up

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Move the logic into SlidingSyncManager

All so we can set a static variable because the disabled check isn't asynchronous :)

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Obviously this isn't a return so don't overwrite with false!

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Remove outdated comment

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* No need to pass in the client

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Activating SS should probably be info level logs

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* If we've not enabled sliding sync, push the logs down a bit

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Update i18n error message

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Remove unused i18n strings

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Correct log message

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Prettier

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Remove many of the log messages

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Short out of `checkSupport` if it's `true`

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Add the endpoint back into the log when we're enabling it

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Note in the comment that `feature_sliding_sync_proxy_url` is legacy

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Expand the well-known liveness check log

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* No need to stall the client waiting for sliding sync support

* `AutoDiscovery.findClientConfig` throws if the baseUrl is blank

* Fix `getProxyFromWellKnown` (?)

* Add missing semicolon

Sorry, linter!
Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Pass our `MatrixClient` through instead of trying to grab it

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Add missing return in function comment

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Actually pass through our Client, not the Peg object

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Remove SonarCube smell complaint

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Neew to make our other two methods public to test

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* First passing test

Hurrah!
Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Two more tests, this time on `checkSupport`

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Reset our `serverSupportsSlidingSync` between tests

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Check the static member is being set

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Move the static assignation down to the relevant tests

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Pull getProxyFromWellKnown mocking up

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Check we /haven't/ shorted out

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Move our spy up so we can reuse it

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Check spidering  is being called

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Test the proxy is declared

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Test entered manually

Signed-off-by: Ed Geraghty <ed@geraghty.family>

* Sorry, linter

* I guess these strings are wrong?

* Replace any with string

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Ed Geraghty <ed@geraghty.family>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-04-30 18:11:11 +00:00
Michael Telatynski
641a20ce63
Prepare for OIDC QR Login PR (#12463)
* Move LoginWithQRSection to the top of the settings tab

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

* Refactor LoginWithQRSection to a Functional Component

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

* Extract LoginWithQR types

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

* Update LoginWithQRFlow styling & copy

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

* Re-add missing buttons and update snapshots

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

* Use compound spacings

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-04-30 17:18:55 +00:00
renovate[bot]
dafd9c23b8
Update all non-major dependencies (#12468)
* Update all non-major dependencies

* Update posthog user state access

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-04-30 14:41:46 +00:00
Florian Duros
2df946b5b1
Tooltip: Use AccessibleButton in RovingAccessibleTooltipButton (#12458)
* Use `AccessibleButton` in `RovingAccessibleTooltipButton`

* Update snapshots

* Update @vector-im/compound-web

* Update playwright

* Remove placement
2024-04-30 09:35:58 +00:00
Florian Duros
44e2a6d070
Tooltip: Use AccessibleButton in reusable elements (#12461)
* Update reusable elements

* Update tests

* Make right as default tooltip placement

* Add tests
2024-04-29 17:19:05 +00:00
Hubert Chathi
d5bf1022e9
Use a different error message for UTDs when you weren't in the room. (#12453)
* Use different messages for UTDs sent before login

* Playwright test for historical events

* Add some tests

* initial work on pre-join UTDs

* add playwright tests and remove old pre-join UTD logic

* run i18n script

* fix type error

* use different error code in PostHog for pre-join UTD

* don't remove old pre-join UTD logic yet

---------

Co-authored-by: Richard van der Hoff <richard@matrix.org>
2024-04-29 17:18:57 +00:00
David Baker
281916fd96
Take the Threads Activity Centre out of labs (#12439)
* Take the TAC out of labs!

Requires https://github.com/matrix-org/matrix-react-sdk/pull/12438
and ideally https://github.com/matrix-org/matrix-react-sdk/pull/12418

* i18n

* Add test method

That's needed now we we don't include threads in the notif count in the tests

* One less labs setting

* Update snapshot

* Disable release announcement

* Unused import

* Fix some screenshots

* Fix all the unread test cases now room unreads don't include threads

* Fix more tests

* Even more test fixes

* Still more test fixes

* Oh goodness, it's more test fixes

* Fix selectors now there are 2 buttons called Threads

* Disable some tests that aren't passing

for reasons that don't appear releated to any of the TAC work, as
per the comment.

* Remove debugging

* Oops, removed too much
2024-04-29 15:30:19 +00:00
Florian Duros
264e202ccd
Add extra attribute to AccessibleButton (#12456)
* Update snapshots

* Add extra attribute to `AccessibleButton`
2024-04-26 09:10:15 +00:00
Richard van der Hoff
bd7ce7cda9
Expected UTDs: use a different message for UTDs sent before login (#12391)
* Use different messages for UTDs sent before login

* Playwright test for historical events

* Add some tests

* Don't show "verify" message if backup is working

* Apply suggestions from code review
2024-04-25 08:11:41 +00:00
Florian Duros
700b3955a4
Add Tooltip to AccessibleButton (#12443)
* Deprecate AccessibleTooltipButton

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

* Fix tests

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

* Fix tests

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

* Deprecate AccessibleTooltipButton

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

* Fix tests

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

* Iterate

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

* Fix `UserInfo-test.tsx`

* Update `LoginWithQRFlow-test.tsx` snapshot

* Remove tooltip provider from test

* Fix `AccessibleButton`

* Update snapshots

* Revert to original import

* Use title to populate aria-label

* Rollback AccessibleButton or Tooltip changes. Will come in another PR

* Rollback en.json change

* Update snapshots

* Fix `UserInfo`

* Update snapshots

* Use label instead of title in test

* Use label instead of title in TAC test

* Use label instead of title in read-receipt test

* Remove tooltip for ContextMenu

* Add extra information for caption field

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-04-24 12:24:25 +00:00
David Langley
644bf78e2a
Show the local echo in previews (#12451)
* show the local echo in previews

* a bit more coverage
2024-04-24 09:22:07 +00:00
David Baker
427be433d0
Add analytics to activity toggles (#12418)
* Add analytics to activity toggles

Requires https://github.com/matrix-org/matrix-analytics-events/pull/101

* Add test

* Fix comment a bit

* Update to new analytics events package
2024-04-22 16:15:29 +00:00
David Baker
cc7edade21
Move the TAC to above the button (#12438)
* Move the TAC to above the button

This isn't what the designs say, but there is a (bug/feature)* in
radix where it will turn a mouseup event within the menu into a
click so that it activates the menu option that's under your cursor
when you lift the button, even if you pressed the button down on
a different item. Unfortunately it forgot to check that the mouse
down happened in the menu, so if the menu appears under the cursor,
the cursor, it will immediately select whatever option appeared under
the cursor.

I think the simplest solution here is to just move the menu above the
TAC button. This also makes it consistent† with quick settings.

*delete as applicable
†Not actually consistent because it fades in a different way

* Update snapshots
2024-04-19 09:04:48 +00:00
Florian Duros
48a3a0992e
Merge branch 'refs/heads/develop' into florianduros/tooltip-update 2024-04-18 10:09:31 +02:00
Richard van der Hoff
04b5b587a1
Expected UTDs: report a different Posthog code (#12389)
* `DecryptionFailureTracker`: stronger typing

Use `DecryptionFailureCode` rather than string

* `DecryptionFailureTracker`: remove use of `DecryptionError`

The second argument to `MatrixEventEvent.Decrypted` callbacks is deprecatedf,
and we can get the info we need direct from the event. This means that we no
longer need to reference the internal `DecryptionError` class in the js-sdk.

* `DecryptionFailureTracker`: use a different Posthog code for historical UTDs

* Update for new UTD error codes
2024-04-17 12:36:01 +00:00
David Langley
6cec2bba0f
Use the same logic in prevews as the timeline to hide events that should be hidden (#12434)
* use the same logic in prevews as the timeline to hide events that should not be shown

* skip any events we should hide, don't need to special case Replace events as we should be ignoring them(getContent() will use replacingEvent)

* lint
2024-04-17 12:32:28 +00:00
Florian Duros
9b5d4716e2
Merge branch 'develop' into florianduros/tooltip-update 2024-04-17 11:57:12 +02:00
Hubert Chathi
04a2191cad
fix selector so maths support doesn't mangle divs (#12433) 2024-04-16 16:53:57 +00:00
David Baker
06e0404639
Make empty state copy for TAC depend on the value of the setting (#12419)
* Make empty state copy for TAC depend on the value of the setting

* Update test snapshot

* Fix snapshot

Run the whole file or the radix IDs will br wrong 🤦

* Simplify to a ternary
2024-04-16 11:38:20 +00:00
Richard van der Hoff
5ed68efa6c
New context for local device verification (#12417)
* New context for local device verification

* Fix up tests

* Use PropsWithChildren
2024-04-16 09:43:27 +00:00
Florian Duros
e53b175a6b
Merge branch 'develop' into florianduros/tooltip-update 2024-04-16 09:51:05 +02:00
Hubert Chathi
31373399f9
Add support for device dehydration v2 (#12316)
* rehydrate/dehydrate device if configured in well-known

* add handling for dehydrated devices

* some fixes

* schedule dehydration

* improve display of own dehydrated device

* created dehydrated device when creating or resetting SSSS

* some UI tweaks

* reorder strings

* lint

* remove statement for testing

* add playwright test

* lint and fix broken test

* update to new dehydration API

* some fixes from review

* try to fix test error

* remove unneeded debug line

* apply changes from review

* add Jest tests

* fix typo

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* don't need Object.assign

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-04-15 15:47:15 +00:00
Florian Duros
c6325e27d2
Update tests 2024-04-15 16:56:54 +02:00
Florian Duros
95c0ff9da9
Fix typing issues 2024-04-15 16:06:01 +02:00
Florian Duros
79cbfafce3
Merge branch 'refs/heads/develop' into florianduros/tooltip-update 2024-04-15 15:13:51 +02:00
Thor Arne Johansen
6392759bec
Replace SecurityCustomisations with CryptoSetupExtension (#12342)
* Changed call sites from customisations/security to ModuleRunner.extensions

* Updated depenndecy and added tests

* Fixed style and formatting with prettier

* Fix according to Element PR comments

* Fixing issues raised in PR review

* Removed commented code. Improved encapsulation. Removed noisy logging

* Improved language of comment about calling the factory

* Refactor to get better encapsulation

* Find a better name. Provide explicit reset function. Provide more TSDoc

* Simplify mock for cryptoSetup, and add assertion for exception message.

* Remove unused className property. Adjust TSDoc comments

* Fix linting  and code style issues

* Added test to ensure we canregister anduse experimental extensions

* Fix linting and code-style issues

* Added test to ensure only on registration of experimental extensions

* Added test toensure call to getDehydratedDeviceCallback()

* Test what happens when there is no implementation

* Iterating cryptoSetup tests

* Lint/prettier fix

* Assert both branches when checking for dehydrationkey callback

* Update src/modules/ModuleRunner.ts

Language and formatting

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update src/modules/ModuleRunner.ts

Reset by setting a fresh ExtensionsManager

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update src/modules/ModuleRunner.ts

Use regular comment instead of TSDoc style comment

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update test/MatrixClientPeg-test.ts

No need to extend the base class

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update src/modules/ModuleRunner.ts

Fix spelling

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update src/modules/ModuleRunner.ts

Fix spelling

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update src/modules/ModuleRunner.ts

Fix TSDoc formatting

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Simplify mock setup

* Simplified mock and cleaned up a bit

* Keeping track of extensions is an implementation detail internal to ExtensionsManager.  Language and punctuation

* Addressed issues and comments from PR review

* Update src/modules/ModuleRunner.ts

Keep the flags to track implementations as direct properties

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Fix flattening of implementation map

* Update src/modules/ModuleRunner.ts

Fix whitespace

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-04-12 15:15:17 +00:00
David Baker
14cc44e820
Add activity toggle for TAC (#12413)
* Add activity toggle for TAC

* Update test snapshots for new toggles

* Add test for TAC activity setting set to false

* Update snapshot for old notifications panel test too

* Fix test

* Rename setting

* Rename variables too

* Sort i18n keys

* Use functional component
2024-04-12 13:18:09 +00:00
Florian Duros
5354e6efea
Use new compound tooltip 2024-04-12 14:56:23 +02:00
Michael Telatynski
77dfc1abee
Fix inability to join a knock room via space hierarchy view (#12404)
* Fix inability to join a `knock` room via space hierarchy view

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

* Update src/components/structures/SpaceHierarchy.tsx

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Add test

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>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-04-11 11:18:16 +00:00
Timo
d35fce198c
Call Guest Access, give user the option to change the acces level so they can generate a call link. (#12401)
* Ask the user to change the room access settings if they click the create link button.

Signed-off-by: Timo K <toger5@hotmail.de>

* disable call button if appropriate.

Signed-off-by: Timo K <toger5@hotmail.de>

* Add tests
Refactor tests to be in CallGuestLinkButton-test instead of the RoomHeader

Signed-off-by: Timo K <toger5@hotmail.de>

* add test for: no button if cannot change join rule and room not public nor knock

Signed-off-by: Timo K <toger5@hotmail.de>

* fix tests

Signed-off-by: Timo K <toger5@hotmail.de>

* add JoinRuleDialog tests

Signed-off-by: Timo K <toger5@hotmail.de>

* move spy into before each

Signed-off-by: Timo K <toger5@hotmail.de>

* Update src/i18n/strings/en_EN.json

Co-authored-by: Robin <robin@robin.town>

* remove inline css and update modal style

Signed-off-by: Timo K <toger5@hotmail.de>

* Update src/i18n/strings/en_EN.json

Co-authored-by: Robin <robin@robin.town>

* Update src/i18n/strings/en_EN.json

Co-authored-by: Robin <robin@robin.town>

* Invite state was not reactive.
Changing power level did not update the ui.

Signed-off-by: Timo K <toger5@hotmail.de>

* linter

Signed-off-by: Timo K <toger5@hotmail.de>

* make useGuestAccessInformation use useRoomState

Signed-off-by: Timo K <toger5@hotmail.de>

* fix tests and simplify logic

* fix tests

* review

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Robin <robin@robin.town>
2024-04-10 14:46:27 +00:00
David Baker
59395abb6b
Focus the thread panel when clicking on an item in the TAC (#12410)
* Focus the thread panel when clicking on an item in the TAC

actually the 'close' button in the threads panel as it's the only
interactive element: we can improve this later when we use landmarks
& generally have better a11y.

* Undo minor refactoring

as none of it is test3ed, it's not worth it.

* add unit test

* Add matrixchat tests

* Needs awaits

* ts-ignore

* Fix test (I think...)

* Remove unnecessary value set

* Not how assignments work
2024-04-10 13:13:08 +00:00
Florian Duros
5815e70b76
TAC: Release Announcement (#12380)
* WIP

* Store the release announcements in the account settings

* Update TAC release announcement description

* Fix settings content comparison

* Add logging in case of failure

* Watch settings changes

* I add release announcement settings to disable it

* Disable release announcement in e2e test

* Add release announcement in e2e test

* Add tests for ReleaseAnnouncementStore.ts

* Update compound-web to `3.3.0`

* Update TAC tests

* Update Labs tests

* Nits

* Add test for ReleaseAnnouncement.tsx

* Update `@vector-im/compound-web`

* Add playwright snapshot

* Delete false playwright screenshot

* Wait for EW to be displayed after reload

* Add screenshot

* Clean util file

* Renaming and comments fixing

* Use second store instead of looking in the store.

---------

Co-authored-by: R Midhun Suresh <hi@midhun.dev>
2024-04-08 08:43:59 +00:00
Timo
015b9386e1
change logic of when to show the call and share button. (#12385)
Allow starting calls in rooms with only one person if one can add invite others with a call link.

Signed-off-by: Timo K <toger5@hotmail.de>
2024-04-04 13:36:07 +00:00
David Baker
4ae94ae247
Mark all threads as read button (#12378)
* Mark all threads as read button

* Wrap in TooltipProvider and update snapshots

* Remove TooltipProvider wrapper: just add it to the test

* Add some more tests

* Add test for no-room-context handler because sonarcloud

* Add playwright test

* Make assertNoTacIndicator wait

* Use dedicated useMatrixClientContext function

Co-authored-by: Florian Duros <florianduros@element.io>

* Use dedicated useRoomContext function

Co-authored-by: Florian Duros <florianduros@element.io>

* Compound spacing variables

Co-authored-by: Florian Duros <florianduros@element.io>

* Compound spacing variables

Co-authored-by: Florian Duros <florianduros@element.io>

* Imports

* Use createTestClient()

* Add function to utils

* Use mkRoom

---------

Co-authored-by: Florian Duros <florianduros@element.io>
2024-03-28 17:38:21 +00:00
Timo
09f0d11e7f
Fix external guest access url for unencrypted rooms (#12345)
* use unencrypted calls in unencrypted rooms (make external call links compatible with unencrypted embedded calls)

Signed-off-by: Timo K <toger5@hotmail.de>

* use same logic in Call.ts

Signed-off-by: Timo K <toger5@hotmail.de>

* fix tests

Signed-off-by: Timo K <toger5@hotmail.de>

* fix test

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
2024-03-28 12:25:00 +00:00
Will Hunt
75a989e409
Revert "Make EC widget theme reactive - Update widget url when the theme chan…" (#12382)
This reverts commit c42562ef39.
2024-03-28 12:04:14 +00:00
Michael Telatynski
ddadbf64fe
Allow popping out a Jitsi widget to respect Desktop web_base_url config (#12376)
* Allow popping out a Jitsi widget to respect Desktop `web_base_url` config

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-03-26 16:27:11 +00:00
Richard van der Hoff
4702da8038
Convert DecryptionFailureTracker-test to typescript (#12368)
* Remove reference to private method

`MatrixEvent.setClearData` is private. Use the test helper instead.

* Remove redundant params to `expect.toBe`

* Convert to typescript
2024-03-25 19:57:29 +00:00
Timo
a24aa7e0f7
Video call meta space (#12297)
* add video room meta space button

Signed-off-by: Timo K <toger5@hotmail.de>

* Add videoRoomsSpace to meta space configuration

Signed-off-by: Timo K <toger5@hotmail.de>

* temp

Signed-off-by: Timo K <toger5@hotmail.de>

* dont show ppl section in video room space

Signed-off-by: Timo K <toger5@hotmail.de>

* add i18n strings

Signed-off-by: Timo K <toger5@hotmail.de>

* revert waitForIframe=false (this is part of another PR)

Signed-off-by: Timo K <toger5@hotmail.de>

* fix missing mock room method

Signed-off-by: Timo K <toger5@hotmail.de>

* test snapshot: add video room meta space

Signed-off-by: Timo K <toger5@hotmail.de>

* rename Conferences -> Conference

Signed-off-by: Timo K <toger5@hotmail.de>

* space panel snap test

Signed-off-by: Timo K <toger5@hotmail.de>

* update snapshot

Signed-off-by: Timo K <toger5@hotmail.de>

* fix test

Signed-off-by: Timo K <toger5@hotmail.de>

* add video room space tests

Signed-off-by: Timo K <toger5@hotmail.de>

* better logic

Signed-off-by: Timo K <toger5@hotmail.de>

* Add Video MetaSpace Test

Signed-off-by: Timo K <toger5@hotmail.de>

* make room join rule update reactive for the video room meta space

Signed-off-by: Timo K <toger5@hotmail.de>

* temp

Signed-off-by: Timo K <toger5@hotmail.de>

* fix description for meta space video room settings

Signed-off-by: Timo K <toger5@hotmail.de>

* tests

Signed-off-by: Timo K <toger5@hotmail.de>

* update snapshot

Signed-off-by: Timo K <toger5@hotmail.de>

* review

Signed-off-by: Timo K <toger5@hotmail.de>

* i18n

Signed-off-by: Timo K <toger5@hotmail.de>

* fix tests

Signed-off-by: Timo K <toger5@hotmail.de>

* put video meta space behind "feature_video_rooms" labs flag

Signed-off-by: Timo K <toger5@hotmail.de>

* review

Signed-off-by: Timo K <toger5@hotmail.de>

* update space store on RoomCreate state event

Signed-off-by: Timo K <toger5@hotmail.de>

* test for updating video room space on room type update

Signed-off-by: Timo K <toger5@hotmail.de>

* remove comment

Signed-off-by: Timo K <toger5@hotmail.de>

* also make knock join rule rooms part of the conference section

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
2024-03-25 18:35:31 +00:00
Richard van der Hoff
157ca48dff
Remove references to matrix-js-sdk/src/crypto/verification (#12365)
All this stuff is deprecated and has better alternatives now.
2024-03-25 17:44:45 +00:00
Michael Telatynski
ef2bd7ae04
Improve types for sendEvent (#12335) 2024-03-25 12:48:48 +00:00
Michael Telatynski
4941327c78
Avoid using deprecated exports & methods from matrix-js-sdk (#12359) 2024-03-25 12:21:02 +00:00
Michael Telatynski
56d7911897
Iterate styles around Link new device via QR (#12356)
* Rearrange user settings tab order to move Sessions up to 2nd

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

* Iterate copy & iconography on Settings > Sessions > Link new device

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

* Iterate design of Scan QR code screen

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

* Tweak styles

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

* Update tests and snapshots

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

* Update tests and snapshots

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>
2024-03-22 15:50:06 +00:00
Richard van der Hoff
64806d0490
Use test helpers from js-sdk for encrypted events (#12364)
* Use test helpers from js-sdk for encrypted events

Rather than gut-wrenching into the matrix-js-sdk, let's use the newly-exported
test helpers to generate encrypted events.

* Fix up
2024-03-22 15:48:29 +00:00
David Baker
8f22550f19
Merge pull request #12336 from matrix-org/andybalaam/stas-demydiuk-membership-type3
Introduce Membership type (take 2)
2024-03-22 15:36:39 +00:00
Richard van der Hoff
d36c1b39fd
Clean up some references to internal js-sdk classes (#12363)
* Fix references to `crypto-api/verification`

This is supposed to be an internal module; use the front door instead.

* `IRecoveryKey` -> `GeneratedSecretStorageKey`

`IRecoveryKey` is just a backwards-compatibility alias for
`GeneratedSecretStorageKey`

* `ISecretStorageKeyInfo` -> `SecretStorage.SecretStorageKeyDescription`

Again, same thing

* `IPassphraseInfo` -> `SecretStorage.PassphraseInfo`

* Remove unused import restriction exceptions
2024-03-22 12:28:13 +00:00
Robin
a0795c7518
Improve readability of badges and pills (#12360)
* Improve readability of badges and pills

Badges will now always use light theme colors so that they become white-on-gray in both themes, and the contrast of pills has been increased so that they use primary action colors as the background.

* Fix tests
2024-03-22 00:27:13 +00:00
Andy Balaam
d7bdbee8d2 Merge branch 'develop' into andybalaam/stas-demydiuk-membership-type3 2024-03-20 17:25:23 +00:00
Michael Telatynski
2cbf92860b
Improve types for sendStateEvent (#12331) 2024-03-20 14:27:29 +00:00
Michael Telatynski
4a05de485e
Improve code-splitting of highlight.js and maplibre-gs libs (#12349)
* Dynamic import anything that touches maplibre-gs

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

* Dynamic import anything that touches highlight.js

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

* Fix types

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-03-20 13:39:20 +00:00
Tulir Asokan
79c50db009
Use data-mx-color for rainbows (#12325)
* Use data-mx-color for rainbows

The font tag may be deprecated soon (https://github.com/matrix-org/matrix-spec/pull/1739)

Signed-off-by: Tulir Asokan <tulir@maunium.net>

* Update tests

Signed-off-by: Tulir Asokan <tulir@maunium.net>

---------

Signed-off-by: Tulir Asokan <tulir@maunium.net>
2024-03-19 23:34:11 +00:00
Florian Duros
ddd0ec48ac
Change user permission by using a new apply button (#12346)
* Add PowerLevelSelector.tsx.
It's extracting the current behavior of the privileged users and muted of `RolesRoomSettingsTab.tsx` into a dedicated component.
It's also adding a new apply button.

* Use `PowerLevelSelector` to render privileged and muted users in `RolesRoomSettingsTab`

* Update existing tests

* Add playwright test

* Fix typo

* Fix typo
2024-03-19 13:45:23 +00:00
David Baker
a5ed97b903
Mark as Unread (#12254)
* Support the mark as unread flag

* Add mark as unread menu option

and make clering notifications also clear the unread flag

* Mark as read on viewing room

* Tests

* Remove random import

* Don't show mark as unread for historical rooms

* Fix tests & add test for menu option

* Test RoomNotificationState updates on unread flag change

* Test it doesn't update on other room account data

* New icon for mark as unread

* Add analytics events for mark as (un)read

* Bump to new analytics-events package

* Read from both stable & unstable prefixes

* Cast to boolean before checking

to avoid setting state unnecessarily

* Typo

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Doc external interface (and the rest at the same time)

* Doc & rename unread market set function

* Doc const exports

* Remove listener on destroy

* Add playwright test

* Clearer language, hopefully

* Move comment

* Add reference to the MSC

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Expand on function doc

* Remove empty beforeEach

* Rejig badge logic a little and add tests

* Fix basdges to not display dots in room sublists again

and hopefully rename the forceDot option to something that better
indicates what it does, and add tests.

* Remove duplicate license header (?)

* Missing word (several times...)

* Incorporate PR suggestion on badge type switch

* Better description in doc comment

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update other doc comments in the same way

* Remove duplicate quote

* Use quotes consistently

* Better test name

* c+p fail

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-03-19 13:28:20 +00:00