291 Commits

Author SHA1 Message Date
R Midhun Suresh
7ff1fd259d
Room List Store: Support filters by implementing just the favourite filter (#29433)
* Implement the favourite filter

* Make the room node capable of dealing with filters

- Holds data to indicate which filters apply
- Provides method to check if a given set of filters apply to this node
- Provides a method to recalculate which filters apply

* Wire up the filtering mechanism in skip list

* Use filters in the store

* Remove else

* Use a set instead of map
2025-03-06 12:43:25 +00:00
Will Hunt
8d891cde53
Move toggle switch for integration manager for a11y (#29436)
* Move toggle switch for integration manager for a11y

* Update test

* add toggle_label

* lint
2025-03-06 11:55:41 +00:00
Florian Duros
90cc44b340
New room list: basic flat list (#29368)
* chore: make the room list panel a flexbox

* feat(new room list): add `RoomListCell` component

* feat(new room list): add virtualized `RoomList` component

* feat(new room list): add `RoomListView` component

* feat(new room list): use `RoomListView` in `RoomListPanel`

* test(new room list): add test for room cell

* test(new room list): update room list panel tests

* test(new room list): add test to virtualized room list

* test(e2e): add room list tests

* test(e2e): update room panel tests
2025-03-06 10:01:55 +00:00
David Langley
b6c872142b
Add space to the bottom of the room summary actions below leave room (#29270)
* Add space to the bottom of the room summary actions below leave room

* 8x not 6x

* Spacing needs to be within the scoll content, add it to the bottom of the leave action

* Update RoomSummaryCard-test.tsx.snap

* Fix snapshot and add screenshot test
2025-03-06 08:44:29 +00:00
Will Hunt
3762d40620
Improve rageshake upload experience by providing useful error information (#29378)
* Refactor submit rageshake so that it uses the new error codes.

* Improve error information given in Bug Report Dialog

* use type

* Refactor with generic error & policy link.

* lint

* lint

* Add BugReportDialog test

* fix time travel

* use waitFor while waiting for fetch to finish

* lint

* Drop error prefix as per 3973bb38ef

* small fixes

* Don't change string here.

* Fixup i18n strings.
2025-03-06 08:38:41 +00:00
Robin
aa996010b4
Show error screens in group calls (#29254)
* Avoid destroying calls until they are hidden from the UI

We often want calls to exist even when no more participants are left in the MatrixRTC session. So, we should avoid destroying calls as long as they're being presented in the UI; this means that the user has an intent to either join the call or continue looking at an error screen, and we shouldn't interrupt that interaction.

The RoomViewStore is now what takes care of creating and destroying calls, rather than the CallView. In general it seems kinda impossible to safely create and destroy model objects from React lifecycle hooks, so moving this responsibility to a store seemed appropriate and resolves existing issues with calls in React strict mode.

* Wait for a close action before closing a call

This creates a distinction between the user hanging up and the widget being ready to close, which is useful for allowing Element Call to show error screens when disconnected from the call, for example.

* Don't expect a 'close' action in video rooms

These use the returnToLobby option and are expected to remain visible when the user leaves the call.
2025-03-05 20:41:26 +00:00
R Midhun Suresh
e9a3625bd6
Add more functionality to the room list vm (#29402)
* Add more vm functionality

- Listen for updates from the store
- Provide a method to open rooms

* Write test
2025-03-05 08:54:04 +00:00
renovate[bot]
b721505211
Update all non-major dependencies (#29415)
* Update all non-major dependencies

* Iterate

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>
2025-03-04 17:03:32 +00:00
Hubert Chathi
56c7fc1948
Prevent user from accidentally triggering multiple identity resets (#29388)
* prevent user from accidentally triggering multiple identity resets

* apply changes from review and update to latest design

* Use a CSS class and compound variable

* update snapshot

* Update test/unit-tests/components/views/settings/encryption/ResetIdentityPanel-test.tsx

---------

Co-authored-by: Richard van der Hoff <richard@matrix.org>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-03-04 16:40:35 +00:00
renovate[bot]
1770b94ed3
Update dependency typescript to v5.8.2 (#29417)
* Update dependency typescript to v5.8.2

* 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>
2025-03-04 15:01:20 +00:00
Michael Telatynski
31af8b07dd
Remove buggy tooltip on room intro & homepage (#29406)
* Remove buggy tooltip on room intro & homepage

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

* Add knip ignore

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-03-04 13:24:38 +00:00
R Midhun Suresh
21e9d93e69
Room List Store: Filter rooms by active space (#29399)
* Add method to await space store setup

Otherwise, the room list store will get incorrect information about
spaces and thus will produce an incorrect roomlist.

* Implement a way to filter by active space

Implement a way to filter by active space

* Fix broken jest tests

* Fix typo

* Rename `isReady` to `storeReadyPromise`

* Fix mock in test
2025-03-04 11:27:41 +00:00
Richard van der Hoff
4b02520453
Remove redundant UserIdentityWarning test (#29403)
* Remove redundant `UserIdentityWarning` test

Since the refactoring in https://github.com/element-hq/element-web/pull/29067,
this test is redundant.

It is also flaky and hard to understand. Time for it to die.

* delint
2025-03-03 15:28:46 +00:00
R Midhun Suresh
bf48100d31
Room List - Update the room list store on actions from the dispatcher (#29397)
* Update the store on action

* Add more tests

* Add newlines between case blocks

* Make code more readable

- Make if/else more consistent
- Add comment on findAndAddRoom()

* Add more tests

* Remove redundant code

On a timeline action, we return early if payload.room is falsy.
So then why do we need to retry fetching the room?
I think this can be removed but will ask others if there's some
conext I'm missing.

* Fix test

* Remove more redundant code

* Add more tests

* Explain intention in comment

* Emit only once even when adding multiple rooms

* Add missing tsdoc
2025-03-03 15:08:14 +00:00
R Midhun Suresh
2da21248bb
Room List - Implement a minimal view model (#29357)
* Implement enough of the new store to get a list of rooms

* Make it possible to swap sorting algorithm

* Don't attach to window object

We don't want the store to be created if the labs flag is off

* Remove the store class

Probably best to include this PR with the minimal vm implmentation

* Create a new room list store that wraps around the skip list

* Create a minimal view model

* Fix CI

* Add some basic tests for the store

* Write more tests

* Add some jsdoc comments

* Add more documentation

* Add more docs
2025-03-03 11:12:00 +00:00
Florian Duros
7db909a47d
new room list: keep space name in one line in header (#29369)
* fix(new room list): keep space name in one line in header

* test(new room list): update tests
2025-02-28 08:34:06 +00:00
Florian Duros
0997e0a747
refactor: rename RoomListView as RoomListPanel (#29361) 2025-02-26 11:14:04 +00:00
Florian Duros
f95218e2b7
New room list: add space menu in room header (#29352)
* feat(new room list): add space menu in view model

* test(new room list): add space menu in view model

* feat(new room list): add space menu in room list header

* chore: update i18n

* test(new room list): add tests for space menu

* test(new room list): update room list tests

* test(e2e): add tests for space menu
2025-02-25 14:06:01 +00:00
R Midhun Suresh
fe353542cb
Room List - Store sorted rooms in skip list (#29345)
* Implement a skip list for storing rooms

This data structure stores rooms in a given sorted order and allows for
very fast insertions and deletions.

* Export function to get last timestamp of room

* Write tests for the skip list

* Implement enough of the new store to get a list of rooms

* Make it possible to swap sorting algorithm

* Fix comment

* Don't attach to window object

We don't want the store to be created if the labs flag is off

* Remove the store class

Probably best to include this PR with the minimal vm implmentation
2025-02-25 13:12:37 +00:00
Richard van der Hoff
3cc1ccd029
Dismiss "Key storage out of sync" toast when secrets received (#29348)
* DeviceListener: improve logging

use a LogSpan to tie together logs from the same run, and add some more logs
for various cases

* Regression playwright test

* Remove unused mocking of `getCrossSigningId`

DeviceListener no longer reads this thing

* Clean up unit tests

Remove redundant describe block

* Remove the "out of sync" toast when we are no longer out of sync

Receiving the crypto secrets via secret sharing should make the toast go away.
2025-02-25 12:13:42 +00:00
Florian Duros
43efd911c7
New room list: add dial to search section (#29359)
* feat(new room list): add dial to new room list

* test(new room list): test dial button

* test(new room list): update room list test
2025-02-25 11:03:29 +00:00
Florian Duros
efc6149a8b
Update @vector-im/compound-design-tokens & @vector-im/compound-web (#29307)
* chore: update `@vector-im/compound-design-tokens` & `@vector-im/compound-web` to last version

* chore: use `error-solid` icon instead of `error`

* chore: update jest snapshot

* fix: `AccessibleButton` lint
2025-02-24 17:08:12 +00:00
Florian Duros
7d94fa9b03
New room list: add compose menu for spaces in header (#29347)
* feat(new room list): add compose menu in header for spaces

* test(new room list): add tests for space

* test(e2e new room list): update space test

* chore: formatting and reuse type var
2025-02-24 15:51:50 +00:00
David Langley
27c0e97e44
Fix test that doesn't make sense in usePublicRoomDirectory-test.tsx (#29335)
* remove test that doesn't make sense

* Actually let's fix the test rather than remove it

* Add comment, remove consoles.
2025-02-22 00:17:13 +00:00
David Langley
0cbc6f99d0
Set language explicitly (#29332) 2025-02-22 00:16:33 +00:00
David Langley
d8904a6e56
getByRole is slow on large trees, use getByText (#29331) 2025-02-21 13:45:52 +00:00
Will Hunt
22943ee06a
Use EditInPlace control for Identity Server picker to improve a11y (#29280)
* Use EditInPlace for identity server picker.

* Exclude picker from default dialog button styles.

* Remove unused import.

* Update test

* Remove unused css

* Update test

* drop only

* Add a test for setting an ID server.

* Add a unit test for SetIdServer

* fix tests

* Reformat mx_Dialog button :not list to use a more readable selector.

* Reformat other :not sections

* forgot a comma

* We're in 2025 now.

* Update copyright + use class methods.
2025-02-21 13:18:14 +00:00
Florian Duros
fb57924350
First step to add header to new room list (#29320)
* feat: create new header

* test: add tests to view model

* test: add tests to view

* feat: add header to new room list

* test(e2e): update RoomListView snapshot

* test(e2e): add tests for room list header

* refactor: minor code improvement
2025-02-20 15:40:19 +00:00
David Baker
e8954f08ce
Move CSS for ResetIdentityPanel into EncryptionCard (#29311)
* Move CSS for ResetIdentityPanel into EncryptionCard

This allows it to be re-used in other components. It's a *bit* magic
that EncryptionCard applies style to divs within it, although it
somewhat makes sense that it wants them styled a particular way.
The alternative would be to add another component for a div child of
encryption card like EncryptionCardButtons that just makes it flexbox
and centered: I'm not sure which is better.

* Update snapshot

* Update snapshot

* Do it the other way

Because we only want it in the destructive cards, not the other ones.

* Use flex component

* Also use gap prop and update snapshots

* Fix justification

* Snaspshots again

* Set align-items to normal

As center affected the list items too. Also add it to the flex
component because it didn't have it as an option.
2025-02-20 13:20:49 +00:00
Michael Telatynski
e47d7aaaff
Add Windows 64-bit arm link and remove 32-bit link on compatibility page (#29312)
* Add Windows 64-bit arm link and remove 32-bit link on compatibility page

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>
2025-02-19 16:17:56 +00:00
Florian Duros
28ed506fe1
refactor: rename RoomListHeader as LegacyRoomListHeader (#29308) 2025-02-19 14:06:01 +00:00
renovate[bot]
261923832d
Update dependency caniuse-lite to v1.0.30001699 (#29297)
* Update dependency caniuse-lite to v1.0.30001699

* Update tests

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>
2025-02-18 20:29:47 +00:00
David Baker
61d55462df
Honour the backup disable flag from Element X (#29290)
* Honour the backup disable flag from Element X

This unfortunately named and unspecced flag is set by Element X
to denote that the user has chosen to disable key storage and it
should not automatically try to enable it again. This changes Element
web to not prompt to enable recovery if this flag is set.

* Remove unnecessary conditional

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

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2025-02-18 15:06:00 +00:00
David Baker
b7fea97bb6
Factor out duplicated CSS for buttons in encryption settings (#29269)
* Factor out duplicated CSS for buttons in encryption settings

By adding a component to hold the common CSS

* Update snapshot

* Update snapshot

* More snapshots

* Split EncryptionCardButtons out to separate component

* Update imports
2025-02-18 11:01:48 +00:00
Michael Telatynski
dd2da5c132
Fix up UIA types and remove unused prop (#29255)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-02-17 09:53:26 +00:00
Richard van der Hoff
a365533367
ChangeRecoveryKey: error handling (#29262)
* CreateSecretStorageDialog: error handling

I'm fed up with setup operations in EW failing silently. Rather than leaving
the user with a mysteriously broken client, let's at least tell them that
something has gone wrong, so that they can report the issue and we can
investigate.

Obviously, showing an unactionable Error dialog is a last resort: ideally, we
should handle the error ourselves, or give the user actionable steps to resolve
the problem. But that takes significant design and engineering.

Just swallowing errors is the worst of all possible options.

* Fix typo in test name

* Improve test coverage
2025-02-14 16:44:34 +00:00
Will Hunt
c47ce59478
Render reason for invite rejection. (#29257)
* Render reason for invite rejection.

* Add test

* extra test
2025-02-14 10:58:20 +00:00
Florian D
2abd5342c2
New room list: add search section (#29251)
* feat(new room list): move `RoomListView` to its own folder and add styling

* feat(new room list): add search section

* test(new room list): add tests for `RoomListSearch`

* test(new room list): add tests for `RoomListView`

* test(e2e): add method to close notification toast to `ElementAppPage`

* test(e2e): add tests for the search section

* test(e2e): add tests for the room list view

* refactor: use Flex component

* fix: loop icon size in search button

* refactor: remove `focus_room_filter` listener
2025-02-13 15:49:09 +00:00
Florian D
85f80b1d0a
Replace focus_room_filter dispatch by Action.OpenSpotlight (#29259)
* refactor(room search): replace `focus_room_filter` dispatch by `Action.OpenSpotlight`

* test(LoggedInView): add test to Ctrl+k shortcut
2025-02-13 15:18:41 +00:00
Florian D
4b9382f888
New room list: hide favourites and people meta spaces (#29241)
* feat(new room list)!: hide Favourites and People meta spaces when the new room list is enabled

* test(space store): add testcase for new labs flag

* feat(quick settings): hide pin to sidebar and more options and add extra margin
2025-02-13 10:53:51 +00:00
R Midhun Suresh
03a5ee1c5b
New Room List: Create new labs flag (#29239)
* Create new labs flag

* Render empty room list view

* Reload on flag change

* Rename RoomList.tsx to LegacyRoomList.tsx

and rename NewRoomListView.tsx to RoomListView.tsx

* Update labs.md
2025-02-12 12:14:18 +00:00
David Baker
53c97dfa50
Don't reload roomview on offline connectivity check (#29243)
* Don't reload roomview on offline connectivity check

Doesn't look like this was a regression as far as I can see, but
you did have to switch rooms while offline for it to start happening.

There's no use reloading the room until we're online again.

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

* Add regression test

* Move it down the file to avoid changing the snapshots
2025-02-11 20:34:32 +00:00
Michael Telatynski
6fa8032caa
Respect user's 12/24 hour preference consistently (#29237)
* Respect user's 12/24 hour preference consistently

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

* Update test

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-02-11 14:16:59 +00:00
Richard van der Hoff
f2fae82e32
Log when we show, and hide, encryption setup toasts (#29235)
It's currently hard to debug when someone sees or hides one of these
toasts. Lets's add some logging.
2025-02-11 09:44:48 +00:00
Robin
ef69c0ddc7
Restore the accessibility role on call views (#29225)
This was mistakenly removed in a370a5cfa43. You can tell it was unintentional because the 'role' variable was just left unused.
2025-02-11 08:28:29 +00:00
Florian D
047e8e8a9c
Rename "security key" into "recovery key" (#29217)
* feat(crypto): rename "security key" into "recovery key" in lang file

* test(crypto): rename "security key" into "recovery key" in test files

* test(e2e crypto): rename "security key" into "recovery key" in test files

* doc(crypto): rename "security key" into "recovery key"
2025-02-10 16:52:39 +00:00
R Midhun Suresh
52b42c0b1c
Add new verification section to user profile (#29200)
* Create new verification section

* Remove old code and use new VerificationSection

* Add styling and translation

* Fix tests

* Remove dead code

* Fix broken test

* Remove imports

* Remove console.log

* Update snapshots

* Fix broken tests

* Fix lint

* Make badge expand with content

* Remove unused code
2025-02-10 11:22:58 +00:00
Florian D
4a8ba810a9
Encryption tab: display correct encryption panel when user cancels the reset identity flow (#29216)
* fix(encryption settings): check encryption state when user cancels the reset identity flow

* test(encryption settings): add test to check encryption state when user cancels the reset identity flow
2025-02-07 13:57:02 +00:00
Florian D
53f83124a0
Add Forgot recovery key? button to encryption tab (#29202)
* feat(crypto settings): add "Forgot  recovery key?" button to encryption tab

* test(crypto settings): add tests for `RecoveryPanelOutOfSync`

* test(crypto settings): update encryption tab test

* test(crypto settings): update and add e2e test
2025-02-06 10:54:20 +00:00
renovate[bot]
4a381c2a10
Update all non-major dependencies (#29194)
* Update all non-major dependencies

* Delint

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

* Iterate

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

* Prettier

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>
2025-02-05 13:25:06 +00:00