275 Commits

Author SHA1 Message Date
Andy Balaam
5b51fe48af
Add a scam warning to the manual verification dialog (#30101)
* Add a scam warning to the manual verification dialog

* fixup! Add a scam warning to the manual verification dialog
2025-06-10 12:29:48 +00:00
Andy Balaam
e7d940160a
Provide a devtool for manually verifying other devices (#30094)
Also allows doing the same thing via a slash command.
2025-06-10 10:55:05 +00:00
Will Hunt
a333856c50
Implement MSC4155: Invite filtering (#29603)
* Add settings for MSC4155

* copyright

* Tweak to not use js-sdk

* Update for latest MSC

* Various tidyups

* Move tab

* i18n

* update .snap

* mvvm

* lint

* add header

* Remove capability check

* fix

* Rewrite to use Settings

* lint

* lint

* fix test

* Tweaks

* lint

* revert copyright

* update screenshot

* cleanup
2025-06-10 10:47:33 +00:00
R Midhun Suresh
6103f7e3b4
Add low priority avatar decoration to room tile (#30065)
* Add avatar decoration for low priority rooms

* Write tests

* Remove unnecesasry step in test

* Make the vm expose which decoration to render

* Fix jest test

* Fix broken e2e test
2025-06-10 08:15:38 +00:00
Richard van der Hoff
3e8599bba0
AccessSecretStorageDialog: various fixes (#30093)
* AccessSecretStorageDialog: clear notice when input is empty

* AccessSecretStorageDialog: Simplify logic for calculating feedback

No functional changes, just simplification

* AccessSecretStorageDialog: use the right icon

Should be a ! in a circle, not an X. Also requires use of `Flex` to fix the
vertical alignment.

* AccessSecretStorageDialog: fix resizing when key is correct

* AccessSecretStorageDialog: remove confirmation on dialog close

Per discussion on https://github.com/element-hq/element-web/issues/30024, we
don't want this any more.
2025-06-09 10:27:14 +00:00
Richard van der Hoff
7eb16b3361
AccessSecretStorageDialog: fix inability to enter recovery key (#30090)
* BaseDialog: fix documentation, and make `onFinished` optional

Since `onFinished` isn't used if `hasCancel` is false, it's a bit silly to make
it mandatory.

* AccessSecretStorageDialog: fix inability to enter recovery key

Wrap AccessSecretStorageDialog in a `BaseDialog`. The main thing this achieves
is a `FocusLock`.

* playwright: factor out helper for verification

We have two copies of the same code, and we're about to add a third...

* playwright: test for verifying from Settings

* Add a unit test for BaseDialog
2025-06-06 11:21:29 +00:00
Florian Duros
140afea791
New room list: move message preview in user settings (#30023)
* feat: move message preview settings to user settings

* test: update tests

* test(e2e): update preference screenshots

* test(e2e): update room list tests

* fix: display message preview settings only for new room list

* test(e2e): display all preference settings in screenshot

* test: update snapshot
2025-06-05 14:14:09 +00:00
Florian Duros
311c038fe1
New room list: change room options icon (#30029)
* feat: change sort icon

* test(e2e): update screenshots

* test: update snapshots
2025-06-05 09:08:15 +00:00
R Midhun Suresh
2b1a4e007c
Low priority menu item should be a toggle (#30071)
* Use toggle on low priority menu item

* Fix broken tests
2025-06-04 17:51:58 +00:00
R Midhun Suresh
b9f319a9f5
Add sanity checks to prevent users from ignoring themselves (#30079)
* Fix missing state

* Throw error if membership event changes

* Write test

* Fix broken tests

* Cache inviter when room is loaded

* Translate error message for dialog
2025-06-04 17:39:19 +00:00
R Midhun Suresh
7d69ce39d9
Add low priority filter pill to the room list UI (#30060)
* Add low priority filter pill to the UI

* Fix tests
2025-06-02 08:20:15 +00:00
Matthew Hodgson
013f5a0c91
/share?msg=foo endpoint using forward message dialog (#29874)
* basic implementation of an /share?msg=foo endpoint

* SharePayload

* add sharing html & md while we're at it

* remove whitespace from imports to appease linter

* lint

* Add unit test

* More tests

* Test for showScreen

* Use one of the typed strings

* Test nasty tags stripped out

* Add playwright test

* Fix flake

by not relying on the name being synced as soon as we load

---------

Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2025-05-28 18:48:32 +00:00
Hubert Chathi
45182172b8
EW: Modernize the recovery key input modal (#29819)
* initial application of recovery key input redesign

* update styling to agree more with design, and fix jest tests

* look for the right element for entering the key

* fix more playwright tests

* use return value of validation function instead of state
2025-05-23 21:06:00 +00:00
Florian Duros
5d2d4947f4
New room list: move secondary filters into primary filters (#29972)
* feat: move secondary filters into primary filters in vm

* test: update room list view model tests

* feat: remove secondary filter menu

* test: update and remove secondary filter component tests

* feat: update i18n

* test: update remaining tests

* test(e2e): update screenshots and tests

* feat: add new cases for empty room list

* test(e2e): add more tests for empty room list for new primary filters
2025-05-20 14:44:29 +00:00
Andy Balaam
b539eda4fe
Prompt the user when key storage is unexpectedly off (#29912)
* Assert that we set backup_disabled when turning off key storage

* Prompt the user when key storage is unexpectedly off

* Playwright tests for the Turn on key storage toast
2025-05-20 12:28:22 +00:00
Florian Duros
22c7bf346c
New room list: move sort menu in room list header (#29983)
* feat: move sort and preview into room list header vm

* feat: move sort menu into room list header

* test: update tests

* test:update snapshots

* chore: remove secondary filter tests

* test(e2e): update screenshots
2025-05-19 13:25:12 +00:00
Florian Duros
b56b0f2bd0
New room list: rework spacing of room list item (#29965)
* feat: rework spacing of room list item

* test: update snapshot

* test(e2e): regenerate room list panel screenshots

* test(e2e): regenerate room list screenshots

* test(e2e): update filter screenshot
2025-05-16 12:29:52 +00:00
Marc
b07225eb60
Mvvm RoomSummaryCard (#29674)
* feat: create roomsummarycard viewmodel

* feat: use roomsummurycard vm in component

* test: jest unit RoomSummaryCard and RoomSummaryCardViewModel

* chore: rename to roomsummarycardview

* feat: reput room topic without vm

* test: roomSummaryCard and roomSummaryCardVM tests

* chore: add comments on roomsummarycardVM

* fix: merge conflict with roomsummarytopic, and move to vm right_panel

* fix(roomsummarycard): remove usetransition for search update

* fix: merged file that should be deleted

* fix: roomsummurycard not well merge with roomtopic

* test: update snapshots
2025-05-15 14:17:21 +00:00
David Baker
9642af9930
Re-order primary filters (#29957)
* Re-order primary filters

to match EX

* Update tests

* Update screenshots

* Try to make screenshot deterministic

* Just use the screenshot the CI spits out

* Try again

* Another screenshot
2025-05-15 13:15:24 +00:00
R Midhun Suresh
57d3b2d93c
RLS: Remove forgotten room from skiplist (#29933)
* Dispatch an action when room is forgotten

* Dispatch an action when room is forgotten

* Remove room on action

* Add test

* Write test for matrixchat

* Add payload info to comment
2025-05-15 10:04:05 +00:00
David Baker
1b48269db5
Add room list sorting (#29951)
* Add room list sorting

* Prettier

* Unit test

* Playwright test

* Lint

* Use released compound

* No tooltip wrapper needed
2025-05-15 08:27:33 +00:00
David Langley
76d7f6ab43
Fix extensions panel style (#29273)
* Stop empty state scrolling

* Fix separator inset, separator vertical spacing and margin above the add extensions button

* Add screenshot for add extensions button spacing

* Add variable for add extensions overlap

* use data-testid

* Fix snapshots
2025-05-14 17:22:32 +00:00
David Langley
69c1a8cd1c
Don't use the minimised width(68px) on the new room list (#29778)
* Don't toggle to the minimised left bar size.

* Don't re-style old room list when at the minimum size

* Only apply larger minimised with on new room list

* Don't tell child views we are minimised for the new room list

* move comment to the correct place

* address PR comments

* Don't wrap search text and add truncation down to a minimum of 50px

* Put min-width on the button so that we don't have to hardcode the 50px

* Keep the flex display, shrink and truncate just the search text and keep the shortcut

* Update snapshots

* Add comment for magic value

* Make inner search text a span

* Add e2e test for smallscreen to test responsiveness

* Update snapshots

* Forcing an empty commit to fix PR

* Change minWidth to 224
2025-05-14 17:21:27 +00:00
David Baker
be5dd058b3
Remove old filter test (#29963)
This wasn't testing what it thought it was testing because the primary
filters aren't present at all after selecting a secondary filter that's
not compatible with them, so it was just asserting that some other filter
(which had the same index as the old one) was disabled. It breaks if
the primary filters get reordered.
2025-05-14 13:12:34 +00:00
Michael Telatynski
c84cf3c36c
Remove legacy Safari/Firefox/IE compatibility aids (#29010)
* Remove legacy Safari prefix compatibility for AudioContext

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

* Remove more legacy webkit/ms/moz support

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

* Fix tests

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

* Improve coverage, cull dead code

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

* Simplify

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

* Improve coverage

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

* Improve coverage

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-05-13 10:51:05 +00:00
Michael Telatynski
e235100dd0
Fix flaky jest tests (#29927)
* Debug flaky jest test

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

* Iterate

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

* Discard changes to jest.config.ts

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-05-13 09:27:08 +00:00
Florian Duros
64047b0702
New room list: fix outdated message preview when space or filter change (#29925)
* fix(new room list): fix outdated message preview when space change

* test(new room list): verify that message preview is check when room change
2025-05-13 07:57:02 +00:00
Michael Telatynski
a3f5d207de
Switch from defer to Promise.withResolvers (#29078)
* Switch from defer to PromiseWithResolvers

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

* Add modernizr check

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>
2025-05-08 10:03:43 +00:00
Michael Telatynski
e427b71040
Remove release announcement on thread activity centre (#29892)
* Remove release announcement on thread activity centre

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

* Update tests

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

* Update tests

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

* Update tests

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-05-07 13:26:32 +00:00
Florian Duros
74fbd892a1
New room list: add keyboard navigation support (#29805)
* feat: support up/down arrow navigation in the new room list

* feat: support tabbing in the new room list

* test: update snapshots

* test(e2e): fix room list test

* test(new room list): add landmark navigation test

* test(e2e): update screenshot test

* test: add test to `RoomListItemView`

* test(e2e): add keyboard navigation tests

* refactor: rename `setIsHover` on `setIsHoverWithDelay`
2025-05-06 16:09:23 +00:00
Florian Duros
8ac2f60720
Remove lag in search field (#29885)
* fix(search): remove search input lag

* test(search): add search field update test
2025-05-06 15:24:06 +00:00
David Langley
9ec54c534d
Respect UIFeature.Voip (#29873)
* respect UIFeature.Voip

* Add unit tests

* reset sdk and mocks

* Update RoomHeader-test.tsx.snap

* use useSettingValue

* lint
2025-05-02 15:05:30 +00:00
Timo
671e55c5a2
Use the JoinRuleSettings component for the guest link access prompt. (#28614)
* Use the JoinRuleSettings component for the guest link access prompt.

Co-authored-by: fkwp <fkwp@users.noreply.github.com>

* increase timeout

* fix tests

---------

Co-authored-by: fkwp <fkwp@users.noreply.github.com>
2025-05-02 13:18:50 +00:00
David Langley
a430501271
Add loading state to the new room list view (#29725)
* add loading state to view model and spinner to room list vieqw

* Update snapshots and add loading test

* avoid nested ternary operator

* Add room list skeleton loading state

* Fix loading logic

- Create RoomListStoreV3Event as to not conflict with loading event definition in Create RoomListStoreEvent.
- Add a loaded event
- Use it to determine loaded state in useFilteredRooms rather than the update event which gets fired in other cases.

* Fix isLoadingRooms logic

* update snapshots and fix test

* Forcing an empty commit to fix PR

* Fix _components.pcss order

* Fix test that wasn't doing anything

* fix tests
2025-05-02 13:12:00 +00:00
Andy Balaam
72429c1350
Make OIDC identity reset consistent with EX (#29854)
* Allow providing an empty title to InteractiveAuthDialog

* Make OIDC identity reset consistent with EX

* Translation changes for OIDC Identity reset (already added to Localazy)

* Fix auth tests for new wording 'Continue to account'
2025-05-02 09:20:22 +00:00
Richard van der Hoff
f25fbdebc7
Modal: remove support for onFinished callback (#29852)
* Fix up type for `finished` result of Modal

The `finished` promise can be called with an empty array, for example if the
dialog is closed by a background click. This was not correctly represented in
the typing. Fix that, and add some documentation while we're at it.

* Type fixes to onFinished callbacks from Modal

These can all be called with zero arguments, despite what the type annotations
may say, so mark them accordingly.

* Remove uses of Modal `onFinished` property

... because it is confusing.

Instead, use the `finished` promise returned by `createDialog`.

* Modal: remove support for now-unused `onFinished` prop

* StopGapWidgetDriver: use `await` instead of promise chaining

* Fix up unit tests
2025-04-30 16:56:21 +01:00
Michael Telatynski
4bf28f8159
Allow jumping to message search from spotlight (#29850)
* Allow jumping to message search from spotlight

replaces the message search hint which referenced the old UX

Fixes #29831

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

* Update RoomSummaryCard.tsx

* Update actions.ts

* Delete src/hooks/useTransition.ts

* Update RoomSummaryCard.tsx

* Iterate

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

* Iterate

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

* Iterate

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

* Add test

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-04-30 11:23:35 +00:00
Andy Balaam
23597e959b
Delegate to new ResetIdentityDialog from SetupEncryptionBody (#29701) 2025-04-30 10:08:38 +00:00
David Baker
4f4f391959
Add secondary filters to the new room list (#29818)
* Secondary filters

* Update snapshots

* Fix imports

* Update screenshots

* Add unit test

* Imports

* Prettier

* Add playwright test
2025-04-30 09:12:56 +00:00
David Baker
714f8f40dd
Add message preview support to the new room list (#29784)
* Add message preview support to the new room list

 * Support showing message previews in the room list items
 * Add the secondary filters bar with the '...' menu, containing
   just the option for message previews for now
 * Change message preview toggle hook to update when setting is updated

* Use new compund release

* Unused i18n keys

* Unused imports

* Fix test & update snapshot

* Fix more snapshots

* Fix test

Split into two tests that test setting & updating

* Type import

* Snapshots

* Remove unnecessary Flex container

and update screenshots as the room list has got shorter from the added bar

* More snapshots & screenshots

* More snapshots

* Add test and remove active filter that's not done yet

* Update snapshots & screenshots again

* Other screenshot

* Add more tests

* Fix syntax

* Fix tests

* Use setter directly

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

* Fix CSS

* Remopve filter button css for now

* Update to remove forwardRef

* Add comment on why lack of TypedEventEmitter

* snapshots again

* Screenshots again

* Use original screenshots, maybe they'll work now

* Add comment

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2025-04-24 15:03:39 +00:00
Michael Telatynski
22d5c00174
Replace usage of forwardRef with React 19 ref prop (#29803)
* Replace usage of `forwardRef` with React 19 ref prop

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

* Add lint rule

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-04-24 12:31:37 +00:00
Florian Duros
5933f50930
New room list: fix missing/incorrect notification decoration (#29796)
* fix: recompute notification when room change in room list item vm

* test: add use case when room list change

* test(e2e): add screenshot to unread filter test
2025-04-22 13:21:50 +00:00
Will Hunt
75d9898dff
Global configuration flag for media previews (#29582)
* Modify useMediaVisible to take a room.

* Add initial support for a account data level key.

* Update controls.

* Update settings

* Lint and fixes

* make some tests go happy

* lint

* i18n

* update preferences

* prettier

* Update settings tab.

* update screenshot

* Update docs

* Rewrite controller

* Rewrite tons of tests

* Rewrite RoomAvatar to be a functional component

This is so we can use hooks to determine the setting state.

* lint

* lint

* Tidy up comments

* Apply media visible hook to inline images.

* Move conditionals.

* copyright all the things

* Review changes

* Update html utils to properly discard media.

* Types fix

* Fixing tests that break settings getValue expectations

* Fix logic around media preview calculation

* Fix room header tests

* Fixup tests for timelinePanel

* Clear settings in matrixchat

* Update tests to use SettingsStore where possible.

* fix bug

* revert changes to client.ts

* copyright years

* Add header

* Add a test for MediaPreviewAccountSettingsTab

* Mark initMatrixClient as optional

* Improve on types

* Ensure we do not set the account data twice.

* lint

* Review changes

* Ensure we include the client on rendered messages.

* Fix test

* update labels

* clean designs

* update settings tab

* update snapshot

* copyright

* prevent mutation
2025-04-22 09:37:47 +00:00
Florian Duros
da6ac36f11
New room list: add partial keyboard shortcuts support (#29783)
* feat: add support to `Action.ViewRoomDelta`

* test: add tests for support of `Action.ViewRoomDelta`

* test(e2e): add tests for shortcuts

* doc: improve comments in `useRoomListNavigation`
2025-04-22 08:31:12 +00:00
Marc
09ceb3c580
MVVM RoomSummaryCard Topic (#29710)
* feat: create roomSummaryCardTopic view model

* chore: add comments and small update on test mock
2025-04-17 15:56:19 +00:00
R Midhun Suresh
1077729a19
New Room List: Prevent potential scroll jump/flicker when switching spaces (#29781)
* Expose last active room in a given space from space store

* Calculate active index based on active room in new space

* Write test
2025-04-17 12:25:06 +00:00
Marc
4f32727829
feat: warn self change on roles settings (#28926)
* feat: warn self change on roles settings

* test: update RolesRoomSettingsTab to match new modal condition

* test: update e2e RolesRoomSettingsTab to add new modal

* feat: powerlevelselector reput initial value if cancel
2025-04-17 08:58:27 +00:00
Florian Duros
fd455179f7
New room list: avoid extra render for room list item (#29752)
* fix: avoid extra render in the new room list

* fix: listen to room name changes

* fix: trigger render when notification state change

* test: fix room list item tests

* chore: fix typo `RoomNotificationState.isUnsentMessage`

* refactor: move `isNotificationDecorationVisible` into `useRoomListItemViewModel`

* refactor: recalculate notification values on notification state changes

* refactor: rename `isNotificationDecorationVisible` to `showNotificationDecoration`

* test: add test for room list item view

* test: add notification tests in room list item vm

* fix: listen to notification updates in `NotificationDecoration`

* test: update notification decoration tests

* refactor: display notification decoration according to vm

* test: update room list item view tests

* fix: a11y label computation after room name change

* refactor: improve notification handling
2025-04-16 21:40:36 +00:00
renovate[bot]
db9428de87
Update react monorepo (#29765)
* Update react monorepo

* Update snapshots

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>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2025-04-16 09:34:01 +00:00
Florian Duros
b511bf064d
New room list: new visual for invitation (#29773)
* feat: rework invitation styling in room list item

* test: update notification decoration test

* test: add test for vm

* test(e2e): update to new invitation styling
2025-04-16 09:23:23 +00:00