Commit graph

47825 commits

Author SHA1 Message Date
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
ElementRobot
51a543643e
[create-pull-request] automated change (#12502)
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
2024-05-08 07:40:57 +00:00
RiotRobot
d1eab0aa7e Reset matrix-js-sdk back to develop branch 2024-05-07 12:25:19 +00:00
RiotRobot
2bf15d8174 Resetting package fields for development 2024-05-07 12:25:08 +00:00
RiotRobot
e1d7b1ca3e Merge branch 'master' into develop 2024-05-07 12:25:07 +00:00
RiotRobot
462b0ff8ac v3.99.0 2024-05-07 12:24:06 +00:00
RiotRobot
79c79f66d6 Upgrade dependency to matrix-js-sdk@32.2.0 2024-05-07 12:17:34 +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
Michael Telatynski
e2310e637c
Update end-to-end-tests.yaml 2024-05-07 11:47:35 +01: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
Florian Duros
caef3c1921
Tooltip: improve accessibility in room (#12493)
* Migrate to `AccessibleButton`

* Update snapshots

* Update snapshots
2024-05-07 10:20:46 +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
Ilan Varillon
c121167087
fix avatar stretched on 1:1 call (#12494)
Co-authored-by: Florian Duros <florianduros@element.io>
2024-05-06 08:28:02 +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
David Baker
050f61752f
Convert tabbedview to functional component (#12478)
* 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

* Change to sub-components

and use contitional call syntax

* Comments

* Fix element IDs
2024-05-03 12:59:56 +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
RiotRobot
a34dbbc0fa v3.99.0-rc.1 2024-05-02 15:07:45 +00:00
ElementRobot
11731809b0
[Backport staging] TAC: Fix accessibility issue when the Release announcement is displayed (#12484)
Co-authored-by: Florian Duros <florianduros@element.io>
2024-05-02 16:01:15 +01:00
Florian Duros
c152bfd83c
[Backport staging] TAC: Close Release Announcement when TAC button is clicked (#12485) 2024-05-02 16:01:13 +01: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
Michael Telatynski
5dc3ad546c
Improve comments and types in MatrixClientPeg (#12477)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-05-01 13:22:29 +00:00
renovate[bot]
74e7195a61
Update react-types (#11815)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-01 13:11:43 +01:00
renovate[bot]
091499810c
Update dependency posthog-js to v1.130.1 (#12479)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-01 10:26:39 +00:00
ElementRobot
d66cd51186
[create-pull-request] automated change (#12476)
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
2024-05-01 06:22:30 +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]
1c79bbb1ae
Update dependency typescript to v5.4.5 (#12422)
* Update dependency typescript to v5.4.5

* Fix types

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 15:28:23 +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
renovate[bot]
3ca79968d3
Update dependency stylelint to v16.4.0 (#12470)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30 14:33:55 +00:00
renovate[bot]
016533b761
Update dependency @sentry/browser to v7.112.2 (#12469)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30 13:44:59 +00:00
renovate[bot]
6504cf5c7c
Update typescript-eslint monorepo to v7.7.1 (#12467)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30 13:43:59 +00:00
renovate[bot]
c2e632521b
Update babel monorepo to v7.24.5 (#12465)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30 13:35:23 +00:00
renovate[bot]
9a0d0718f9
Update dependency eslint-plugin-react-hooks to v4.6.2 (#12466)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30 13:35:03 +00:00
renovate[bot]
dbedeca07d
Update matrix-org (#12426)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30 13:07:52 +00:00
RiotRobot
d813457c42 v3.99.0-rc.0 2024-04-30 12:13:38 +00:00
RiotRobot
a6f7aa6ebb Upgrade dependency to matrix-js-sdk@32.2.0-rc.0 2024-04-30 12:03:59 +00:00
Michael Telatynski
f648f00727
Update end-to-end-tests.yaml 2024-04-30 11:03:44 +01: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
Michael Telatynski
3634e665b1
Update end-to-end-tests.yaml 2024-04-30 10:35:12 +01:00
Michael Telatynski
16a01d834f
Update end-to-end-tests.yaml 2024-04-30 10:28:29 +01:00
Florian Duros
9aeaa388cc
Tooltip: Use AccessibleButton in dialogs (#12460)
* Update dialogs

* Use default right placement
2024-04-29 22:26:44 +00:00