Commit Graph

648 Commits

Author SHA1 Message Date
David Langley c33a159334 Fix: Focusing a room in the room list(without hovering) doesn't allow tabbing to the more menu (#34043)
* Fix more menu focus issue when focused with no hover.

* Use a js based solution for focus

* Return focus to the menu trigger when closing the menu with Escape

Keep the keyboard-focus marker set while a row/section-header menu is open
(focus is then in the portaled popover, outside the element). This keeps the
trigger revealed so the menu's own focus restoration lands on it when closed
with Escape, instead of dropping to <body>.

* test: cover keyboard-focus reveal of the room list hover menus

Adds unit tests that focus a room row / section header via the keyboard
(:focus-visible on mount) and assert the hover menu is revealed, then cleared
when focus leaves. Brings diff coverage of the focus handlers to 100%.
2026-06-30 11:36:57 +00:00
David Baker 1aa86110e2 Stub (window.)location (#34041)
* Stub (window.)location

As per comment

* avoid sonar's trigger word
2026-06-30 08:16:22 +00:00
Will Hunt 0ddc418cf9 Move ToastContext and utilities to shared components (#33949)
* Move ToastContext and utilities to shared components

* lint

* fix type

* cleanup

* fix broken test

* fix lint

* Add more tests for ToastContext

* Potential fix for pull request finding 'Unused variable, import, function or class'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-06-29 18:50:36 +00:00
Will Hunt 6ce24e2668 Improve link preview look and feel (#33981)
* Update link previews to match design

* Preview updates

* snap update for pw

* Retain tall image snap

* Move icon to the right.

* cleanup

* Fix bubbles

* resnappening
2026-06-29 18:50:20 +00:00
David Baker 3e40e58b12 Mock out window.addEventListener globally (#34028)
* Mock out window.addEventListener globally

As some code uses it

* Move to setupGlobals

* clean up import

* Only needed if we don't have happy-dom

* thank you!

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

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-06-29 17:08:32 +00:00
Florian Duros aed2009b9f Room list: move sections out of labs to all the users (#33810)
* feat: remove section labs flag

* test: update tests

* feat: remove favourites and low prioriy filter in SC

* test: update screenshots

* test: update snapshots

* test: update playwright tests

* test: update playright screenshots

* test: update screenshot

* test: close release announcement

* test: fix skeleton screenshot

* test: fix sliding sync

* test: update room list tests

* test: update room list tests after section dnd

* test: update toast screenshot

* test: update again room list tests

* test: update screenshot
2026-06-29 16:30:27 +00:00
Richard van der Hoff d1e6bb5b52 Add "user identity" display to dev tools (#33977)
* Add "user identity" display to dev tools

* Correct incorect hard-coded string in test mock

* Fix up tests
2026-06-29 15:49:03 +00:00
renovate[bot] 2198a61b74 Update testcontainers docker digests (#34032)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-29 15:00:31 +00:00
renovate[bot] b2bed9a473 Update npm non-major dependencies (#33944)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-29 14:41:41 +00:00
Florian Duros c42899b0b1 Room list: remove usage of algorithms of old room list store (#33975)
* feat:add missing methods to rls V3

* feat: use rls v3 methods instead of old alrgorithms

* feat: move stabel function to own utils

* feat: use this new moved functions

* test: cleaner test
2026-06-29 14:29:28 +00:00
Richard van der Hoff 0d3efa5fa7 Correct incorect hard-coded string in test mock (#34022) 2026-06-29 13:02:37 +00:00
David Baker c71f17e6de Don't re-export MainSplitContentType enum (#34021)
* Don't re-export MainSplitContentType enum

I don't see why this was necessary, importing RoomView pulls in all sort
of stuff, whereas RoomContext is much smaller.

* ts, not tsx

* unintentional change
2026-06-29 12:58:52 +00:00
Florian Duros 526b4b8c33 Room list: remove usage of old room list store in LoggedInView & InviteDialog (#33973)
* feat: add functions to dm and server notice in rls

* feat: use these functions in dialogs to get rid of old rls
2026-06-29 11:46:14 +00:00
renovate[bot] 4462d6914c Update playwright to v1.61.0 (#33928)
* Update playwright to v1.61.0

* Update snapshots

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-06-29 10:34:44 +00:00
Florian Duros 3205db9c07 feat: migrate RoomGeneralContextMenu off legacy RoomListStore (#33979) 2026-06-29 09:44:15 +00:00
ElementRobot 52b32adb39 [create-pull-request] automated change (#33971)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-06-29 09:03:53 +00:00
David Langley a0639bfc4b Add unread toast to room list sections (#33961)
* Forward the scroller element and scroll handle through VirtualizedList

The room list needs two things the generic list did not expose: the underlying
scroll container (to observe which items are genuinely visible) and the imperative
scroll handle (to scroll an item into view). Forward an optional scrollerRef from
useVirtualizedList and pass scrollHandleRef through FlatVirtualizedList, mirroring
what GroupedVirtualizedList already exposes. Both are additive and optional, so other
consumers are unaffected.

Signed-off-by: David Langley <langley.dave@gmail.com>

* Add an unread-activity toast to the room list

Show a clickable "You have unread activity" pill when there are unread rooms
scrolled below the visible fold, including unreads hidden inside collapsed sections
whose header is below the fold. Clicking it scrolls the next such unread into view.

The visible fold is tracked with an IntersectionObserver over the rendered item
elements, so the toast appears as soon as a room crosses the fold rather than only
once it leaves Virtuoso's overscan buffer. The toast click is wired through an
imperative scroll handle the view registers with the view model.

Signed-off-by: David Langley <langley.dave@gmail.com>

* Change toast to target notifications only, not unread activity.

* Fix formatting and refresh Toast snapshots for compound-web 9.7.0

- Apply oxfmt to the room list view model and virtualized view.
- Refresh the RoomListToast/RoomListView story snapshots: compound-web
  9.7.0 moves the typography classes onto the toast .content element and
  rebuilds the Toast CSS module hashes.
- Add the missing UnreadActivityToast render snapshot baseline.

* Add e2e tests for the room list unread activity toast

Cover the unread-activity toast end to end:
- it appears for a notifying room scrolled below the fold and clicking it
  scrolls that room into view (then the toast clears);
- a room with only an unread-activity dot (no notification count) does not
  raise it;
- a collapsed section hiding a notifying room raises it, and clicking
  scrolls the section header into view.

* Add visual snapshot baselines for the unread-activity toast stories

* Converge room-list toast codepaths into a single state-driven toast

Reviewer feedback: the unread-activity toast and the transient event toasts
(section_created / chat_moved) should share one mechanism, with toast
lifecycle and precedence owned by the view model rather than split across a
separate snapshot flag and a view-level ternary.

- RoomListViewModel now reconciles the transient event toast and the derived
  unread-activity state into a single snapshot.toast via recomputeToast(); the
  event toast still takes precedence and auto-dismisses, and the unread toast
  reappears once it clears. Drops hasUnreadActivityBelow from the snapshot.
- RoomListView renders a single RoomListToast driven by snapshot.toast; the
  ToastType union gains 'unread_activity'. The standalone UnreadActivityToast
  component is folded into RoomListToast (clickable arrow-down variant).
- Adds VM tests for the unread-activity toast and the event/unread precedence.

* Pre-bundle the room-list dnd-kit + virtuoso graph in vitest browser mode

The room-list suites (RoomListView, VirtualizedRoomListView,
RoomListItemMoreOptionsMenu) import a heavy @dnd-kit + react-virtuoso graph.
Only @dnd-kit/abstract was pinned in optimizeDeps.include; @dnd-kit/dom,
@dnd-kit/react, @dnd-kit/abstract/modifiers and react-virtuoso were left to
runtime discovery. Under CI load the browser-mode dep optimizer can discover
them late, re-bundle and reload the page, which fails the in-flight
setupTests.ts import for those suites. Pinning the whole graph forces it into
the initial optimize pass so no re-run happens while tests load.

---------

Signed-off-by: David Langley <langley.dave@gmail.com>
2026-06-29 08:55:26 +00:00
David Langley c4b12cbb4c Update to compound-web 9.7.0 (#33967)
* Update to compound-web 9.7.0

* Update snapshots for compound-web 9.7.0 toast markup

The 9.7.0 Toast moves typography classes from .toast-container to .content
and rebuilds CSS-module hashes, so the RoomListToast unit snapshots, the
storybook visual baselines, and the room-list e2e screenshots needed
regenerating.

* Update blurhash screenshot

* Revert "Update blurhash screenshot"

This reverts commit 6eacecc1ed.
2026-06-26 11:00:33 +00:00
Florian Duros 1f83ba4bbb Room list: add drag and drop of sections to reorder them (#33606)
* feat(rls): centralize room-list section ordering via getOrderedSections

Introduce a single source of truth for the ordered list of section
tags (defaults + custom) in section.ts. RoomListStoreV3 no longer
hard-codes the default tag order — it asks section.ts.

* feat(vm): add section reorder logic to RoomListStoreV3 and view model

* refactor(sc): extract RoomListSectionHeaderContent from RoomListSectionHeaderView

* feat(sc): add drag-and-drop reordering for room-list sections

* test(sc): update existing tests

* test: add new tests

* test(sc): add snapshot test for overlay

* test(e2e): add playright test for dnd of sections

* feat: tweak opacity

* fix: section detection when dragged

* feat: use relative position in section order

* chore: move style to room list section header view

* test: add e2e test for moving section before another

* feat: make favourite and low priority no draggable

* test: remove deprecated e2e test

* fix: type correctly dnd provider and hooks

* fix: use String instead of casting to string

* fix: wrong a11y attributes on section header

* test: fix keyboard navigation e2e tests

* feat: use custom a11y announcement for dnd

* fix: add aria-hidden to the overlay

* chore: remove duplicated code in a11Y announcement

* fix: increase keyboard drag offset

* fix: tests

* fix: virtuoso computed item key

* fix: aria-expanded double annoncement why dragging

* fix: re-add screen reader instructions

* chore: remove unused import

* fix: reduce keyboard drag offset

* fix: improve text readback on unread section

* feat: use a custom a11y plugin instead of buitin a11y plugin

* chore: formatting

* test: fix incorrect tests

* chore: use randomUUID

* fix: try to make test working

* fix: put back mock

* fix: circular import

* Revert "fix: circular import"

This reverts commit 6c69313ade.

* chore: add @dnd-kit/abstract to optimizeDeps.include

* test: fix e2e tests

* fix: disable interaction with section when dragging

* fix: be more explicit if the section will be dropped before or after

* fix: add info that space is dropping too

* fix: scroll to dropped section

* test: fix virtualized room list test

* chore: update lang

* chore: fix dead code analyze

* test: add provider section story

* fix: lang

* fix: again lang...

* fix: improve voice over on chrome

* test: upate snapshot

* fix: add readback when a section is over a non droppable element
2026-06-26 10:00:44 +00:00
David Baker 4e3f47b948 Update to compound-web 9.6.0 (#33959)
* Update to compound-web 9.6.0

* Update snapshots

for aria-disabled change

* and this one
2026-06-25 16:05:58 +00:00
Michael Telatynski f9b97be1d7 Refactor languageHandler to avoid import cycles (#33948)
* Refactor languageHandler to avoid import cycles

Also move its tests to vitest

* Small refactor

* Iterate

* Iterate
2026-06-24 09:49:49 +00:00
ElementRobot 29b9c04d20 [create-pull-request] automated change (#33952)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-06-24 07:46:07 +00:00
Michael Telatynski a26732b040 Tidy up React JSX to make Sonar happier (#33946)
* Eradicate unused React props

* Fix unmatched defaultProps

* Remove spurious React fragments

* Remove unused JSX

* Remove unused React state field

* Remove unused React state field

* Update snapshots
2026-06-23 16:40:42 +00:00
RiotRobot d1dfd3a7ca Reset matrix-js-sdk back to develop branch 2026-06-23 13:36:51 +00:00
RiotRobot 39f3d70759 Merge branch 'master' into develop 2026-06-23 13:35:39 +00:00
RiotRobot 94636e8d4d v1.12.22 2026-06-23 13:31:56 +00:00
RiotRobot 8882d88c39 Upgrade dependency to matrix-js-sdk@41.8.0 2026-06-23 13:20:31 +00:00
Michael Telatynski 918f2932df Tidy languageHandler test (#33945)
Avoid using special test classes in favour of fetchMock
2026-06-23 11:25:34 +00:00
renovate[bot] c11088bb1d Update testcontainers docker digests (#33942)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-23 09:35:04 +00:00
Michael Telatynski 1a3d5bbfff Fix double tooltip on collapsed Quick Settings button (#33923)
* Fix double tooltip on collapsed Quick Settings button

* Update snapshot
2026-06-22 10:31:48 +00:00
renovate[bot] 5d09abefa0 Update electron to v42.4.1 (#33924)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-22 08:07:04 +00:00
renovate[bot] 7dfc95825c Update testcontainers docker digests (#33921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-22 08:05:14 +00:00
ElementRobot 19d2161bce [create-pull-request] automated change (#33905)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-06-22 08:04:53 +00:00
Will Hunt 0889cca885 Update Retention Playwright tests to use real Synapse config endpoint (#33906)
* Use real interface type for SynapseConfig

* Reconfigure for Synapse retention config

* Add beforeEach

* fix import

* lint lint

* fix number type

* fix

* cleanup

* formatted
2026-06-19 17:03:09 +00:00
Michael Telatynski 45234b9c94 Migrate more jest tests to vitest (#33898)
* Migrate more jest tests to vitest

* Fix jest config

* Fix jest config

* Make remaining jest tests type-happy
2026-06-19 15:34:18 +00:00
Will Hunt fab71c80ed Fix flake in room-security-tab (#33897)
* Fix flake in room-security-tab

Wait for the power level change before trying to test.

* lint
2026-06-19 14:22:27 +00:00
David Baker 29ca395d08 Fix flaky device verification test (#33909)
This rejectToast was added erroneously: as the comment above states,
there should be no toast left after we verify (apart from our old
friend the notifications nag toast). This was probably flaking because
it was racing to reject the toast before it vanished.
2026-06-19 12:50:51 +00:00
Florian Duros 338c18df16 Room list: add release announcement for sections (#33800)
* feat: add release announcement for sections

* test: update screenshot

* test: update tests

* test: add release annoucement utils to close it

* test: close release announcement in custom section tests

* test: update release announcement e2e test

* test: add more tests

* feat: update Ra labels

* test: update screenshot

* chore: remove stale screenshot
2026-06-19 12:06:58 +00:00
David Baker 43b9bc9458 Fix long display / user names in UserMenu (#33900)
* Fix long display / user names in UserMenu

And add a playwright test to assert (see playwright screenshot for
after photo).

* Dave installs the oxfmt extension

* snapshots
2026-06-19 11:14:57 +00:00
Michael Telatynski 5002f2929f Fix CI/CD pnpm error around minimumReleaseAge (#33908)
* Update pnpm

* Fix @types/node dep reference

* disable allowBuilds for js-sdk

* disable allowBuilds for js-sdk for git too

* Iterate

* Iterate
2026-06-19 11:12:59 +00:00
renovate[bot] 90fb221a8e Update zxcvbn-ts monorepo to v4 (#33880)
* Update zxcvbn-ts monorepo to v4

* Handle breaking changes

* Improve coverage

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-06-18 11:17:50 +00:00
renovate[bot] 659eab8965 Update testcontainers docker digests (#33894)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-18 09:48:10 +00:00
renovate[bot] 38643940c8 Update dockerfile non-major dependencies to v1.25 (#33896)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-18 09:41:17 +00:00
Michael Telatynski 7bb842e8d4 Replace override raw-loader with ?raw query (#33854)
* Replace override raw-loader with `?raw` query

For compatibility with vite/st

* Make knip happy

* Fix icon in Jitsi lobby

* Fix jest config for `?raw`

* Remove stale `$webapp` alias

* Ensure css files loaded as `?raw` do not get bundled
2026-06-18 09:36:07 +00:00
Michael Telatynski 7a1a3f518c Make codebase comply to knip --strict (#33893)
* Make codebase comply to `knip --strict`

Deletes a few bits of dead code

* Trim i18n strings

* Fix missing export

* Remove test of dead code
2026-06-18 09:35:47 +00:00
renovate[bot] 5de654636a Update nginxinc/nginx-unprivileged:alpine-slim Docker digest to 8f92ff7 (#33895)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-18 08:35:44 +00:00
Michael Telatynski f9343e5458 Refactor Desktop config to avoid global (#33468)
* Fix desktop registering protocol handler wrong

Was previously registering with too many args and was also only handling deeplinks if the app was already open, on a cold start they would be blindly ignored.

Tests aplenty

* Refactor Desktop config to avoid global

and centralise defaults

* Improve coverage

* Fix tests

* Improve coverage

* Fix test

* Rename field

* Improve coverage

* Rename field

* Move protocolHandler initialisation to after mainWindow is navigating

* Add comment

* Avoid double call to loadURL

* Improve coverage

* Improve coverage

* Fix tsc
2026-06-17 19:29:45 +00:00
renovate[bot] 8be053c5aa Update npm non-major dependencies (#33876)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-17 10:20:09 +00:00
Michael Telatynski 2ae7d90190 Fix handling of deeplinks on Element Desktop (#33827)
* Fix desktop registering protocol handler wrong

Was previously registering with too many args and was also only handling deeplinks if the app was already open, on a cold start they would be blindly ignored.

Tests aplenty

* Rename field

* Move protocolHandler initialisation to after mainWindow is navigating

* Add comment

* Avoid double call to loadURL
2026-06-17 10:19:37 +00:00
ElementRobot ecbab6d137 [create-pull-request] automated change (#33882)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-06-17 09:02:55 +00:00