Compare commits

...

73 Commits

Author SHA1 Message Date
Andy Balaam
ff3f069122 Provide a labs flag for encrypted state events (MSC3414) (#31513)
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
Co-authored-by: Skye Elliot <actuallyori@gmail.com>
2025-12-18 14:45:52 +00:00
Florian Duros
6f0369e623 Fix shared component screenshot update (#31568)
* build: fix shared component screenshot update

The yarn command `test:storybook:update` was running twice
`playwright-sceenshots`. However this script is using ryuk to delete
remaining containers/etc and ryuk does the cleanup after 50sec of idle.
So on the script second call, ryuk container was still running and the
script failed.

This PR introduces a shell script to install the dependencies and to run
the tests in the same playrwright-screenshots call.

* Update packages/shared-components/scripts/storybook-screenshot-update.sh

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

* Update packages/shared-components/scripts/storybook-screenshot-update.sh

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

* doc: fix duplicated documentation after github commit

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-12-18 10:44:17 +00:00
Florian Duros
7a69ab8be4 Fix act warning in member list test (#31570)
* test: fix act warning in member list

Wrapping rerender in act

* refactor: remove extra inline function
2025-12-17 17:08:00 +00:00
Skye Elliot
4da149e56f Update prop type & documentation for HistoryVisibleBanner and VM. (#31545)
* docs: Update documentation for HistoryVisibleBanner and VM.

* docs: Improve documentation for `HistoryVisibleBanner`, second pass.

* docs: Move documentation to prop types over FC.

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

* fix: Simplify type for `HistoryVisibleBannerViewModel` `threadId`.

* docs: Apply suggestions from code review

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>
2025-12-17 16:04:53 +00:00
Michael Telatynski
e696f92bd3 Switch to Compound icons in more places (#31560)
* Switch to Compound icons in ServerPicker

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

* Switch to Compound ask-to-join icon

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

* Switch to Compound invite icon

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

* Switch to Compound pin icon

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

* Switch to Compound Spinner

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

* Update snapshots

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

* Fix ServerPicker icon rendering

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

* Update screenshots

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

* Update screenshot

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

* Replace search-inset.svg with Compound Message icon

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-17 11:17:11 +00:00
ElementRobot
48c360f688 [create-pull-request] automated change (#31554)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2025-12-17 10:57:57 +00:00
RiotRobot
3ee50c59f8 Reset matrix-js-sdk back to develop branch 2025-12-16 14:54:45 +00:00
RiotRobot
ba2386ae41 Merge branch 'master' into develop 2025-12-16 14:53:41 +00:00
RiotRobot
fab2997107 v1.12.7 2025-12-16 14:49:39 +00:00
Michael Telatynski
60ef5d880c [Backport staging] Amend e2e normal icon from lock-solid to info (#31559)
* Amend e2e normal icon from lock-solid to info (#31555)

* Amend e2e normal icon from lock-solid to info

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

* Update screenshot

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

---------

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

(cherry picked from commit 773662e018)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshot

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-16 14:16:43 +00:00
Michael Telatynski
7e3a6d9c42 Switch to rendering svg icons rather than masking them (#31550)
* Switch to rendering svg icons rather than masking them in SpacePanel

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

* Fix badly rendered icon in JoinRuleDropdown

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

* Fix badly rendered icon in RoomPreviewCard

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

* Fix badly rendered icon in Space menus

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

* Fix badly rendered icon in ThreadPanel

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

* Update snapshots

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

* Update screenshot

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

* Remove unused icon underfill

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

* Update screenshot

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

* Add test

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

* Add missing snapshot

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-16 13:56:36 +00:00
RiotRobot
c486299deb Upgrade dependency to matrix-js-sdk@39.4.0 2025-12-16 13:52:36 +00:00
Michael Telatynski
773662e018 Amend e2e normal icon from lock-solid to info (#31555)
* Amend e2e normal icon from lock-solid to info

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

* Update screenshot

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-16 12:28:01 +00:00
Michael Telatynski
040c348700 Make AccessibleButton contrast control compatible (#31308)
* Make AccessibleButton contrast control compatible

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>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-16 09:51:15 +00:00
ElementRobot
3fb0f65735 Fix CSS specificity causing icon issues in e2e verification (#31542) (#31548)
(cherry picked from commit 0cfaeaa3a7)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-15 16:39:44 +00:00
Michael Telatynski
9d9782f62b Switch to compound-design-tokens for platform icons (#31543)
* Switch to compound-design-tokens for platform icons

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

* Revert app-store badge usage

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-12-15 16:37:24 +00:00
Michael Telatynski
0cfaeaa3a7 Fix CSS specificity causing icon issues in e2e verification (#31542)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-15 15:46:03 +00:00
Michael Telatynski
4a3cf3e69d Switch to rendering svg icons rather than masking them (#31531)
* Switch to rendering svg icons rather than masking them in left panel

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

* Remove unused stylesheet

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

* Switch to rendering svg icons rather than masking them for ExternalLink

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

* Switch to rendering svg icons rather than masking them for TabbedView

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

* Switch to rendering svg icons rather than masking them for JoinRuleDropdown

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

* Switch to rendering svg icons rather than masking them in ManageRestrictedJoinRuleDialog

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

* Switch to rendering svg icons rather than masking them in LeaveSpaceDialog

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

* Switch to rendering svg icons rather than masking them in ReplyPreview

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

* Switch to rendering svg icons rather than masking them in SearchBox

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

* Switch to rendering svg icons rather than masking them in RoomStatusBar

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

* Fix advanced.svg

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

* Update snapshots

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

* Update screenshots

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

* Iterate

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

* Fix bad merge conflict resolution

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

* Switch to rendering svg icons rather than masking them in Toasts

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

* Switch to rendering svg icons rather than masking them in RoomInfoLine

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

* Switch to rendering svg icons rather than masking them in UploadBar

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

* Remove unused class

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

* Switch to rendering svg icons rather than masking them in ConfirmSpaceUserActionDialog

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

* Switch to rendering svg icons rather than masking them in FeedbackDialog

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

* Switch to rendering svg icons rather than masking them in KeyBackupFailedDialog

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

* Switch to rendering svg icons rather than masking them in CopyableText

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

* Switch to rendering svg icons rather than masking them in EventTile

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

* Switch to rendering svg icons rather than masking them in InviteReason

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

* Delint

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

* Update tests

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

* Add test

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-12-15 12:00:35 +00:00
Skye Elliot
c7134e8532 Prevent history visible banner from displaying in threads. (#31535)
* fix: Prevent history visible banner from displaying in threads.

* tests: Verify banner is not visible in threads.
2025-12-15 11:43:00 +00:00
Michael Telatynski
1d3421417f Switch to rendering svg icons rather than css masking (#31517)
* Switch to rendering svg icons rather than masking them in left panel

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

* Remove unused stylesheet

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

* Switch to rendering svg icons rather than masking them for ExternalLink

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

* Switch to rendering svg icons rather than masking them for TabbedView

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

* Switch to rendering svg icons rather than masking them for JoinRuleDropdown

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

* Switch to rendering svg icons rather than masking them in ManageRestrictedJoinRuleDialog

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

* Switch to rendering svg icons rather than masking them in LeaveSpaceDialog

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

* Switch to rendering svg icons rather than masking them in ReplyPreview

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

* Switch to rendering svg icons rather than masking them in SearchBox

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

* Switch to rendering svg icons rather than masking them in RoomStatusBar

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

* Fix advanced.svg

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

* Update snapshots

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

* Update screenshots

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

* Iterate

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

* Fix bad merge conflict resolution

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-15 09:52:50 +00:00
ElementRobot
ef63661cb0 [create-pull-request] automated change (#31541)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2025-12-15 06:32:58 +00:00
ElementRobot
e29da89826 [create-pull-request] automated change (#31537)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2025-12-13 06:22:12 +00:00
David Baker
d2727754e3 Tidy up token refresh code (#31519)
* Tidy up token refresh code

This was a bit odd where the function to create a refresher sometimes
created a refresher and sometimes just returned null, including if the
init failed, in which case you would just end up with no token refresher.

Pairs with https://github.com/matrix-org/matrix-js-sdk/pull/5106 but
doesn't depend on either way.

* Remove deviceId property in favour of superclass one

* Fix tests

* Fix argument order in super call

redirect URI & device ID were swapped. It appears that gthe OIDS client
only actually sends the redirect URI when refreshing a token, so we will
have been sending a device ID for that when refreshing. I think this is safe
to fix since this is only when refreshing so it already would not have
matched what was passed at login time.

* Pass client ID into createOidcTokenRefresher
2025-12-12 18:23:50 +00:00
RiotRobot
154baba303 v1.12.7-rc.2 2025-12-12 15:47:29 +00:00
Robin
179cf0f8e1 Make the feedback icon be the right color in dark theme (#31527)
Our feedback.svg is not tintable. Rather than mess with it I think it makes sense to use the equivalent Compound icon.
2025-12-12 09:40:38 +00:00
ElementRobot
de74816dd8 [create-pull-request] automated change (#31528)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2025-12-12 06:31:41 +00:00
ElementRobot
8d918e3b16 Fix e2e icons in CompleteSecurity & SetupEncryptionBody (#31521) (#31522)
* Fix e2e icons in CompleteSecurity & SetupEncryptionBody



* Tests



* Prevent screenshot clash between tests



---------


(cherry picked from commit 7b024f956d)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-11 17:21:53 +00:00
Michael Telatynski
7b024f956d Fix e2e icons in CompleteSecurity & SetupEncryptionBody (#31521)
* Fix e2e icons in CompleteSecurity & SetupEncryptionBody

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

* Tests

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

* Prevent screenshot clash between tests

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-11 16:37:49 +00:00
Michael Telatynski
362e34513d Stabilise flaky tests relying on bots (#31520)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-11 16:16:05 +00:00
Florian Duros
5b900ab6e2 Move room list search to shared components (#31502)
* refactor: move room list search to shared components

* refactor: add view model

* refactor: use view and vm in room list search component

* refactor: use room list id instead of class for landmark navigation

* refactor: remove old room list search css

* test: add screenshots test for room list search view

* test: fix e2e test using class as selector...
2025-12-11 15:43:20 +00:00
Florian Duros
23fbe9cef6 UseCreateAutoDisposedViewModel for audio player (#31503)
* refactor: useCreateAutoDisposedViewModel for audio player

* Update src/viewmodels/audio/AudioPlayerViewModel.ts

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

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-11 15:41:27 +00:00
renovate[bot]
cd71c109d3 Update npm non-major dependencies (#31516)
* Update npm non-major dependencies

* Run 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-12-11 15:37:25 +00:00
RiotRobot
011b975d3f v1.12.7-rc.1 2025-12-11 13:43:28 +00:00
Timo
a28eabf73b Auto approve matrix rtc member event (sticky events) (#31452) 2025-12-11 12:20:42 +00:00
renovate[bot]
dbe8ad0529 Update dependency @vector-im/compound-design-tokens to v6.4.2 (#31478)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-11 11:16:53 +00:00
ElementRobot
00954542f3 Remove an extra paragraph in advanced room settings (#31500) (#31511)
This was introduced (presumably accidentally) in
[#30169](https://github.com/element-hq/element-web/pull/30169/files#diff-89268874351e08a327e47b0a7e1d4e916e1ad8dc4be8b4a3f1ef67f3f83a5bc9R459)

(cherry picked from commit 3d80e607ce)

Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2025-12-11 11:01:17 +00:00
David Langley
b446506aee Size Autocomplete relative to the RoomView height rather than the viewport height (#31425)
* Size Autocomplete relative to the RoomView height rather than the viewport height

* Add screenshot for the autocomplete in a regression changes the height

* Add cjk fonts to support rendering text emoticons displayed in slash command picker

* Maybe when actually running the tests?

* Try after system dependencies and clear font cache

* Add cjk fonts to support rendering text emoticons displayed in slash command picker

Try after system dependencies and clear font cache

Maybe when actually running the tests?

Revert "Add cjk fonts to support rendering text emoticons displayed in slash command picker"

This reverts commit 46fa014308b6010626174f8cd0d3a978488963ee.

* Render emoji autocoplete instead

* Remove font install that didn't work
2025-12-11 10:55:20 +00:00
renovate[bot]
9254c4247e Update dependency @casualbot/jest-sonar-reporter to v2.5.0 (#31482)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-11 10:00:22 +00:00
Andy Balaam
3d80e607ce Remove an extra paragraph in advanced room settings (#31500)
This was introduced (presumably accidentally) in
[#30169](https://github.com/element-hq/element-web/pull/30169/files#diff-89268874351e08a327e47b0a7e1d4e916e1ad8dc4be8b4a3f1ef67f3f83a5bc9R459)
2025-12-11 09:55:28 +00:00
renovate[bot]
0a1ac23681 Update react monorepo (#31479)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-11 09:53:12 +00:00
ElementRobot
976d1bc9ec [create-pull-request] automated change (#31509)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2025-12-11 09:47:41 +00:00
ElementRobot
1cf9e546fd Don't show the key storage out of sync toast when backup disabled (#31506) (#31507)
(cherry picked from commit 4bd8eeb17a)

Co-authored-by: Hubert Chathi <hubert@uhoreg.ca>
2025-12-10 18:14:32 +00:00
Hubert Chathi
4bd8eeb17a Don't show the key storage out of sync toast when backup disabled (#31506) 2025-12-10 16:03:47 +00:00
Skye Elliot
cff9119324 Implement UI for history visibility acknowledgement. (#31156)
* feat: Implement UI for history visibility acknowledgement.

Shows a banner above the message composer whenever a user opens a room
with non-join history visibility, which they can dismiss.

- Whenever a user opens an encrypted room with non-join history
  visibility, show them a banner, unless we have already marked it as
  dismissed.
- Whenever a user opens an encrypted room with joined history
  visibility, we unmark it as dismissed.

Issue: https://github.com/element-hq/element-meta/issues/2875

* tests: Add test suite for `RoomStatusBarHistoryVisible`.

* docs: Document `RoomStatusBarHistoryVisible` and props interface.

* feat: Use newer `@vector-im/compound` components.

* test: Update snapshots for `RoomStatusBarHistoryVisible` tests.

* chore: Update playwright screenshots.

* feat: Move `RoomStatusBarHistoryVisible` to `shared-components`.

* fix: Address review comments on `RoomStatusBarHistoryVisible`.

* fix: Address review comments on `RoomStatusBar` and tests.

* chore: Move `RoomStatusBarHistoryVisible` to `room/RoomStatusBarHistoryVisible`

* chore: Fix linting issues.

* feat: Gate behind history visibility labs flag.

* feat: Add link to history sharing docs.

* fix: Resolve build issue with shared-components.

* tests: Enable history sharing lab for unit tests.

* tests: Set labs flag in SettingsStore mock.

* fix: Remove non-existent arg - documentation should be updated!

* chore: Remove old CSS rule filter.

* fix: Use package name for import over relative path.

* fix: Mark styles as important due to improper CSS load order.

* docs: Add doc comments to `!important` directives.

This change should restore my status as a good person.

* docs: Correct license header.

* tests: Update `RoomStatusBarHistoryVisible` snapshot.

* tests: Update shared history invite screenshot.

* tests: Revert spurious screenshot changes.

* feat: Update to use `Banner` component.

* chore: Remove broken import.

* chore: Remove unused translation string.

* tests: Add `getHistoryVisibility` to `currentState` of stub room.

* tests: Update screenshot.

* chore: Remove old snapshots.

* tests: Update playwright screenshot.

* feat: Separate `HistoryVisibleBanner` hooks into MVVM architecture.

* chore: Remove unused imports.

* feat: Use info link over action button for `HistoryVisibleBanner`

* tests: Update snapshot for `HistoryVisibleBanner`.

* chore: Remove unused imports.

* feat: Switch to MVVM architecture per style guide.

* tests: Update snapshot for `HistoryVisibleBanner`.

* tests: Update shared components snapshots.

* tests: Add unit tests for `HistoryVisibleBannerView` stories.

* fix: Linting errors from SonarCloud.

* feat: Finalise conversion to MVVM.

* fix: Silent `this` binding issue.

* tests: Update playwright snapshot.

* feat: Introduce wrapper component for `HistoryVisibleBanner`.

* tests: Update playwright screenshots for `HistoryVisibleBanner`.

* docs: Add doc comments to fields in `HistoryVisibleBannerViewModel`.

* tests: Update playwright snapshot.
2025-12-10 10:37:04 +00:00
R Midhun Suresh
a13e9c1285 Export disposing hook from package (#31498)
* Export disposing hook from package

* Increment package version

* Fix lint: Add back new-line
2025-12-10 09:59:54 +00:00
ElementRobot
9272f0180c [create-pull-request] automated change (#31497)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2025-12-10 06:32:36 +00:00
ElementRobot
9d233c49f4 [create-pull-request] automated change (#31496)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2025-12-10 06:23:42 +00:00
renovate[bot]
98af06b949 Update storybook (#31487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 22:00:33 +00:00
renovate[bot]
e066f3836d Update dependency testcontainers to v11.9.0 (#31486)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 21:53:42 +00:00
renovate[bot]
ea5117944c Update dependency @sentry/browser to v10.29.0 (#31484)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 21:36:38 +00:00
renovate[bot]
3f1831577e Update nginxinc/nginx-unprivileged:alpine-slim Docker digest to a6bec37 (#31473)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-09 17:10:20 +00:00
renovate[bot]
4fcbaaf6e1 Update dependency eslint-plugin-storybook to v10.1.4 (#31485)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:49:00 +00:00
renovate[bot]
bdeae0711a Update dependency @element-hq/element-web-playwright-common to v2.1.0 (#31483)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:46:13 +00:00
renovate[bot]
1b25e62698 Update actions/setup-node digest to 395ad32 (#31470)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:42:16 +00:00
renovate[bot]
9adcea3079 Update browserslist (#31476)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:37:45 +00:00
renovate[bot]
014a9edf0f Update dependency is-ip to v5. (#31467)
* Update dependency is-ip to v5

* Fix import

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

* Make jest happier

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-12-09 16:36:22 +00:00
renovate[bot]
67b0311852 Update actions/stale digest to 9971854 (#31471)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:34:10 +00:00
renovate[bot]
df084ebe11 Update dependency chokidar to v5 (#31488)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:33:28 +00:00
renovate[bot]
6ed3dc32c5 Update typescript-eslint monorepo to v8.48.1 (#31480)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:26:06 +00:00
renovate[bot]
dbdf2f6353 Update docker/metadata-action digest to c299e40 (#31472)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:25:57 +00:00
renovate[bot]
7b8082a818 Update peter-evans/create-pull-request digest to 22a9089 (#31475)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:25:46 +00:00
renovate[bot]
a155948231 Update dependency @element-hq/element-call-embedded to v0.16.3 (#31477)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:23:11 +00:00
renovate[bot]
b8f4e87185 Update Node.js to 5583cbe (#31474)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:21:16 +00:00
th0mcat
3e928cf6a6 Change header-panel-bg-hover to use var(--cpd-color-bg-action-secondary-hovered) for better custom theming (#31457)
* Update header-panel-bg-hover in dark theme

* Update header-panel-bg-hover in light custom theme

* Update header-panel-bg-hover in light theme

* Fix syntax error

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-09 16:16:59 +00:00
renovate[bot]
a2ca6f858f Update actions/checkout digest to 8e8c483 (#31469)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 16:11:04 +00:00
Michael Telatynski
efe59ff35f Improve icon rendering in iconized context menu (#31458)
* Fix composer button visibility in contrast colour mode

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

* Iterate

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>

* Iterate

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

* Update test

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

* Simplify

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

* Update snapshots

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

* Update screenshots

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

* Update screenshots

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

* Update screenshot

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

* Improve icon rendering in iconized context menu

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>

* Delint

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-09 15:10:42 +00:00
RiotRobot
cf25d5e258 v1.12.7-rc.0 2025-12-09 15:01:14 +00:00
RiotRobot
86a38cd2d2 Upgrade dependency to matrix-js-sdk@39.4.0-rc.0 2025-12-09 14:53:31 +00:00
Michael Telatynski
4fda167c11 Fix composer button visibility in contrast colour mode (#31255)
* Fix composer button visibility in contrast colour mode

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

* Iterate

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>

* Iterate

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

* Update test

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

* Simplify

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

* Update snapshots

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

* Update screenshots

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

* Update screenshots

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

* Update screenshot

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-09 13:59:01 +00:00
Will Hunt
d30e6f25d3 Ensure correct room version is used and permissions are appropriately sert when creating rooms (#31464)
* Check default PL when setting a new PL in createRoom

* Drop custom PL setting for video rooms

* lint files

* Add room version test

* Cleanup test

* fix import
2025-12-09 12:05:49 +00:00
Michael Telatynski
5324834b47 Fix e2e icon rendering (#31454)
* Fix e2e icon rendering

Regressed by change to compound icons, due to it relying on a hack of rendering icons atop each other to draw a background.

Also fixes a nested tooltip which became annoying during testing

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

* Update tests

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-12-09 11:43:02 +00:00
ElementRobot
63f269e52c [create-pull-request] automated change (#31463)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2025-12-09 06:23:33 +00:00
Richard van der Hoff
2fb0bf6152 EventIndexer: ensure we add initial checkpoints when the db is first opened (#31448)
* EventIndex: add some documentation

... because comments are not subject to rationing.

* EventIndex: rationalise addInitialCheckpoints logic

* EventIndex: improve logging

* use a single `logger` instance to do the prefixing
* use `JSON.stringify` on the checkpoints so that the rageshakes are useful
* distinguish between logger.warn and logger.debug
* emit some logs if the crawler loop fails

* Move check for empty database to `init`

The problem with checking if the database is empty in `onSync` is that, by the
time we get there, it won't be.

Instead let's remember if the db was empty in `init`, and then once a sync
completes, we can add the checkpoints.

* Some tests for EventIndexer
2025-12-08 14:08:31 +00:00
382 changed files with 16583 additions and 4642 deletions

View File

@@ -42,9 +42,9 @@ jobs:
run: run:
shell: bash shell: bash
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
# Disable cache on Windows as it is slower than not caching # Disable cache on Windows as it is slower than not caching
# https://github.com/actions/setup-node/issues/975 # https://github.com/actions/setup-node/issues/975

View File

@@ -14,7 +14,7 @@ jobs:
R2_URL: ${{ vars.CF_R2_S3_API }} R2_URL: ${{ vars.CF_R2_S3_API }}
VERSION: ${{ github.ref_name }} VERSION: ${{ github.ref_name }}
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Download package - name: Download package
run: | run: |

View File

@@ -26,9 +26,9 @@ jobs:
R2_URL: ${{ vars.CF_R2_S3_API }} R2_URL: ${{ vars.CF_R2_S3_API }}
R2_PUBLIC_URL: "https://element-web-develop.element.io" R2_PUBLIC_URL: "https://element-web-develop.element.io"
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*" node-version: "lts/*"

View File

@@ -34,7 +34,7 @@ jobs:
env: env:
SITE: ${{ inputs.site || 'staging.element.io' }} SITE: ${{ inputs.site || 'staging.element.io' }}
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Load GPG key - name: Load GPG key
run: | run: |

View File

@@ -20,7 +20,7 @@ jobs:
env: env:
TEST_TAG: vectorim/element-web:test TEST_TAG: vectorim/element-web:test
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with: with:
fetch-depth: 0 # needed for docker-package to be able to calculate the version fetch-depth: 0 # needed for docker-package to be able to calculate the version
@@ -96,7 +96,7 @@ jobs:
- name: Docker meta - name: Docker meta
id: meta id: meta
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5 uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
with: with:
images: | images: |

View File

@@ -17,23 +17,23 @@ jobs:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- name: Fetch element-desktop - name: Fetch element-desktop
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with: with:
repository: element-hq/element-desktop repository: element-hq/element-desktop
path: element-desktop path: element-desktop
- name: Fetch element-web - name: Fetch element-web
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with: with:
path: element-web path: element-web
- name: Fetch matrix-js-sdk - name: Fetch matrix-js-sdk
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with: with:
repository: matrix-org/matrix-js-sdk repository: matrix-org/matrix-js-sdk
path: matrix-js-sdk path: matrix-js-sdk
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
cache-dependency-path: element-web/yarn.lock cache-dependency-path: element-web/yarn.lock

View File

@@ -50,11 +50,11 @@ jobs:
runners-matrix: ${{ steps.runner-vars.outputs.matrix }} runners-matrix: ${{ steps.runner-vars.outputs.matrix }}
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with: with:
repository: element-hq/element-web repository: element-hq/element-web
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*" node-version: "lts/*"
@@ -122,7 +122,7 @@ jobs:
- runAllTests: false - runAllTests: false
project: Pinecone project: Pinecone
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with: with:
persist-credentials: false persist-credentials: false
repository: element-hq/element-web repository: element-hq/element-web
@@ -133,7 +133,7 @@ jobs:
name: webapp name: webapp
path: webapp path: webapp
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
cache-dependency-path: yarn.lock cache-dependency-path: yarn.lock
@@ -194,13 +194,13 @@ jobs:
if: always() if: always()
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
if: inputs.skip != true if: inputs.skip != true
with: with:
persist-credentials: false persist-credentials: false
repository: element-hq/element-web repository: element-hq/element-web
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
if: inputs.skip != true if: inputs.skip != true
with: with:
cache: "yarn" cache: "yarn"

View File

@@ -10,7 +10,7 @@ jobs:
permissions: permissions:
pull-requests: write pull-requests: write
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Update synapse image - name: Update synapse image
run: | run: |
@@ -32,7 +32,7 @@ jobs:
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7 uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7
with: with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }} token: ${{ secrets.ELEMENT_BOT_TOKEN }}
branch: actions/playwright-image-updates branch: actions/playwright-image-updates

View File

@@ -41,7 +41,7 @@ jobs:
REPOS: matrix-js-sdk element-web element-desktop REPOS: matrix-js-sdk element-web element-desktop
steps: steps:
- name: Checkout Element Desktop - name: Checkout Element Desktop
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
if: inputs.element-desktop if: inputs.element-desktop
with: with:
repository: element-hq/element-desktop repository: element-hq/element-desktop
@@ -51,7 +51,7 @@ jobs:
fetch-tags: true fetch-tags: true
token: ${{ secrets.ELEMENT_BOT_TOKEN }} token: ${{ secrets.ELEMENT_BOT_TOKEN }}
- name: Checkout Element Web - name: Checkout Element Web
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
if: inputs.element-web if: inputs.element-web
with: with:
repository: element-hq/element-web repository: element-hq/element-web
@@ -61,7 +61,7 @@ jobs:
fetch-tags: true fetch-tags: true
token: ${{ secrets.ELEMENT_BOT_TOKEN }} token: ${{ secrets.ELEMENT_BOT_TOKEN }}
- name: Checkout Matrix JS SDK - name: Checkout Matrix JS SDK
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
if: inputs.matrix-js-sdk if: inputs.matrix-js-sdk
with: with:
repository: matrix-org/matrix-js-sdk repository: matrix-org/matrix-js-sdk

View File

@@ -13,10 +13,10 @@ jobs:
steps: steps:
- name: 🧮 Checkout code - name: 🧮 Checkout code
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: 🔧 Set up node environment - name: 🔧 Set up node environment
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
node-version-file: ".node-version" node-version-file: ".node-version"

View File

@@ -21,12 +21,12 @@ jobs:
issues: read issues: read
pull-requests: read pull-requests: read
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with: with:
persist-credentials: false persist-credentials: false
repository: element-hq/element-web repository: element-hq/element-web
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*" node-version: "lts/*"

View File

@@ -22,9 +22,9 @@ jobs:
name: "Typescript Syntax Check" name: "Typescript Syntax Check"
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*" node-version: "lts/*"
@@ -63,7 +63,7 @@ jobs:
name: "Rethemendex Check" name: "Rethemendex Check"
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- run: ./res/css/rethemendex.sh - run: ./res/css/rethemendex.sh
@@ -73,9 +73,9 @@ jobs:
name: "ESLint" name: "ESLint"
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*" node-version: "lts/*"
@@ -97,9 +97,9 @@ jobs:
name: "Style Lint" name: "Style Lint"
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*" node-version: "lts/*"
@@ -115,9 +115,9 @@ jobs:
name: "Workflow Lint" name: "Workflow Lint"
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*" node-version: "lts/*"
@@ -133,9 +133,9 @@ jobs:
name: "Analyse Dead Code" name: "Analyse Dead Code"
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*" node-version: "lts/*"

View File

@@ -39,12 +39,12 @@ jobs:
runner: [1, 2] runner: [1, 2]
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with: with:
repository: ${{ inputs.matrix-js-sdk-sha && 'element-hq/element-web' || github.repository }} repository: ${{ inputs.matrix-js-sdk-sha && 'element-hq/element-web' || github.repository }}
- name: Yarn cache - name: Yarn cache
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
node-version: "lts/*" node-version: "lts/*"
cache: "yarn" cache: "yarn"
@@ -118,12 +118,12 @@ jobs:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with: with:
repository: ${{ inputs.matrix-js-sdk-sha && 'element-hq/element-web' || github.repository }} repository: ${{ inputs.matrix-js-sdk-sha && 'element-hq/element-web' || github.repository }}
- name: Yarn cache - name: Yarn cache
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
node-version: "lts/*" node-version: "lts/*"
cache: "yarn" cache: "yarn"

View File

@@ -12,7 +12,7 @@ jobs:
issues: write issues: write
pull-requests: write pull-requests: write
steps: steps:
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10 - uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v10
with: with:
operations-per-run: 100 operations-per-run: 100

View File

@@ -9,9 +9,9 @@ jobs:
update: update:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*" node-version: "lts/*"
@@ -23,7 +23,7 @@ jobs:
run: "yarn update:jitsi" run: "yarn update:jitsi"
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7 uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7
with: with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }} token: ${{ secrets.ELEMENT_BOT_TOKEN }}
branch: actions/jitsi-update branch: actions/jitsi-update

View File

@@ -1,3 +1,52 @@
Changes in [1.12.7](https://github.com/element-hq/element-web/releases/tag/v1.12.7) (2025-12-16)
================================================================================================
## ✨ Features
* Replace legacy icons with compound ([#31424](https://github.com/element-hq/element-web/pull/31424)). Contributed by @t3chguy.
* Update polls UX to match EX Mobile and improve accessibility ([#31245](https://github.com/element-hq/element-web/pull/31245)). Contributed by @langleyd.
* Add option to enable read receipt and marker when user interact with UI ([#31353](https://github.com/element-hq/element-web/pull/31353)). Contributed by @florianduros.
* Introduce a hook to auto dispose view models ([#31178](https://github.com/element-hq/element-web/pull/31178)). Contributed by @MidhunSureshR.
* Update settings toggles to use consistent design across app. ([#30169](https://github.com/element-hq/element-web/pull/30169)). Contributed by @Half-Shot.
* Add ability to the room view to hide widgets ([#31400](https://github.com/element-hq/element-web/pull/31400)). Contributed by @langleyd.
* call: Pass the echo cancellation and noise suppression settings to EC ([#31317](https://github.com/element-hq/element-web/pull/31317)). Contributed by @BillCarsonFr.
* Tweak rendering of icons for a11y ([#31358](https://github.com/element-hq/element-web/pull/31358)). Contributed by @t3chguy.
* Implement new `renderNotificationDecoration` from module API ([#31389](https://github.com/element-hq/element-web/pull/31389)). Contributed by @MidhunSureshR.
* Replace more icons with compound ([#31381](https://github.com/element-hq/element-web/pull/31381)). Contributed by @t3chguy.
* Replace more icons with compound ([#31378](https://github.com/element-hq/element-web/pull/31378)). Contributed by @t3chguy.
* `<Banner/>`: Hide `Dismiss` button if `onClose` handler is not provided. ([#31362](https://github.com/element-hq/element-web/pull/31362)). Contributed by @kaylendog.
* Replace batch of legacy icons with compound design tokens ([#31360](https://github.com/element-hq/element-web/pull/31360)). Contributed by @t3chguy.
* MSC4380: Invite blocking ([#31268](https://github.com/element-hq/element-web/pull/31268)). Contributed by @richvdh.
* Tweak rendering of icons for accessibility ([#31346](https://github.com/element-hq/element-web/pull/31346)). Contributed by @t3chguy.
* Implement a shared `Banner` component. ([#31266](https://github.com/element-hq/element-web/pull/31266)). Contributed by @kaylendog.
* Allow the Login screen to use the dark theme ([#31293](https://github.com/element-hq/element-web/pull/31293)). Contributed by @richvdh.
## 🐛 Bug Fixes
* [Backport staging] Amend e2e normal icon from lock-solid to info ([#31559](https://github.com/element-hq/element-web/pull/31559)). Contributed by @t3chguy.
* [Backport staging] Fix CSS specificity causing icon issues in e2e verification ([#31548](https://github.com/element-hq/element-web/pull/31548)). Contributed by @RiotRobot.
* [Backport staging] Fix e2e icons in CompleteSecurity \& SetupEncryptionBody ([#31522](https://github.com/element-hq/element-web/pull/31522)). Contributed by @RiotRobot.
* [Backport staging] Remove an extra paragraph in advanced room settings ([#31511](https://github.com/element-hq/element-web/pull/31511)). Contributed by @RiotRobot.
* [Backport staging] Don't show the key storage out of sync toast when backup disabled ([#31507](https://github.com/element-hq/element-web/pull/31507)). Contributed by @RiotRobot.
* Fix composer button visibility in contrast colour mode ([#31255](https://github.com/element-hq/element-web/pull/31255)). Contributed by @t3chguy.
* Ensure correct room version is used and permissions are appropriately sert when creating rooms ([#31464](https://github.com/element-hq/element-web/pull/31464)). Contributed by @Half-Shot.
* Fix e2e icon rendering ([#31454](https://github.com/element-hq/element-web/pull/31454)). Contributed by @t3chguy.
* EventIndexer: ensure we add initial checkpoints when the db is first opened ([#31448](https://github.com/element-hq/element-web/pull/31448)). Contributed by @richvdh.
* Fix `/join <alias>` command failing due to race condition ([#31433](https://github.com/element-hq/element-web/pull/31433)). Contributed by @MidhunSureshR.
* MessageEventIndexDialog: distinguish indexed rooms ([#31436](https://github.com/element-hq/element-web/pull/31436)). Contributed by @richvdh.
* Move `EditInPlace` out of `Form` (Fixes: reloading EW on EC url update) ([#31434](https://github.com/element-hq/element-web/pull/31434)). Contributed by @toger5.
* Fixes issue where cursor would jump to the beginning of the input field after converting Japanese text and pressing Tab ([#31432](https://github.com/element-hq/element-web/pull/31432)). Contributed by @shinaoka.
* Fix widgets getting stuck in loading states ([#31314](https://github.com/element-hq/element-web/pull/31314)). Contributed by @robintown.
* Room list: fix room options remaining on room item after mouse leaving ([#31414](https://github.com/element-hq/element-web/pull/31414)). Contributed by @florianduros.
* Make `RoomList.showMessagePreview` configurable by `config.json` ([#31419](https://github.com/element-hq/element-web/pull/31419)). Contributed by @florianduros.
* Fix bug which caused app not to load correctly when `force_verification` is enabled ([#31265](https://github.com/element-hq/element-web/pull/31265)). Contributed by @richvdh.
* Room list: display the menu option on the room list item when clicked/opened ([#31380](https://github.com/element-hq/element-web/pull/31380)). Contributed by @florianduros.
* Fix handling of SVGs ([#31359](https://github.com/element-hq/element-web/pull/31359)). Contributed by @t3chguy.
* Fix word wrapping in expanded left panel buttons ([#31377](https://github.com/element-hq/element-web/pull/31377)). Contributed by @t3chguy.
* Fix aspect ratio on error view background ([#31361](https://github.com/element-hq/element-web/pull/31361)). Contributed by @t3chguy.
* Fix failure to request persistent storage perms ([#31299](https://github.com/element-hq/element-web/pull/31299)). Contributed by @richvdh.
* Fix calls sometimes not knowing that they're presented ([#31313](https://github.com/element-hq/element-web/pull/31313)). Contributed by @robintown.
Changes in [1.12.6](https://github.com/element-hq/element-web/releases/tag/v1.12.6) (2025-12-03) Changes in [1.12.6](https://github.com/element-hq/element-web/releases/tag/v1.12.6) (2025-12-03)
================================================================================================ ================================================================================================
This release fixes a bug where 1:1 calling was incorrectly not available if no Element Call focus was set. This release fixes a bug where 1:1 calling was incorrectly not available if no Element Call focus was set.

View File

@@ -1,7 +1,7 @@
# syntax=docker.io/docker/dockerfile:1.20-labs@sha256:dbcde2ebc4abc8bb5c3c499b9c9a6876842bf5da243951cd2697f921a7aeb6a9 # syntax=docker.io/docker/dockerfile:1.20-labs@sha256:dbcde2ebc4abc8bb5c3c499b9c9a6876842bf5da243951cd2697f921a7aeb6a9
# Builder # Builder
FROM --platform=$BUILDPLATFORM node:24-bullseye@sha256:b36a1eab6bdeb43cf4808370d18b6706452e810e3563b1ce669d2965af3c0464 AS builder FROM --platform=$BUILDPLATFORM node:24-bullseye@sha256:5583cbe5d3347db372d9a9100eba272b548ca1f53246b9b769334bcd0eef2c26 AS builder
# Support custom branch of the js-sdk. This also helps us build images of element-web develop. # Support custom branch of the js-sdk. This also helps us build images of element-web develop.
ARG USE_CUSTOM_SDKS=false ARG USE_CUSTOM_SDKS=false
@@ -19,7 +19,7 @@ RUN /src/scripts/docker-package.sh
RUN cp /src/config.sample.json /src/webapp/config.json RUN cp /src/config.sample.json /src/webapp/config.json
# App # App
FROM nginxinc/nginx-unprivileged:alpine-slim@sha256:8e23ab31c214ee1d7f832d63b2ee768d5cbc270a94a2cba0752fed93ad83e345 FROM nginxinc/nginx-unprivileged:alpine-slim@sha256:a6bec37058b9047ece799c01d98dc6d5aa0542b6583cc69f187652f91331a752
# Need root user to install packages & manipulate the usr directory # Need root user to install packages & manipulate the usr directory
USER root USER root

View File

@@ -112,3 +112,25 @@ Enables knock feature for rooms. This allows users to ask to join a room.
## New room list (`feature_new_room_list`) [In Development] ## New room list (`feature_new_room_list`) [In Development]
Enable the new room list that is currently in development. Enable the new room list that is currently in development.
## Exclude insecure devices when sending/receiving messages (`feature_exclude_insecure_devices`)
Do not send or receive messages to/from devices that are not properly verified. Users with unverified devices will not
receive your messages at all on those devices, and if they send messages, you will not be able to read them, but you
will be aware that a message exists.
## Share encrypted history with new members (`feature_share_history_on_invite`) [In Development]
When inviting users to an encrypted room with shared history (i.e. a room with the "Who can read history?" setting set
to "Members only (since the point in time of selecting this option)"), send the keys for previous messages to the
invitee so they can read them.
Both the inviter and the invitee must set this labs flag, before the invitation is sent.
## Encrypted state events (MSC4362) (`feature_msc4362_encrypted_state_events`)
Encrypt most of the state events in the room, including the room name and topic.
WARNING: this means that users joining a room who do not have access to its history will not be able to see the name or
topic of the room, or any other room state information. It also means the room name and topic are not available before
joining a room.

View File

@@ -43,7 +43,7 @@ const config: Config = {
"counterpart": "<rootDir>/node_modules/counterpart", "counterpart": "<rootDir>/node_modules/counterpart",
}, },
transformIgnorePatterns: [ transformIgnorePatterns: [
"/node_modules/(?!(mime|matrix-js-sdk|uuid|p-retry|is-network-error|react-merge-refs)).+$", "/node_modules/(?!(mime|matrix-js-sdk|uuid|p-retry|is-network-error|react-merge-refs|is-ip|ip-regex|super-regex|function-timeout|time-span|convert-hrtime|clone-regexp|is-regexp)).+$",
], ],
collectCoverageFrom: [ collectCoverageFrom: [
"<rootDir>/src/**/*.{js,ts,tsx}", "<rootDir>/src/**/*.{js,ts,tsx}",

View File

@@ -1,6 +1,6 @@
{ {
"name": "element-web", "name": "element-web",
"version": "1.12.6", "version": "1.12.7",
"description": "Element: the future of secure communication", "description": "Element: the future of secure communication",
"author": "New Vector Ltd.", "author": "New Vector Ltd.",
"repository": { "repository": {
@@ -69,12 +69,12 @@
"postinstall": "patch-package" "postinstall": "patch-package"
}, },
"resolutions": { "resolutions": {
"**/pretty-format/react-is": "19.2.0", "**/pretty-format/react-is": "19.2.1",
"@types/react": "19.2.6", "@types/react": "19.2.7",
"@types/react-dom": "19.2.3", "@types/react-dom": "19.2.3",
"oidc-client-ts": "3.4.1", "oidc-client-ts": "3.4.1",
"jwt-decode": "4.0.0", "jwt-decode": "4.0.0",
"caniuse-lite": "1.0.30001756", "caniuse-lite": "1.0.30001759",
"testcontainers": "^11.0.0", "testcontainers": "^11.0.0",
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0",
"wrap-ansi": "npm:wrap-ansi@^7.0.0" "wrap-ansi": "npm:wrap-ansi@^7.0.0"
@@ -92,7 +92,7 @@
"@matrix-org/spec": "^1.7.0", "@matrix-org/spec": "^1.7.0",
"@sentry/browser": "^10.0.0", "@sentry/browser": "^10.0.0",
"@types/png-chunks-extract": "^1.0.2", "@types/png-chunks-extract": "^1.0.2",
"@vector-im/compound-design-tokens": "6.4.1", "@vector-im/compound-design-tokens": "6.4.2",
"@vector-im/compound-web": "^8.3.1", "@vector-im/compound-web": "^8.3.1",
"@vector-im/matrix-wysiwyg": "2.40.0", "@vector-im/matrix-wysiwyg": "2.40.0",
"@zxcvbn-ts/core": "^3.0.4", "@zxcvbn-ts/core": "^3.0.4",
@@ -117,7 +117,7 @@
"highlight.js": "^11.3.1", "highlight.js": "^11.3.1",
"html-entities": "^2.0.0", "html-entities": "^2.0.0",
"html-react-parser": "^5.2.2", "html-react-parser": "^5.2.2",
"is-ip": "^3.1.0", "is-ip": "^5.0.0",
"js-xxhash": "^5.0.0", "js-xxhash": "^5.0.0",
"jsrsasign": "^11.0.0", "jsrsasign": "^11.0.0",
"jszip": "^3.7.0", "jszip": "^3.7.0",
@@ -137,7 +137,7 @@
"opus-recorder": "^8.0.3", "opus-recorder": "^8.0.3",
"pako": "^2.0.3", "pako": "^2.0.3",
"png-chunks-extract": "^1.0.0", "png-chunks-extract": "^1.0.0",
"posthog-js": "1.297.2", "posthog-js": "1.302.2",
"qrcode": "1.5.4", "qrcode": "1.5.4",
"re-resizable": "6.11.2", "re-resizable": "6.11.2",
"react": "^19.0.0", "react": "^19.0.0",
@@ -179,8 +179,8 @@
"@babel/preset-react": "^7.12.10", "@babel/preset-react": "^7.12.10",
"@babel/preset-typescript": "^7.12.7", "@babel/preset-typescript": "^7.12.7",
"@babel/runtime": "^7.12.5", "@babel/runtime": "^7.12.5",
"@casualbot/jest-sonar-reporter": "2.4.0", "@casualbot/jest-sonar-reporter": "2.5.0",
"@element-hq/element-call-embedded": "0.16.1", "@element-hq/element-call-embedded": "0.16.3",
"@element-hq/element-web-playwright-common": "^2.0.0", "@element-hq/element-web-playwright-common": "^2.0.0",
"@peculiar/webcrypto": "^1.4.3", "@peculiar/webcrypto": "^1.4.3",
"@playwright/test": "1.57.0", "@playwright/test": "1.57.0",
@@ -213,7 +213,7 @@
"@types/node-fetch": "^2.6.2", "@types/node-fetch": "^2.6.2",
"@types/pako": "^2.0.0", "@types/pako": "^2.0.0",
"@types/qrcode": "^1.3.5", "@types/qrcode": "^1.3.5",
"@types/react": "19.2.6", "@types/react": "19.2.7",
"@types/react-beautiful-dnd": "^13.0.0", "@types/react-beautiful-dnd": "^13.0.0",
"@types/react-dom": "19.2.3", "@types/react-dom": "19.2.3",
"@types/react-transition-group": "^4.4.0", "@types/react-transition-group": "^4.4.0",
@@ -228,7 +228,7 @@
"babel-loader": "^10.0.0", "babel-loader": "^10.0.0",
"babel-plugin-jsx-remove-data-test-id": "^3.0.0", "babel-plugin-jsx-remove-data-test-id": "^3.0.0",
"blob-polyfill": "^9.0.0", "blob-polyfill": "^9.0.0",
"chokidar": "^4.0.0", "chokidar": "^5.0.0",
"concurrently": "^9.0.0", "concurrently": "^9.0.0",
"copy-webpack-plugin": "^13.0.0", "copy-webpack-plugin": "^13.0.0",
"core-js": "^3.38.1", "core-js": "^3.38.1",
@@ -281,7 +281,7 @@
"postcss-preset-env": "^10.0.0", "postcss-preset-env": "^10.0.0",
"postcss-scss": "^4.0.4", "postcss-scss": "^4.0.4",
"postcss-simple-vars": "^7.0.1", "postcss-simple-vars": "^7.0.1",
"prettier": "3.6.2", "prettier": "3.7.4",
"process": "^0.11.10", "process": "^0.11.10",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"rimraf": "^6.0.0", "rimraf": "^6.0.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@element-hq/web-shared-components", "name": "@element-hq/web-shared-components",
"version": "0.0.0-test.11", "version": "0.0.0-test.12",
"description": "Shared components for Element", "description": "Shared components for Element",
"author": "New Vector Ltd.", "author": "New Vector Ltd.",
"repository": { "repository": {
@@ -43,7 +43,7 @@
"lint:types": "tsc --noEmit --jsx react", "lint:types": "tsc --noEmit --jsx react",
"test:storybook": "test-storybook --url http://localhost:6007/", "test:storybook": "test-storybook --url http://localhost:6007/",
"test:storybook:ci": "concurrently -k -s first -n \"SB,TEST\" \"yarn storybook --no-open\" \"wait-on tcp:6007 && yarn test-storybook --url http://localhost:6007/ --ci --maxWorkers=2\"", "test:storybook:ci": "concurrently -k -s first -n \"SB,TEST\" \"yarn storybook --no-open\" \"wait-on tcp:6007 && yarn test-storybook --url http://localhost:6007/ --ci --maxWorkers=2\"",
"test:storybook:update": "playwright-screenshots --entrypoint yarn --with-node-modules && playwright-screenshots --entrypoint /work/node_modules/.bin/test-storybook --with-node-modules --url http://host.docker.internal:6007/ --updateSnapshot" "test:storybook:update": "playwright-screenshots --entrypoint /work/scripts/storybook-screenshot-update.sh --with-node-modules"
}, },
"resolutions": { "resolutions": {
"playwright": "1.57.0" "playwright": "1.57.0"

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -0,0 +1,32 @@
#!/bin/bash
#
# Update storybook screenshots
#
# This script should be used as the entrypoint parameter of the `playwright-screenshots` script. It
# installs the yarn dependencies, and then runs `test-storybook` to update the storybook screenshots.
#
# It expects to find a storybook instance running at :6007 on the host machine. It also requires that
# `playwright-screenshots` is given the `--with-node-modules` parameter.
#
# Example:
#
# test-storybook --url http://localhost:6007/
# playwright-screenshots --entrypoint /work/scripts/storybook-screenshot-update.sh --with-node-modules
#
#
# Note: even though this script is small, it is important because the alternative is running
# `playwright-screenshots` twice in quick succession (once to do `yarn install`, a second to do the
# actual updates): and that fails, because running `playwright-screenshots` without actually starting
# Testcontainers leaves a ryuk container hanging around for up to 60s, which will block the second
# invocation.
set -e
# First install dependencies. We have to do this within the playwright container rather than the host,
# because we have which must be built for the right architecture (and some environments use a VM
# to run docker containers, meaning that things inside a container use a different architecture than
# those on the host).
yarn
# Now run the screenshot update
/work/node_modules/.bin/test-storybook --url http://host.docker.internal:6007/ --updateSnapshot

View File

@@ -0,0 +1,42 @@
/*
* Copyright (c) 2025 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
import { type Meta, type StoryFn } from "@storybook/react-vite";
import React, { type JSX } from "react";
import { fn } from "storybook/test";
import { useMockedViewModel } from "../../useMockedViewModel";
import {
HistoryVisibleBannerView,
type HistoryVisibleBannerViewActions,
type HistoryVisibleBannerViewSnapshot,
} from "./HistoryVisibleBannerView";
type HistoryVisibleBannerProps = HistoryVisibleBannerViewSnapshot & HistoryVisibleBannerViewActions;
const HistoryVisibleBannerViewWrapper = ({ onClose, ...rest }: HistoryVisibleBannerProps): JSX.Element => {
const vm = useMockedViewModel(rest, {
onClose,
});
return <HistoryVisibleBannerView vm={vm} />;
};
export default {
title: "composer/HistoryVisibleBannerView",
component: HistoryVisibleBannerViewWrapper,
tags: ["autodocs"],
argTypes: {},
args: {
visible: true,
onClose: fn(),
},
} as Meta<typeof HistoryVisibleBannerViewWrapper>;
const Template: StoryFn<typeof HistoryVisibleBannerViewWrapper> = (args) => (
<HistoryVisibleBannerViewWrapper {...args} />
);
export const Default = Template.bind({});

View File

@@ -0,0 +1,28 @@
/*
* Copyright (c) 2025 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
import React from "react";
import { render } from "jest-matrix-react";
import { composeStories } from "@storybook/react-vite";
import * as stories from "./HistoryVisibleBannerView.stories.tsx";
const { Default } = composeStories(stories);
describe("HistoryVisibleBannerView", () => {
it("renders a history visible banner", () => {
const dismissFn = jest.fn();
const { container } = render(<Default onClose={dismissFn} />);
expect(container).toMatchSnapshot();
const button = container.querySelector("button");
expect(button).not.toBeNull();
button?.click();
expect(dismissFn).toHaveBeenCalled();
});
});

View File

@@ -0,0 +1,79 @@
/*
* Copyright (c) 2025 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
import { Link } from "@vector-im/compound-web";
import React, { type JSX } from "react";
import { useViewModel } from "../../useViewModel";
import { _t } from "../../utils/i18n";
import { type ViewModel } from "../../viewmodel";
import { Banner } from "../Banner";
export interface HistoryVisibleBannerViewActions {
/**
* Called when the user dismisses the banner.
*/
onClose: () => void;
}
export interface HistoryVisibleBannerViewSnapshot {
/**
* Whether the banner is currently visible.
*/
visible: boolean;
}
/**
* The view model for the banner.
*/
export type HistoryVisibleBannerViewModel = ViewModel<HistoryVisibleBannerViewSnapshot> &
HistoryVisibleBannerViewActions;
interface HistoryVisibleBannerViewProps {
/**
* The view model for the banner.
*/
vm: HistoryVisibleBannerViewModel;
}
/**
* A component to alert that history is shared to new members of the room.
*
* @example
* ```tsx
* <HistoryVisibleBannerView vm={historyVisibleBannerViewModel} />
* ```
*/
export function HistoryVisibleBannerView({ vm }: Readonly<HistoryVisibleBannerViewProps>): JSX.Element {
const { visible } = useViewModel(vm);
const contents = _t(
"room|status_bar|history_visible",
{},
{
a: substituteATag,
},
);
return (
<>
{visible && (
<Banner type="info" onClose={() => vm.onClose()}>
{contents}
</Banner>
)}
</>
);
}
function substituteATag(sub: string): JSX.Element {
return (
<Link href="https://element.io/en/help#e2ee-history-sharing" target="_blank">
{sub}
</Link>
);
}

View File

@@ -0,0 +1,62 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`HistoryVisibleBannerView renders a history visible banner 1`] = `
<div>
<div
class="banner"
data-type="info"
>
<div
class="icon"
>
<svg
fill="currentColor"
font-size="24"
height="1em"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M11.288 7.288A.97.97 0 0 1 12 7q.424 0 .713.287Q13 7.576 13 8t-.287.713A.97.97 0 0 1 12 9a.97.97 0 0 1-.713-.287A.97.97 0 0 1 11 8q0-.424.287-.713m.001 4.001A.97.97 0 0 1 12 11q.424 0 .713.287.287.288.287.713v4q0 .424-.287.712A.97.97 0 0 1 12 17a.97.97 0 0 1-.713-.288A.97.97 0 0 1 11 16v-4q0-.424.287-.713"
/>
<path
clip-rule="evenodd"
d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10m-2 0a8 8 0 1 1-16 0 8 8 0 0 1 16 0"
fill-rule="evenodd"
/>
</svg>
</div>
<span
class="content"
>
<span>
Messages you send will be shared with new members invited to this room.
<a
class="_link_1v5rz_8"
data-kind="primary"
data-size="medium"
href="https://element.io/en/help#e2ee-history-sharing"
rel="noreferrer noopener"
target="_blank"
>
Learn more
</a>
</span>
</span>
<div
class="actions"
>
<button
class="_button_187yx_8"
data-kind="secondary"
data-size="sm"
role="button"
tabindex="0"
>
Dismiss
</button>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,8 @@
/*
* Copyright (c) 2025 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
export * from "./HistoryVisibleBannerView";

View File

@@ -12,12 +12,14 @@ export * from "./audio/PlayPauseButton";
export * from "./audio/SeekBar"; export * from "./audio/SeekBar";
export * from "./avatar/AvatarWithDetails"; export * from "./avatar/AvatarWithDetails";
export * from "./composer/Banner"; export * from "./composer/Banner";
export * from "./composer/HistoryVisibleBannerView";
export * from "./event-tiles/TextualEventView"; export * from "./event-tiles/TextualEventView";
export * from "./message-body/MediaBody"; export * from "./message-body/MediaBody";
export * from "./pill-input/Pill"; export * from "./pill-input/Pill";
export * from "./pill-input/PillInput"; export * from "./pill-input/PillInput";
export * from "./rich-list/RichItem"; export * from "./rich-list/RichItem";
export * from "./rich-list/RichList"; export * from "./rich-list/RichList";
export * from "./room-list/RoomListSearchView";
export * from "./utils/Box"; export * from "./utils/Box";
export * from "./utils/Flex"; export * from "./utils/Flex";

View File

@@ -0,0 +1,47 @@
/*
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
.view {
/* From figma, this should be aligned with the room header */
min-height: 64px;
box-sizing: border-box;
border-bottom: var(--cpd-border-width-1) solid var(--cpd-color-bg-subtle-primary);
padding: 0 var(--cpd-space-3x);
}
.search {
/* The search button should take all the remaining space */
flex: 1;
/* !important is needed to override compound button in EW */
font: var(--cpd-font-body-md-regular) !important;
color: var(--cpd-color-text-secondary) !important;
min-width: 0;
svg {
fill: var(--cpd-color-icon-secondary);
}
}
.search_container {
flex: 1;
/* Shrink and truncate the search text */
white-space: nowrap;
overflow: hidden;
kbd {
font-family: inherit;
}
}
.search_text {
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: start;
}

View File

@@ -0,0 +1,74 @@
/*
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
import React, { type JSX } from "react";
import { fn } from "storybook/test";
import type { Meta, StoryFn } from "@storybook/react-vite";
import {
RoomListSearchView,
type RoomListSearchViewActions,
type RoomListSearchViewSnapshot,
} from "./RoomListSearchView";
import { useMockedViewModel } from "../../useMockedViewModel";
type RoomListSearchProps = RoomListSearchViewSnapshot & RoomListSearchViewActions;
const RoomListSearchViewWrapper = ({
onSearchClick,
onDialPadClick,
onExploreClick,
...rest
}: RoomListSearchProps): JSX.Element => {
const vm = useMockedViewModel(rest, {
onSearchClick,
onDialPadClick,
onExploreClick,
});
return <RoomListSearchView vm={vm} />;
};
export default {
title: "Room List/RoomListSearchView",
component: RoomListSearchViewWrapper,
tags: ["autodocs"],
args: {
displayExploreButton: true,
displayDialButton: false,
searchShortcut: "⌘ K",
onSearchClick: fn(),
onDialPadClick: fn(),
onExploreClick: fn(),
},
parameters: {
design: {
type: "figma",
url: "https://www.figma.com/design/vlmt46QDdE4dgXDiyBJXqp/ER-33-Left-Panel-2025?node-id=98-1979&t=vafb4zoYMNLRuAbh-4",
},
},
} as Meta<typeof RoomListSearchViewWrapper>;
const Template: StoryFn<typeof RoomListSearchViewWrapper> = (args) => <RoomListSearchViewWrapper {...args} />;
export const Default = Template.bind({});
export const WithDialPad = Template.bind({});
WithDialPad.args = {
displayDialButton: true,
};
export const WithoutExplore = Template.bind({});
WithoutExplore.args = {
displayExploreButton: false,
};
export const AllButtons = Template.bind({});
AllButtons.args = {
displayExploreButton: true,
displayDialButton: true,
searchShortcut: "⌘ K",
};

View File

@@ -0,0 +1,103 @@
/*
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
import { render, screen } from "jest-matrix-react";
import { composeStories } from "@storybook/react-vite";
import React from "react";
import userEvent from "@testing-library/user-event";
import * as stories from "./RoomListSearchView.stories";
import {
RoomListSearchView,
type RoomListSearchViewActions,
type RoomListSearchViewSnapshot,
} from "./RoomListSearchView";
import { MockViewModel } from "../../viewmodel/MockViewModel";
const { Default, WithDialPad, WithoutExplore, AllButtons } = composeStories(stories);
describe("RoomListSearchView", () => {
afterEach(() => {
jest.clearAllMocks();
});
describe("Storybook snapshots", () => {
it("renders the default state", () => {
const { container } = render(<Default />);
expect(container).toMatchSnapshot();
});
it("renders with dial pad button", () => {
const { container } = render(<WithDialPad />);
expect(container).toMatchSnapshot();
});
it("renders without explore button", () => {
const { container } = render(<WithoutExplore />);
expect(container).toMatchSnapshot();
});
it("renders with all buttons visible", () => {
const { container } = render(<AllButtons />);
expect(container).toMatchSnapshot();
});
});
describe("User interactions", () => {
const onSearchClick = jest.fn();
const onDialPadClick = jest.fn();
const onExploreClick = jest.fn();
class TestViewModel extends MockViewModel<RoomListSearchViewSnapshot> implements RoomListSearchViewActions {
public onSearchClick = onSearchClick;
public onDialPadClick = onDialPadClick;
public onExploreClick = onExploreClick;
}
it("should call onSearchClick when search button is clicked", async () => {
const user = userEvent.setup();
const vm = new TestViewModel({
displayExploreButton: false,
displayDialButton: false,
searchShortcut: "⌘ K",
});
render(<RoomListSearchView vm={vm} />);
await user.click(screen.getByRole("button", { name: "Search ⌘ K" }));
expect(onSearchClick).toHaveBeenCalledTimes(1);
});
it("should call onDialPadClick when dial pad button is clicked", async () => {
const user = userEvent.setup();
const vm = new TestViewModel({
displayExploreButton: false,
displayDialButton: true,
searchShortcut: "⌘ K",
});
render(<RoomListSearchView vm={vm} />);
await user.click(screen.getByRole("button", { name: "Open dial pad" }));
expect(onDialPadClick).toHaveBeenCalledTimes(1);
});
it("should call onExploreClick when explore button is clicked", async () => {
const user = userEvent.setup();
const vm = new TestViewModel({
displayExploreButton: true,
displayDialButton: false,
searchShortcut: "⌘ K",
});
render(<RoomListSearchView vm={vm} />);
await user.click(screen.getByRole("button", { name: "Explore rooms" }));
expect(onExploreClick).toHaveBeenCalledTimes(1);
});
});
});

View File

@@ -0,0 +1,119 @@
/*
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
import React, { type JSX, type MouseEventHandler } from "react";
import { Button } from "@vector-im/compound-web";
import ExploreIcon from "@vector-im/compound-design-tokens/assets/web/icons/explore";
import SearchIcon from "@vector-im/compound-design-tokens/assets/web/icons/search";
import DialPadIcon from "@vector-im/compound-design-tokens/assets/web/icons/dial-pad";
import styles from "./RoomListSearchView.module.css";
import { type ViewModel } from "../../viewmodel/ViewModel";
import { useViewModel } from "../../useViewModel";
import { Flex } from "../../utils/Flex";
import { useI18n } from "../../utils/i18nContext";
export interface RoomListSearchViewSnapshot {
/**
* Whether to display the explore button.
*/
displayExploreButton: boolean;
/**
* Whether to display the dial pad button.
*/
displayDialButton: boolean;
/**
* The keyboard shortcut text to display for the search action.
* For example: "⌘ K" on macOS or "Ctrl K" on other platforms.
*/
searchShortcut: string;
}
export interface RoomListSearchViewActions {
/**
* Handles the click event on the search button.
*/
onSearchClick: MouseEventHandler<HTMLButtonElement>;
/**
* Handles the click event on the dial pad button.
*/
onDialPadClick: MouseEventHandler<HTMLButtonElement>;
/**
* Handles the click event on the explore button.
*/
onExploreClick: MouseEventHandler<HTMLButtonElement>;
}
/**
* The view model for the room list search component.
*/
export type RoomListSearchViewModel = ViewModel<RoomListSearchViewSnapshot> & RoomListSearchViewActions;
interface RoomListSearchViewProps {
/**
* The view model for the room list search component.
*/
vm: RoomListSearchViewModel;
}
/**
* A search component to be displayed at the top of the room list.
* The component provides search functionality, optional dial pad access, and optional room exploration.
*
* @example
* ```tsx
* <RoomListSearchView vm={roomListSearchViewModel} />
* ```
*/
export function RoomListSearchView({ vm }: Readonly<RoomListSearchViewProps>): JSX.Element {
const { translate: _t } = useI18n();
const { displayExploreButton, displayDialButton, searchShortcut } = useViewModel(vm);
return (
<Flex
data-testid="room-list-search"
className={styles.view}
role="search"
gap="var(--cpd-space-2x)"
align="center"
>
<Button
id="room-list-search-button"
className={styles.search}
kind="secondary"
size="sm"
Icon={SearchIcon}
onClick={vm.onSearchClick}
>
<Flex className={styles["search_container"]} as="span" justify="space-between">
<span className={styles["search_text"]}>{_t("action|search")}</span>
<kbd>{searchShortcut}</kbd>
</Flex>
</Button>
{displayDialButton && (
<Button
kind="secondary"
size="sm"
Icon={DialPadIcon}
iconOnly={true}
aria-label={_t("left_panel|open_dial_pad")}
onClick={vm.onDialPadClick}
/>
)}
{displayExploreButton && (
<Button
kind="secondary"
size="sm"
Icon={ExploreIcon}
iconOnly={true}
aria-label={_t("action|explore_rooms")}
onClick={vm.onExploreClick}
/>
)}
</Flex>
);
}

View File

@@ -0,0 +1,290 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`RoomListSearchView Storybook snapshots renders the default state 1`] = `
<div>
<div
class="flex view"
data-testid="room-list-search"
role="search"
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x); --mx-flex-wrap: nowrap;"
>
<button
class="_button_187yx_8 search _has-icon_187yx_57"
data-kind="secondary"
data-size="sm"
id="room-list-search-button"
role="button"
tabindex="0"
>
<svg
aria-hidden="true"
fill="currentColor"
height="20"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M15.05 16.463a7.5 7.5 0 1 1 1.414-1.414l3.243 3.244a1 1 0 0 1-1.414 1.414zM16 10.5a5.5 5.5 0 1 0-11 0 5.5 5.5 0 0 0 11 0"
/>
</svg>
<span
class="flex search_container"
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: space-between; --mx-flex-gap: 0; --mx-flex-wrap: nowrap;"
>
<span
class="search_text"
>
Search
</span>
<kbd>
⌘ K
</kbd>
</span>
</button>
<button
aria-label="Explore rooms"
class="_button_187yx_8 _has-icon_187yx_57 _icon-only_187yx_50"
data-kind="secondary"
data-size="sm"
role="button"
tabindex="0"
>
<svg
aria-hidden="true"
fill="currentColor"
height="20"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 13a.97.97 0 0 1-.713-.287A.97.97 0 0 1 11 12q0-.424.287-.713A.97.97 0 0 1 12 11q.424 0 .713.287.287.288.287.713 0 .424-.287.713A.97.97 0 0 1 12 13m0 9a9.7 9.7 0 0 1-3.9-.788 10.1 10.1 0 0 1-3.175-2.137q-1.35-1.35-2.137-3.175A9.7 9.7 0 0 1 2 12q0-2.075.788-3.9a10.1 10.1 0 0 1 2.137-3.175q1.35-1.35 3.175-2.137A9.7 9.7 0 0 1 12 2q2.075 0 3.9.788a10.1 10.1 0 0 1 3.175 2.137q1.35 1.35 2.137 3.175A9.7 9.7 0 0 1 22 12a9.7 9.7 0 0 1-.788 3.9 10.1 10.1 0 0 1-2.137 3.175q-1.35 1.35-3.175 2.137A9.7 9.7 0 0 1 12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4 6.325 6.325 4 12t2.325 5.675T12 20m0 0q-3.35 0-5.675-2.325T4 12t2.325-5.675T12 4t5.675 2.325T20 12t-2.325 5.675T12 20m1.675-5.85q.15-.075.275-.2t.2-.275l2.925-6.25q.125-.25-.062-.437-.188-.188-.438-.063l-6.25 2.925q-.15.075-.275.2t-.2.275l-2.925 6.25q-.125.25.063.438.186.186.437.062z"
/>
</svg>
</button>
</div>
</div>
`;
exports[`RoomListSearchView Storybook snapshots renders with all buttons visible 1`] = `
<div>
<div
class="flex view"
data-testid="room-list-search"
role="search"
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x); --mx-flex-wrap: nowrap;"
>
<button
class="_button_187yx_8 search _has-icon_187yx_57"
data-kind="secondary"
data-size="sm"
id="room-list-search-button"
role="button"
tabindex="0"
>
<svg
aria-hidden="true"
fill="currentColor"
height="20"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M15.05 16.463a7.5 7.5 0 1 1 1.414-1.414l3.243 3.244a1 1 0 0 1-1.414 1.414zM16 10.5a5.5 5.5 0 1 0-11 0 5.5 5.5 0 0 0 11 0"
/>
</svg>
<span
class="flex search_container"
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: space-between; --mx-flex-gap: 0; --mx-flex-wrap: nowrap;"
>
<span
class="search_text"
>
Search
</span>
<kbd>
⌘ K
</kbd>
</span>
</button>
<button
aria-label="Open dial pad"
class="_button_187yx_8 _has-icon_187yx_57 _icon-only_187yx_50"
data-kind="secondary"
data-size="sm"
role="button"
tabindex="0"
>
<svg
aria-hidden="true"
fill="currentColor"
height="20"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 18.6c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8M6.6 2.4c-.99 0-1.8.81-1.8 1.8S5.61 6 6.6 6s1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m0 5.4c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m0 5.4c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8M17.4 6c.99 0 1.8-.81 1.8-1.8s-.81-1.8-1.8-1.8-1.8.81-1.8 1.8.81 1.8 1.8 1.8M12 13.2c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m5.4 0c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m0-5.4c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m-5.4 0c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m0-5.4c-.99 0-1.8.81-1.8 1.8S11.01 6 12 6s1.8-.81 1.8-1.8-.81-1.8-1.8-1.8"
/>
</svg>
</button>
<button
aria-label="Explore rooms"
class="_button_187yx_8 _has-icon_187yx_57 _icon-only_187yx_50"
data-kind="secondary"
data-size="sm"
role="button"
tabindex="0"
>
<svg
aria-hidden="true"
fill="currentColor"
height="20"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 13a.97.97 0 0 1-.713-.287A.97.97 0 0 1 11 12q0-.424.287-.713A.97.97 0 0 1 12 11q.424 0 .713.287.287.288.287.713 0 .424-.287.713A.97.97 0 0 1 12 13m0 9a9.7 9.7 0 0 1-3.9-.788 10.1 10.1 0 0 1-3.175-2.137q-1.35-1.35-2.137-3.175A9.7 9.7 0 0 1 2 12q0-2.075.788-3.9a10.1 10.1 0 0 1 2.137-3.175q1.35-1.35 3.175-2.137A9.7 9.7 0 0 1 12 2q2.075 0 3.9.788a10.1 10.1 0 0 1 3.175 2.137q1.35 1.35 2.137 3.175A9.7 9.7 0 0 1 22 12a9.7 9.7 0 0 1-.788 3.9 10.1 10.1 0 0 1-2.137 3.175q-1.35 1.35-3.175 2.137A9.7 9.7 0 0 1 12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4 6.325 6.325 4 12t2.325 5.675T12 20m0 0q-3.35 0-5.675-2.325T4 12t2.325-5.675T12 4t5.675 2.325T20 12t-2.325 5.675T12 20m1.675-5.85q.15-.075.275-.2t.2-.275l2.925-6.25q.125-.25-.062-.437-.188-.188-.438-.063l-6.25 2.925q-.15.075-.275.2t-.2.275l-2.925 6.25q-.125.25.063.438.186.186.437.062z"
/>
</svg>
</button>
</div>
</div>
`;
exports[`RoomListSearchView Storybook snapshots renders with dial pad button 1`] = `
<div>
<div
class="flex view"
data-testid="room-list-search"
role="search"
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x); --mx-flex-wrap: nowrap;"
>
<button
class="_button_187yx_8 search _has-icon_187yx_57"
data-kind="secondary"
data-size="sm"
id="room-list-search-button"
role="button"
tabindex="0"
>
<svg
aria-hidden="true"
fill="currentColor"
height="20"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M15.05 16.463a7.5 7.5 0 1 1 1.414-1.414l3.243 3.244a1 1 0 0 1-1.414 1.414zM16 10.5a5.5 5.5 0 1 0-11 0 5.5 5.5 0 0 0 11 0"
/>
</svg>
<span
class="flex search_container"
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: space-between; --mx-flex-gap: 0; --mx-flex-wrap: nowrap;"
>
<span
class="search_text"
>
Search
</span>
<kbd>
⌘ K
</kbd>
</span>
</button>
<button
aria-label="Open dial pad"
class="_button_187yx_8 _has-icon_187yx_57 _icon-only_187yx_50"
data-kind="secondary"
data-size="sm"
role="button"
tabindex="0"
>
<svg
aria-hidden="true"
fill="currentColor"
height="20"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 18.6c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8M6.6 2.4c-.99 0-1.8.81-1.8 1.8S5.61 6 6.6 6s1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m0 5.4c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m0 5.4c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8M17.4 6c.99 0 1.8-.81 1.8-1.8s-.81-1.8-1.8-1.8-1.8.81-1.8 1.8.81 1.8 1.8 1.8M12 13.2c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m5.4 0c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m0-5.4c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m-5.4 0c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8m0-5.4c-.99 0-1.8.81-1.8 1.8S11.01 6 12 6s1.8-.81 1.8-1.8-.81-1.8-1.8-1.8"
/>
</svg>
</button>
<button
aria-label="Explore rooms"
class="_button_187yx_8 _has-icon_187yx_57 _icon-only_187yx_50"
data-kind="secondary"
data-size="sm"
role="button"
tabindex="0"
>
<svg
aria-hidden="true"
fill="currentColor"
height="20"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 13a.97.97 0 0 1-.713-.287A.97.97 0 0 1 11 12q0-.424.287-.713A.97.97 0 0 1 12 11q.424 0 .713.287.287.288.287.713 0 .424-.287.713A.97.97 0 0 1 12 13m0 9a9.7 9.7 0 0 1-3.9-.788 10.1 10.1 0 0 1-3.175-2.137q-1.35-1.35-2.137-3.175A9.7 9.7 0 0 1 2 12q0-2.075.788-3.9a10.1 10.1 0 0 1 2.137-3.175q1.35-1.35 3.175-2.137A9.7 9.7 0 0 1 12 2q2.075 0 3.9.788a10.1 10.1 0 0 1 3.175 2.137q1.35 1.35 2.137 3.175A9.7 9.7 0 0 1 22 12a9.7 9.7 0 0 1-.788 3.9 10.1 10.1 0 0 1-2.137 3.175q-1.35 1.35-3.175 2.137A9.7 9.7 0 0 1 12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4 6.325 6.325 4 12t2.325 5.675T12 20m0 0q-3.35 0-5.675-2.325T4 12t2.325-5.675T12 4t5.675 2.325T20 12t-2.325 5.675T12 20m1.675-5.85q.15-.075.275-.2t.2-.275l2.925-6.25q.125-.25-.062-.437-.188-.188-.438-.063l-6.25 2.925q-.15.075-.275.2t-.2.275l-2.925 6.25q-.125.25.063.438.186.186.437.062z"
/>
</svg>
</button>
</div>
</div>
`;
exports[`RoomListSearchView Storybook snapshots renders without explore button 1`] = `
<div>
<div
class="flex view"
data-testid="room-list-search"
role="search"
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x); --mx-flex-wrap: nowrap;"
>
<button
class="_button_187yx_8 search _has-icon_187yx_57"
data-kind="secondary"
data-size="sm"
id="room-list-search-button"
role="button"
tabindex="0"
>
<svg
aria-hidden="true"
fill="currentColor"
height="20"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M15.05 16.463a7.5 7.5 0 1 1 1.414-1.414l3.243 3.244a1 1 0 0 1-1.414 1.414zM16 10.5a5.5 5.5 0 1 0-11 0 5.5 5.5 0 0 0 11 0"
/>
</svg>
<span
class="flex search_container"
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: space-between; --mx-flex-gap: 0; --mx-flex-wrap: nowrap;"
>
<span
class="search_text"
>
Search
</span>
<kbd>
⌘ K
</kbd>
</span>
</button>
</div>
</div>
`;

View File

@@ -0,0 +1,9 @@
/*
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
export type { RoomListSearchViewModel, RoomListSearchViewSnapshot } from "./RoomListSearchView";
export { RoomListSearchView } from "./RoomListSearchView";

View File

@@ -11,3 +11,4 @@ export * from "./Snapshot";
export * from "./ViewModelSubscriptions"; export * from "./ViewModelSubscriptions";
export type * from "./ViewModel"; export type * from "./ViewModel";
export * from "./MockViewModel"; export * from "./MockViewModel";
export * from "./useCreateAutoDisposedViewModel";

File diff suppressed because it is too large Load Diff

View File

@@ -29,7 +29,7 @@ test.describe("Landmark navigation tests", () => {
// Pressing Control+F6 again will focus room search // Pressing Control+F6 again will focus room search
await page.keyboard.press("ControlOrMeta+F6"); await page.keyboard.press("ControlOrMeta+F6");
await expect(page.locator(".mx_RoomListSearch_search")).toBeFocused(); await expect(page.locator("#room-list-search-button")).toBeFocused();
// Pressing Control+F6 again will focus the message composer // Pressing Control+F6 again will focus the message composer
await page.keyboard.press("ControlOrMeta+F6"); await page.keyboard.press("ControlOrMeta+F6");
@@ -44,7 +44,7 @@ test.describe("Landmark navigation tests", () => {
await expect(page.locator(".mx_HomePage")).toBeFocused(); await expect(page.locator(".mx_HomePage")).toBeFocused();
await page.keyboard.press("ControlOrMeta+Shift+F6"); await page.keyboard.press("ControlOrMeta+Shift+F6");
await expect(page.locator(".mx_RoomListSearch_search")).toBeFocused(); await expect(page.locator("#room-list-search-button")).toBeFocused();
await page.keyboard.press("ControlOrMeta+Shift+F6"); await page.keyboard.press("ControlOrMeta+Shift+F6");
await expect(page.locator(".mx_SpaceButton_active")).toBeFocused(); await expect(page.locator(".mx_SpaceButton_active")).toBeFocused();
@@ -75,7 +75,7 @@ test.describe("Landmark navigation tests", () => {
// Pressing Control+F6 again will focus room search // Pressing Control+F6 again will focus room search
await page.keyboard.press("ControlOrMeta+F6"); await page.keyboard.press("ControlOrMeta+F6");
await expect(page.locator(".mx_RoomListSearch_search")).toBeFocused(); await expect(page.locator("#room-list-search-button")).toBeFocused();
// Pressing Control+F6 again will focus the room tile in the room list // Pressing Control+F6 again will focus the room tile in the room list
await page.keyboard.press("ControlOrMeta+F6"); await page.keyboard.press("ControlOrMeta+F6");
@@ -97,7 +97,7 @@ test.describe("Landmark navigation tests", () => {
await expect(page.locator(".mx_RoomListItemView_selected")).toBeFocused(); await expect(page.locator(".mx_RoomListItemView_selected")).toBeFocused();
await page.keyboard.press("ControlOrMeta+Shift+F6"); await page.keyboard.press("ControlOrMeta+Shift+F6");
await expect(page.locator(".mx_RoomListSearch_search")).toBeFocused(); await expect(page.locator("#room-list-search-button")).toBeFocused();
await page.keyboard.press("ControlOrMeta+Shift+F6"); await page.keyboard.press("ControlOrMeta+Shift+F6");
await expect(page.locator(".mx_SpaceButton_active")).toBeFocused(); await expect(page.locator(".mx_SpaceButton_active")).toBeFocused();
@@ -131,7 +131,7 @@ test.describe("Landmark navigation tests", () => {
// Pressing Control+F6 again will focus room search // Pressing Control+F6 again will focus room search
await page.keyboard.press("ControlOrMeta+F6"); await page.keyboard.press("ControlOrMeta+F6");
await expect(page.locator(".mx_RoomListSearch_search")).toBeFocused(); await expect(page.locator("#room-list-search-button")).toBeFocused();
// Pressing Control+F6 again will focus the room tile in the room list // Pressing Control+F6 again will focus the room tile in the room list
await page.keyboard.press("ControlOrMeta+F6"); await page.keyboard.press("ControlOrMeta+F6");
@@ -153,7 +153,7 @@ test.describe("Landmark navigation tests", () => {
await expect(page.locator(".mx_RoomListItemView")).toBeFocused(); await expect(page.locator(".mx_RoomListItemView")).toBeFocused();
await page.keyboard.press("ControlOrMeta+Shift+F6"); await page.keyboard.press("ControlOrMeta+Shift+F6");
await expect(page.locator(".mx_RoomListSearch_search")).toBeFocused(); await expect(page.locator("#room-list-search-button")).toBeFocused();
await page.keyboard.press("ControlOrMeta+Shift+F6"); await page.keyboard.press("ControlOrMeta+Shift+F6");
await expect(page.locator(".mx_SpaceButton_active")).toBeFocused(); await expect(page.locator(".mx_SpaceButton_active")).toBeFocused();

View File

@@ -168,5 +168,19 @@ test.describe("Composer", () => {
await composer.press("Enter"); await composer.press("Enter");
await expect(page.locator(".mx_EventTile_body", { hasText: "Bob" })).toBeVisible(); await expect(page.locator(".mx_EventTile_body", { hasText: "Bob" })).toBeVisible();
}); });
test("renders emoji autocomplete", { tag: "@screenshot" }, async ({ page }) => {
const composer = page.getByRole("textbox", { name: "Send an unencrypted message…" });
// Type ":+1" to trigger emoji autocomplete
await composer.pressSequentially(":+1");
// Wait for autocomplete to appear
const autocomplete = page.locator("#mx_Autocomplete");
await expect(autocomplete).toBeVisible();
// Take a screenshot of the autocomplete
await expect(autocomplete).toMatchScreenshot("emoji-autocomplete.png");
});
}); });
}); });

View File

@@ -130,7 +130,10 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
await page.unrouteAll({ behavior: "ignoreErrors" }); await page.unrouteAll({ behavior: "ignoreErrors" });
}); });
test("Verify device with QR code during login", async ({ page, app, credentials, homeserver }) => { test(
"Verify device with QR code during login",
{ tag: "@screenshot" },
async ({ page, app, credentials, homeserver }) => {
// A mode 0x02 verification: "self-verifying in which the current device does not yet trust the master key" // A mode 0x02 verification: "self-verifying in which the current device does not yet trust the master key"
await logIntoElement(page, credentials); await logIntoElement(page, credentials);
@@ -140,14 +143,21 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
const infoDialog = page.locator(".mx_InfoDialog"); const infoDialog = page.locator(".mx_InfoDialog");
// feed the QR code into the verification request. // feed the QR code into the verification request.
const qrData = await readQrCode(infoDialog); const qrData = await readQrCode(infoDialog);
await expect(page.locator(".mx_Dialog")).toMatchScreenshot("qr-code.png", {
mask: [infoDialog.locator("img")],
});
const verifier = await verificationRequest.evaluateHandle( const verifier = await verificationRequest.evaluateHandle(
(request, qrData) => request.scanQRCode(new Uint8ClampedArray(qrData)), (request, qrData) => request.scanQRCode(new Uint8ClampedArray(qrData)),
[...qrData], [...qrData],
); );
// Confirm that the bot user scanned successfully // Confirm that the bot user scanned successfully
await expect(infoDialog.getByText("Confirm that you see a green shield on your other device")).toBeVisible(); await expect(
infoDialog.getByText("Confirm that you see a green shield on your other device"),
).toBeVisible();
await expect(page.locator(".mx_Dialog")).toMatchScreenshot("confirm-green-shield.png");
await infoDialog.getByRole("button", { name: "Yes, I see a green shield" }).click(); await infoDialog.getByRole("button", { name: "Yes, I see a green shield" }).click();
await expect(page.locator(".mx_Dialog")).toMatchScreenshot("got-it.png");
await infoDialog.getByRole("button", { name: "Got it" }).click(); await infoDialog.getByRole("button", { name: "Got it" }).click();
// wait for the bot to see we have finished // wait for the bot to see we have finished
@@ -171,12 +181,17 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
// Check that the current device is connected to key backup // Check that the current device is connected to key backup
await checkDeviceIsConnectedKeyBackup(app, expectedBackupVersion, true); await checkDeviceIsConnectedKeyBackup(app, expectedBackupVersion, true);
}); },
);
test("Verify device with Security Phrase during login", async ({ page, app, credentials, homeserver }) => { test(
"Verify device with Security Phrase during login",
{ tag: "@screenshot" },
async ({ page, app, credentials, homeserver }) => {
await logIntoElement(page, credentials); await logIntoElement(page, credentials);
await enterRecoveryKeyAndCheckVerified(page, app, "new passphrase"); await enterRecoveryKeyAndCheckVerified(page, app, "new passphrase", true);
}); },
);
test("Verify device with Recovery Key during login", async ({ page, app, credentials, homeserver }) => { test("Verify device with Recovery Key during login", async ({ page, app, credentials, homeserver }) => {
const recoveryKey = (await aliceBotClient.getRecoveryKey()).encodedPrivateKey; const recoveryKey = (await aliceBotClient.getRecoveryKey()).encodedPrivateKey;
@@ -226,7 +241,12 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
}); });
/** Helper for the three tests above which verify by recovery key */ /** Helper for the three tests above which verify by recovery key */
async function enterRecoveryKeyAndCheckVerified(page: Page, app: ElementAppPage, recoveryKey: string) { async function enterRecoveryKeyAndCheckVerified(
page: Page,
app: ElementAppPage,
recoveryKey: string,
screenshot = false,
) {
await page.getByRole("button", { name: "Use recovery key" }).click(); await page.getByRole("button", { name: "Use recovery key" }).click();
// Enter the recovery key // Enter the recovery key
@@ -234,8 +254,12 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
// We use `pressSequentially` here to make sure that the FocusLock isn't causing us any problems // We use `pressSequentially` here to make sure that the FocusLock isn't causing us any problems
// (cf https://github.com/element-hq/element-web/issues/30089) // (cf https://github.com/element-hq/element-web/issues/30089)
await dialog.getByTitle("Recovery key").pressSequentially(recoveryKey); await dialog.getByTitle("Recovery key").pressSequentially(recoveryKey);
if (screenshot) {
await expect(page.locator(".mx_Dialog").filter({ hasText: "Enter your recovery key" })).toMatchScreenshot(
"recovery-key.png",
);
}
await dialog.getByRole("button", { name: "Continue", disabled: false }).click(); await dialog.getByRole("button", { name: "Continue", disabled: false }).click();
await page.getByRole("button", { name: "Done" }).click(); await page.getByRole("button", { name: "Done" }).click();
// Check that our device is now cross-signed // Check that our device is now cross-signed

View File

@@ -29,6 +29,7 @@ export const test = base.extend<{
room1Name: "Room 1", room1Name: "Room 1",
room1: async ({ room1Name: name, app, user, bot }, use) => { room1: async ({ room1Name: name, app, user, bot }, use) => {
const roomId = await app.client.createRoom({ name, invite: [bot.credentials.userId] }); const roomId = await app.client.createRoom({ name, invite: [bot.credentials.userId] });
await bot.awaitRoomMembership(roomId);
await use({ name, roomId }); await use({ name, roomId });
}, },

View File

@@ -36,11 +36,13 @@ export const test = base.extend<{
roomAlphaName: "Room Alpha", roomAlphaName: "Room Alpha",
roomAlpha: async ({ roomAlphaName: name, app, user, bot }, use) => { roomAlpha: async ({ roomAlphaName: name, app, user, bot }, use) => {
const roomId = await app.client.createRoom({ name, invite: [bot.credentials.userId] }); const roomId = await app.client.createRoom({ name, invite: [bot.credentials.userId] });
await bot.awaitRoomMembership(roomId);
await use({ name, roomId }); await use({ name, roomId });
}, },
roomBetaName: "Room Beta", roomBetaName: "Room Beta",
roomBeta: async ({ roomBetaName: name, app, user, bot }, use) => { roomBeta: async ({ roomBetaName: name, app, user, bot }, use) => {
const roomId = await app.client.createRoom({ name, invite: [bot.credentials.userId] }); const roomId = await app.client.createRoom({ name, invite: [bot.credentials.userId] });
await bot.awaitRoomMembership(roomId);
await use({ name, roomId }); await use({ name, roomId });
}, },
msg: async ({ page, app, util }, use) => { msg: async ({ page, app, util }, use) => {

View File

@@ -13,72 +13,30 @@ import { test } from ".";
test.describe("Read receipts", { tag: "@mergequeue" }, () => { test.describe("Read receipts", { tag: "@mergequeue" }, () => {
test.describe("Message ordering", () => { test.describe("Message ordering", () => {
test.describe("in the main timeline", () => { test.describe("in the main timeline", () => {
test.fixme( test.fixme("A receipt for the last event in sync order (even with wrong ts) marks a room as read", () => {});
"A receipt for the last event in sync order (even with wrong ts) marks a room as read", test.fixme("A receipt for a non-last event in sync order (even when ts makes it last) leaves room unread", () => {});
() => {},
);
test.fixme(
"A receipt for a non-last event in sync order (even when ts makes it last) leaves room unread",
() => {},
);
}); });
test.describe("in threads", () => { test.describe("in threads", () => {
// These don't pass yet - we need MSC4033 - we don't even know the Sync order yet // These don't pass yet - we need MSC4033 - we don't even know the Sync order yet
test.fixme( test.fixme("A receipt for the last event in sync order (even with wrong ts) marks a thread as read", () => {});
"A receipt for the last event in sync order (even with wrong ts) marks a thread as read", test.fixme("A receipt for a non-last event in sync order (even when ts makes it last) leaves thread unread", () => {});
() => {},
);
test.fixme(
"A receipt for a non-last event in sync order (even when ts makes it last) leaves thread unread",
() => {},
);
// These pass now and should not later - we should use order from MSC4033 instead of ts // These pass now and should not later - we should use order from MSC4033 instead of ts
// These are broken out // These are broken out
test.fixme( test.fixme("A receipt for last threaded event in ts order (even when it was received non-last) marks a thread as read", () => {});
"A receipt for last threaded event in ts order (even when it was received non-last) marks a thread as read", test.fixme("A receipt for non-last threaded event in ts order (even when it was received last) leaves thread unread", () => {});
() => {}, test.fixme("A receipt for last threaded edit in ts order (even when it was received non-last) marks a thread as read", () => {});
); test.fixme("A receipt for non-last threaded edit in ts order (even when it was received last) leaves thread unread", () => {});
test.fixme( test.fixme("A receipt for last threaded reaction in ts order (even when it was received non-last) marks a thread as read", () => {});
"A receipt for non-last threaded event in ts order (even when it was received last) leaves thread unread", test.fixme("A receipt for non-last threaded reaction in ts order (even when it was received last) leaves thread unread", () => {});
() => {},
);
test.fixme(
"A receipt for last threaded edit in ts order (even when it was received non-last) marks a thread as read",
() => {},
);
test.fixme(
"A receipt for non-last threaded edit in ts order (even when it was received last) leaves thread unread",
() => {},
);
test.fixme(
"A receipt for last threaded reaction in ts order (even when it was received non-last) marks a thread as read",
() => {},
);
test.fixme(
"A receipt for non-last threaded reaction in ts order (even when it was received last) leaves thread unread",
() => {},
);
}); });
test.describe("thread roots", () => { test.describe("thread roots", () => {
test.fixme( test.fixme("A receipt for last reaction to thread root in sync order (even when ts makes it last) marks room as read", () => {});
"A receipt for last reaction to thread root in sync order (even when ts makes it last) marks room as read", test.fixme("A receipt for non-last reaction to thread root in sync order (even when ts makes it last) leaves room unread", () => {});
() => {}, test.fixme("A receipt for last edit to thread root in sync order (even when ts makes it last) marks room as read", () => {});
); test.fixme("A receipt for non-last edit to thread root in sync order (even when ts makes it last) leaves room unread", () => {});
test.fixme(
"A receipt for non-last reaction to thread root in sync order (even when ts makes it last) leaves room unread",
() => {},
);
test.fixme(
"A receipt for last edit to thread root in sync order (even when ts makes it last) marks room as read",
() => {},
);
test.fixme(
"A receipt for non-last edit to thread root in sync order (even when ts makes it last) leaves room unread",
() => {},
);
}); });
}); });
}); });

View File

@@ -12,9 +12,12 @@ import { test } from ".";
test.describe("Read receipts", { tag: "@mergequeue" }, () => { test.describe("Read receipts", { tag: "@mergequeue" }, () => {
test.describe("messages with missing referents", () => { test.describe("messages with missing referents", () => {
test.fixme( test.fixme("A message in an unknown thread is not visible and the room is read", async ({
"A message in an unknown thread is not visible and the room is read", roomAlpha: room1,
async ({ roomAlpha: room1, roomBeta: room2, util, msg }) => { roomBeta: room2,
util,
msg,
}) => {
// Given a thread existed and the room is read // Given a thread existed and the room is read
await util.goTo(room1); await util.goTo(room1);
await util.receiveMessages(room2, ["Root1", msg.threadedOff("Root1", "T1a")]); await util.receiveMessages(room2, ["Root1", msg.threadedOff("Root1", "T1a")]);
@@ -22,8 +25,7 @@ test.describe("Read receipts", { tag: "@mergequeue" }, () => {
// When I restart, forgetting the thread root // When I restart, forgetting the thread root
// And I receive a message on that thread // And I receive a message on that thread
// Then the message is invisible and the room remains read // Then the message is invisible and the room remains read
}, });
);
test.fixme("When a message's thread root appears later the thread appears and the room is unread", () => {}); test.fixme("When a message's thread root appears later the thread appears and the room is unread", () => {});
test.fixme("An edit of an unknown message is not visible and the room is read", () => {}); test.fixme("An edit of an unknown message is not visible and the room is read", () => {});
test.fixme("When an edit's message appears later the edited version appears and the room is unread", () => {}); test.fixme("When an edit's message appears later the edited version appears and the room is unread", () => {});

View File

@@ -14,14 +14,8 @@ test.describe("Read receipts", { tag: "@mergequeue" }, () => {
test.describe("Notifications", () => { test.describe("Notifications", () => {
test.describe("in the main timeline", () => { test.describe("in the main timeline", () => {
test.fixme("A new message that mentions me shows a notification", () => {}); test.fixme("A new message that mentions me shows a notification", () => {});
test.fixme( test.fixme("Reading a notifying message reduces the notification count in the room list, space and tab", () => {});
"Reading a notifying message reduces the notification count in the room list, space and tab", test.fixme("Reading the last notifying message removes the notification marker from room list, space and tab", () => {});
() => {},
);
test.fixme(
"Reading the last notifying message removes the notification marker from room list, space and tab",
() => {},
);
test.fixme("Editing a message to mentions me shows a notification", () => {}); test.fixme("Editing a message to mentions me shows a notification", () => {});
test.fixme("Reading the last notifying edited message removes the notification marker", () => {}); test.fixme("Reading the last notifying edited message removes the notification marker", () => {});
test.fixme("Redacting a notifying message removes the notification marker", () => {}); test.fixme("Redacting a notifying message removes the notification marker", () => {});
@@ -30,18 +24,9 @@ test.describe("Read receipts", { tag: "@mergequeue" }, () => {
test.describe("in threads", () => { test.describe("in threads", () => {
test.fixme("A new threaded message that mentions me shows a notification", () => {}); test.fixme("A new threaded message that mentions me shows a notification", () => {});
test.fixme("Reading a notifying threaded message removes the notification count", () => {}); test.fixme("Reading a notifying threaded message removes the notification count", () => {});
test.fixme( test.fixme("Notification count remains steady when reading threads that contain seen notifications", () => {});
"Notification count remains steady when reading threads that contain seen notifications", test.fixme("Notification count remains steady when paging up thread view even when threads contain seen notifications", () => {});
() => {}, test.fixme("Notification count remains steady when paging up thread view after mark as unread even if older threads contain notifications", () => {});
);
test.fixme(
"Notification count remains steady when paging up thread view even when threads contain seen notifications",
() => {},
);
test.fixme(
"Notification count remains steady when paging up thread view after mark as unread even if older threads contain notifications",
() => {},
);
test.fixme("Redacting a notifying threaded message removes the notification marker", () => {}); test.fixme("Redacting a notifying threaded message removes the notification marker", () => {});
}); });
}); });

View File

@@ -207,7 +207,7 @@ test.describe("RightPanel", () => {
// \d represents the number of the space members // \d represents the number of the space members
await page await page
.locator(".mx_RoomInfoLine_private") .locator(".mx_RoomInfoLine")
.getByRole("button", { name: /\d member/ }) .getByRole("button", { name: /\d member/ })
.click(); .click();
await expect(page.locator(".mx_MemberListView")).toBeVisible(); await expect(page.locator(".mx_MemberListView")).toBeVisible();

View File

@@ -6,6 +6,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
import { type Page } from "playwright-core";
import { SettingLevel } from "../../../src/settings/SettingLevel"; import { SettingLevel } from "../../../src/settings/SettingLevel";
import { UIFeature } from "../../../src/settings/UIFeature"; import { UIFeature } from "../../../src/settings/UIFeature";
import { test, expect } from "../../element-web-test"; import { test, expect } from "../../element-web-test";
@@ -110,4 +112,107 @@ test.describe("Create Room", () => {
await expect(header).toContainText(name); await expect(header).toContainText(name);
}); });
}); });
test.describe("when the encrypted state labs flag is turned off", () => {
test.use({ labsFlags: [] });
test("creates a room without encrypted state", { tag: "@screenshot" }, async ({ page, user: _user }) => {
// When we start to create a room
await page.getByRole("button", { name: "New conversation", exact: true }).click();
await page.getByRole("menuitem", { name: "New room" }).click();
await page.getByRole("textbox", { name: "Name" }).fill(name);
// Then there is no Encrypt state events button
await expect(page.getByRole("checkbox", { name: "Encrypt state events" })).not.toBeVisible();
// And when we create the room
await page.getByRole("button", { name: "Create room" }).click();
// Then we created a normal encrypted room, without encrypted state
await expect(page.getByText("Encryption enabled")).toBeVisible();
await expect(page.getByText("State encryption enabled")).not.toBeVisible();
// And the room name state event is not encrypted
await viewSourceOnRoomNameEvent(page);
await expect(page.getByText("Original event source")).toBeVisible();
await expect(page.getByText("Decrypted event source")).not.toBeVisible();
});
});
test.describe("when the encrypted state labs flag is turned on", () => {
test.use({ labsFlags: ["feature_msc4362_encrypted_state_events"] });
test(
"creates a room with encrypted state if we check the box",
{ tag: "@screenshot" },
async ({ page, user: _user }) => {
// Given we check the Encrypted State checkbox
await page.getByRole("button", { name: "New conversation", exact: true }).click();
await page.getByRole("menuitem", { name: "New room" }).click();
await expect(page.getByRole("switch", { name: "Enable end-to-end encryption" })).toBeChecked();
await page.getByRole("switch", { name: "Encrypt state events" }).click();
await expect(page.getByRole("switch", { name: "Encrypt state events" })).toBeChecked();
// When we create a room
await page.getByRole("textbox", { name: "Name" }).fill(name);
await page.getByRole("button", { name: "Create room" }).click();
// Then we created an encrypted state room
await expect(page.getByText("State encryption enabled")).toBeVisible();
// And it has the correct name
await expect(page.getByTestId("timeline").getByRole("heading", { name })).toBeVisible();
// And the room name state event is encrypted
await viewSourceOnRoomNameEvent(page);
await expect(page.getByText("Decrypted event source")).toBeVisible();
},
);
test(
"creates a room without encrypted state if we don't check the box",
{ tag: "@screenshot" },
async ({ page, user: _user }) => {
// Given we did not check the Encrypted State checkbox
await page.getByRole("button", { name: "New conversation", exact: true }).click();
await page.getByRole("menuitem", { name: "New room" }).click();
await expect(page.getByRole("switch", { name: "Enable end-to-end encryption" })).toBeChecked();
// And it is off by default
await expect(page.getByRole("switch", { name: "Encrypt state events" })).not.toBeChecked();
// When we create a room
await page.getByRole("textbox", { name: "Name" }).fill(name);
await page.getByRole("button", { name: "Create room" }).click();
// Then we created a normal encrypted room, without encrypted state
await expect(page.getByText("Encryption enabled")).toBeVisible();
await expect(page.getByText("State encryption enabled")).not.toBeVisible();
// And it has the correct name
await expect(page.getByTestId("timeline").getByRole("heading", { name })).toBeVisible();
// And the room name state event is not encrypted
await viewSourceOnRoomNameEvent(page);
await expect(page.getByText("Original event source")).toBeVisible();
await expect(page.getByText("Decrypted event source")).not.toBeVisible();
},
);
});
}); });
async function viewSourceOnRoomNameEvent(page: Page) {
await page
.getByRole("listitem")
.filter({ hasText: "created and configured the room" })
.getByRole("button", { name: "expand" })
.click();
await page
.getByRole("listitem")
.filter({ hasText: "changed the room name to" })
.getByRole("button", { name: "Options" })
.click();
await page.getByRole("menuitem", { name: "View source" }).click();
}

View File

@@ -264,6 +264,7 @@ test.describe("Element Call", () => {
preset: "trusted_private_chat" as Preset.TrustedPrivateChat, preset: "trusted_private_chat" as Preset.TrustedPrivateChat,
invite: [bot.credentials.userId], invite: [bot.credentials.userId],
}); });
await bot.awaitRoomMembership(roomId);
await app.client.setAccountData("m.direct" as EventType.Direct, { await app.client.setAccountData("m.direct" as EventType.Direct, {
[bot.credentials.userId]: [roomId], [bot.credentials.userId]: [roomId],
}); });

View File

@@ -24,7 +24,7 @@ test.describe("PSTN", () => {
await toasts.rejectToast("Notifications"); await toasts.rejectToast("Notifications");
await toasts.assertNoToasts(); await toasts.assertNoToasts();
await expect(page.locator(".mx_RoomListSearch")).toMatchScreenshot("dialpad-trigger.png"); await expect(page.getByTestId("room-list-search")).toMatchScreenshot("dialpad-trigger.png");
await page.getByLabel("Open dial pad").click(); await page.getByLabel("Open dial pad").click();
await expect(page.locator(".mx_Dialog")).toMatchScreenshot("dialpad.png"); await expect(page.locator(".mx_Dialog")).toMatchScreenshot("dialpad.png");
}); });

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 B

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 984 KiB

After

Width:  |  Height:  |  Size: 984 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Some files were not shown because too many files have changed in this diff Show More