577 Commits

Author SHA1 Message Date
Michael Telatynski
225fe7c406 Tidy up 2026-03-04 10:32:58 +00:00
Michael Telatynski
6d71191af9 Fix axe imports 2026-03-03 18:27:32 +00:00
Michael Telatynski
fd4bb50a14 Tests galore 2026-03-03 18:25:22 +00:00
renovate[bot]
b6dbe1c259
Update pnpm to v10.30.3 (#32703)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-03 17:52:55 +00:00
renovate[bot]
e439d6adc1
Update eslint-plugins (#32701)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-03 16:51:43 +00:00
Michael Telatynski
83345e0871
Expose PLAYWRIGHT_VERSION argument properly in Dockerfile (#32688) 2026-03-03 12:40:41 +00:00
Florian Duros
3cfba323f6
Room list: avoid excessive re-renders on room list store update or filter change (#32663)
* perf(room list): clear room list item vm only when changing space

Clearing all the item vms at every room list change is causing massive
re-render of all the room list items. References to the vms are already
removed when out of view (see RoomListViewMode.updateVisibleRooms) and
handled by GC.

* perf(room list): avoid to re-render filters at every room list update

RoomListView re-renders on update but the filters (children) don't need
to.

Add a memo to avoid excessive-rerenders.

* chore: add `keepIfSame` to do diff on vm objects

* perf(room list): avoid to create new filter ids and keys when the room list is updated

The filterKeys are passed in the virtuoso context so it should reduce
internal computing

The filter ids array has always the same value, there is no point to
create a new instance.

* test(room list): remove no longer relevant test

* test(room list): add new test to ensure that room list item vms are preserved
2026-03-02 17:50:56 +00:00
Michael Telatynski
ccf3fcf4af Add API to replace Login component renderer 2026-03-02 16:54:23 +00:00
Michael Telatynski
1a9ce45038 Adopt shouldShowComponent customisations from legacy Module API 2026-03-02 16:25:50 +00:00
Zack
fe84501e95
Move ReactionRow To Shared Components MVVM (#32634)
* Init shared component structure

* Storybook implementation

* Add snapshots of storybook examples

* ViewModel Creation + Implementation In EventTile.tsx

* Prettier

* Update HTML snapshot

* Add onhover pointer on bottons

* Added compound web tooltip

* Removed possible of undefined on label

* Update snapshots

* Update setters to use merge instead of updating full snapshot

* adapt view model test for setters change

* Actions should be passed to viewmodel fix

* replace ReactionsRowWrapper forceRender with explicit reaction state

* Update snapshot
2026-03-02 13:59:04 +00:00
rbondesson
11030ae68d
Refactor DateSeparator using MVVM and move to shared-components (#32482)
* Refactor DateSeparator using MVVM and move to shared-components

* Add a few more stories, tests and screenshots

* Use the shared component and viewmodel in element-web

* Renaming custom content property an updating snapshots

* Fix lint errors and update snapshot after merge

* Change lifecycle handling for DateSeparatoreViewModel in components where manual handling is preferrable over wrapper component.

* Move context menu from viewmodel to shared components - step 1

* Create a jump to date picker component in shared components

* Add tests for coverage and fix layout issues and roving indexes

* Make element-web use the new component

* Simplify context menu and adjusting tests

* The HTMLExport now render shared components and need a I18nContext.Provider

* Updating unit tests for context menu

* Changed to {translate: _t} to let scripts pick up translations

* Fix lint issue and updating screenshots after merge

* Update snaps for element web components

* Renaming MVVM view components with suffix View.

* Fixing problem with input date calendar icon and system dark theme

* Changed the rendering of the menu and added a separate button component

* Handle input control with useRef in onKeyDown

* Updating DateSeparator snapshots on unit tests

* Updating layout after compound Menu got a className property

* Move files to new subfolder after merge

* Updated snapshot after merge

* Updating lock file

* Updates to styling from PR review

* Updates to focus/blur functionality

* Fixed tabbing and export documentation to stories

* Updated snapshots

---------

Co-authored-by: Zack <zazi21@student.bth.se>
2026-03-02 12:18:51 +00:00
ElementRobot
2f7c92c70d
[create-pull-request] automated change (#32676)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-03-02 06:42:01 +00:00
renovate[bot]
7206db8243 Update Node.js to 7fddd9d 2026-03-01 16:05:08 +00:00
dependabot[bot]
2b688528e3 build(deps): bump rollup in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [rollup](https://github.com/rollup/rollup).


Updates `rollup` from 4.52.0 to 4.59.0
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.52.0...v4.59.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-version: 4.59.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-28 16:42:02 +00:00
Will Hunt
f82a3ef1bb
Update critical gradient for room status bar (#32575)
* Update critical gradient for room status bar

As per design request, this has been updated to be much more subtle
https://github.com/element-hq/compound-design-tokens/pull/232

* update shared-component

* Cleanup

* Update snaps

* description fix color

* More cleanup

* Use the correct border color

* new snaps

* fix border, button placement, fonts etc

* update lock

* Update status bar

* Update playwright snaps

* Update snap icon

* Update other banners

* update snap

* fixup
2026-02-26 15:10:54 +00:00
ElementRobot
3a6ac6e227
Localazy Download (#32625)
* [create-pull-request] automated change

* Update tests

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-26 12:08:36 +00:00
Florian Duros
62c57023f4
Room list: avoid header overflowing when too long (#32645)
* fix(room list): make ellipsis works on room list title

Regression due to https://github.com/element-hq/element-web/pull/32421

* test(room list): add non regression test
2026-02-26 12:03:13 +00:00
Florian Duros
dd1db8c14b
Room list: center focus outline of room list item (#32637)
* fix: in room list item, replace bottom padding by top and bottom

Outline focus is not aligned when only using a padding bottom. Replace
by a padding-top and a padding-bottom.

The padding top is not added on the first item and the padding bottom
neither on the last item

* test: update snapshot

* test: update storybook screenshot

* test: update screenshot

* chore: use css var instead of duplicating the logic

* chore: add new stories for first and last item case

* test: add new screenshots following the new stories
2026-02-25 19:45:22 +00:00
Florian Duros
9590d22abe
chore: avoid story with custom font size to affect of room list item stories in docs page (#32612) 2026-02-25 13:28:21 +00:00
David Langley
3ac2b36657 bump to 1.10.0 2026-02-25 13:08:11 +00:00
David Langley
226824890a Merge pull request #198 from element-hq/langleyd/widget-lifecycle-module-api
Widget lifecycle module api
2026-02-25 12:58:43 +00:00
Zack
e26cbba541
Refactor Reactions Row Button to shared-components (#31993)
* Refactoring of ReactionRowButton to shared component MVVM

* Removal of old component and creation of unit tests

* Update

* Update tests

* Update tests to mimic VM

* Update Lint Spacing

* Added onKeyDown to follow wcag rules

* Remove Unused code

* Update screenshots

* Removal of unessecery test and story

* Update snapshot

* Refactor reactions row VMs to granular setters and merge cheap snapshot updates

* Elist Fix

* Revert ReactionRowButtonToolTip Test

* Fix ReactionsRowButtonViewModel tooltip sync to use tooltip setProps

* Add dedicated ReactionsRowButtonViewModel unit tests for setters, tooltip sync, and click actions

* Better Wording On Functions

* Update snapshot

* Update packages/shared-components/src/message-body/ReactionsRowButton/ReactionsRowButtonView.tsx

Co-authored-by: Florian Duros <florian.duros@ormaz.fr>

* use native button and tighten view model

* Update Snapshots + small fixes on reactionrow

* Removal of Null on viewmodel and adapting ReactionRow

* Update test and removal of unused test since me MVVMD ReactionRowButton

* align assertions with refactored update behavior

* FIx issue with classNames component

* Update snapshot

* Removal of old test snapshot

* Update Snapshot

* Implement Css + Snapshot Updates

* Update Snapshot and css to match old component style

* restore MatrixClientContext fallback in ReactionsRow for export/test rendering

* restore client fallback in ReactionsRow to preserve export rendering

* Remove Unused Pcss FIle

* Update Css

* Update misstake always having button default to disabled render

* Remove unsimiler css to original component

* Update Snapshot to reflect css adjustments

* Update css

* Update font to compund

* Update css to reflect old component

* Update css to compund

* Update Snapshot and css

* Update css

* Update HTML snapshot

* Update css

* Update Css

* Update snapshots

* Update HTML snapshot

* Update css + snapshot

* Update HTML snapshot

* Removal of mx css

* Update snapshot based on css removal

* Update Html snapshot

* Apply suggestion from @florianduros

Co-authored-by: Florian Duros <florian.duros@ormaz.fr>

* remove setContext from ReactionsRowButtonViewModel

* Update packages/shared-components/src/message-body/ReactionsRowButton/ReactionsRowButtonView.tsx

Co-authored-by: Florian Duros <florian.duros@ormaz.fr>

* add tooltipVm to ReactionsRowButtonViewSnapshot

* added compound token variables

* remove className from content and count inner elements

* use useMatrixClientContext() directly for ReactionsRowButtonViewModel

* Update snapshots

* Update snapshot + fix Typescript error on test file

* Removal of line-height in css

* Added line-height back and removed font: inherit;

* derive ReactionsRowButton className/ariaLabel types from HTML button attrs

* Update packages/shared-components/src/message-body/ReactionsRowButton/ReactionsRowButtonView.tsx

Co-authored-by: Florian Duros <florian.duros@ormaz.fr>

* Update src/viewmodels/message-body/ReactionsRowButtonViewModel.ts

Co-authored-by: Florian Duros <florian.duros@ormaz.fr>

* Update src/viewmodels/message-body/ReactionsRowButtonViewModel.ts

Co-authored-by: Florian Duros <florian.duros@ormaz.fr>

* Update test/viewmodels/message-body/ReactionsRowButtonViewModel-test.tsx

Co-authored-by: Florian Duros <florian.duros@ormaz.fr>

* Update snapshots and lint issues

* Update model to respond to changes

* Update aria label on view

---------

Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
2026-02-25 11:18:03 +00:00
David Langley
83d752cfd7 Add MaybePromise 2026-02-25 09:33:48 +00:00
Michael Telatynski
8b61b89ee7
Consolidate prettier on monorepo root
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-24 21:27:03 +00:00
Michael Telatynski
b8509d249b
Fixup paths
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-24 21:27:03 +00:00
Florian Duros
9c050c58b7
Enforce usage of CSF3 story in storybook (#32610)
* chore: enforce usage of CSF3 story by eslint

* chore: migrate remaining stories to CSF3
2026-02-23 17:14:25 +00:00
Florian Duros
6d870c3935
Room list: fix keyboard navigation (#32585)
* feat: add visual feedback of selection in `VirtualizedList` story

* fix: keyboard navigation when focused element is no longer in the dom

* fix: selection delay when the list is scrolled

* fix: room list item scroll issue

Avoid to use margin https://virtuoso.dev/react-virtuoso/#caveats

* test: add tests

* test(e2e): update snapshots

* test: update room list item screenshot
2026-02-23 16:27:07 +00:00
Florian Duros
b08cf5fdaa
Fix documentation of view component in storybook and migrate to CSF3 format (#32604)
* chore: add a way to keep story doc in wrapper

* chore: use `withViewDocs`

* doc: update SC readme

* doc: update copyright
2026-02-23 16:03:49 +00:00
Michael Telatynski
77670eb369
Add lint rule to protect against this access on unbound methods (#32578)
* Add Actions to ViewModel utility types and specify `this: void` signature

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

* Add https://typescript-eslint.io/rules/unbound-method/ linter to shared-components

also fix stray lint config which doesn't apply to SC

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

* Add https://typescript-eslint.io/rules/unbound-method/ linter to element-web

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

* Fix genuine issues identified by the linter

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

* Specify this:void on i18napi

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

* Update Module API

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

* Add comment for MapToVoidThis

Added utility type to map VM actions to unbound functions.

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-23 15:37:58 +00:00
Florian Duros
f4acc4b0bc
Room list: remove bold effect on selected room (#32593)
* feat(room list): remove bold effect on room name when selected

* test(room list): update snapshots

* test(room list): update e2e tests

* test: update screenshhit
2026-02-23 13:13:07 +00:00
Florian Duros
62523b2bf1
Storybook: clear font size in room list item story (#32594)
* chore: clean added font size in room list item story

* test: fix screenshot
2026-02-23 09:14:38 +00:00
ElementRobot
c8b971ea72
[create-pull-request] automated change (#32600)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-02-23 06:47:37 +00:00
dependabot[bot]
a0d4df56c0 build(deps): bump bn.js in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [bn.js](https://github.com/indutny/bn.js).


Updates `bn.js` from 4.12.1 to 4.12.3
- [Release notes](https://github.com/indutny/bn.js/releases)
- [Changelog](https://github.com/indutny/bn.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/indutny/bn.js/commits/v4.12.3)

---
updated-dependencies:
- dependency-name: bn.js
  dependency-version: 4.12.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-22 14:06:56 +00:00
dependabot[bot]
e30d825503 build(deps): bump ajv in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [ajv](https://github.com/ajv-validator/ajv).


Updates `ajv` from 6.12.6 to 6.14.0
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.12.6...v6.14.0)

---
updated-dependencies:
- dependency-name: ajv
  dependency-version: 6.14.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-21 17:45:03 +00:00
Michael Telatynski
5a3559a9bb Bump version from 1.9.0 to 1.9.1 2026-02-20 12:43:06 +00:00
Michael Telatynski
8d7c5bb515
Update vis screenshots for MessageViewTimestamp
Fixes develop breakage due to misconfigured branch protections

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-20 10:51:27 +00:00
Michael Telatynski
13a8647085
Ensure we use Inter font in Shared Components Storybook (#32584)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-20 10:08:19 +00:00
Michael Telatynski
30c27af170 Update API report for @element-hq/element-web-module-api 2026-02-20 09:33:28 +00:00
Michael Telatynski
d51eb5dfd3 Specify ThisType on i18nApi 2026-02-20 09:32:58 +00:00
rbondesson
ca3bc30f90
Refactor MessageTimestamp using MVVM and move to shared-components (#31988)
* Create a MessageTimestampView in shared components

* Switching to use shared component and view model in element-web

* Add .mx_MessageTimestamp tp _common.pcss since it is used extensively in element-web

* Added comments to view model

* Updating after Add options for consistent screenshots

* Moved rendering of late icon to EventTile

* Update shared component snaps

* Added I18nContext.Provider to Modal.tsx and HtmlExport.tsx to make them work with shared components

* Avoid circular dependencies for ModuleApi

* Adjust role and wire handlers in view model

* Change to role="link"

* Revert I18nContext.Provider changes

* Updated snapshot

* Provide I18nContext for shared-components used inside dialogs and html-export rendered in a separate root.

* Add patch for react-sdk-module-api to shared components

* Add setProps to MessageTimeViewModel and useEffect on wrappers

* Added more tests to improve coverage

* Changes after PR review

* Use specific setters in the viewmodel more relating to the business logic.

* Remove unused CSS properties

* New snapshot after merge

* Removed aria-hidden logic and display tooltips in stories

* Remove await for toolitp in HasInhibitTooltip story

* Add screenshots with visible tooltips

* Fixes after merge and review comments

* Updated snapshots for unit tests

* Removed one test since tooltips are not rendered to snapshots
2026-02-20 09:29:26 +00:00
ElementRobot
87ae8a1a45
[create-pull-request] automated change (#32586)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-02-20 08:49:33 +00:00
Michael Telatynski
0b0ac65149
Add continuous delivery for playwright-server docker image (#32522)
* Fix playwright-screenshots.sh script

gcut is a macos thing, use awk for stability

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

* Tweak playwright-screenshots.sh to pull image from ghcr before building

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

* Add missing dependency in playwright-common

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

* Add nx to prettierignore

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

* Add continuous delivery workflow for playwright-server image

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

* Switch to nx affected

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

* Prefix calls to nx with pnpm

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

* Pass GITHUB_TOKEN to nx affected

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

* Use explicit buildx builder

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

* Specify NX_DEFAULT_OUTPUT_STYLE

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

* Remove test trigger

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

* Fix image name

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-19 16:28:51 +00:00
Michael Telatynski
a9e76dbb8a Update stale screenshots playwright reporter
At some point it seems that playwright changed how reporters are passed flakes.

https://github.com/microsoft/playwright/pull/39145 needs to land to fully fix the reporter though
2026-02-19 16:04:42 +00:00
Michael Telatynski
38dbfb7a62
Fix issues with shared-components prettier (#32581)
Ignore file ignores if running prettier directly in SC
Also was missing storybook-static

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-19 15:16:53 +00:00
David Langley
4614d2f395 Remove WidgetKind and fix header 2026-02-18 18:43:26 +00:00
Florian Duros
e8d97a9b5a
Room list: make room list item scales with large font size (#32523)
* fix(sc): make room list item scale with large font

* fix: align room avatar view when using large font

* test(sc): add story for large font

* test(sc): update snapshots

* test(sc): add story with zoom
2026-02-18 18:14:43 +00:00
David Langley
a5ec21bd06 Update element-web-module-api.api.md 2026-02-18 13:18:03 +00:00
David Langley
5bb1d3d461 Add widget permissions module api 2026-02-18 13:17:53 +00:00
rbondesson
5417fce489
Refactor EncryptionEvent using MVVM and move to shared-components (#32531)
* Refactor EncryptionEvent using MVVM and move to shared-components

* Added viewmodel and unit tests for bothe viewmodel and component.

* Added test for custom-class

* Update EventTileFactory and RoomView to use the new component

* Clean up unused language strings from element-web

* Changed how the view model is created

* Make sure the initial snapshot mimics the previous component

* Optimizing viewmodel initial snapshot and update

* Updated playwright screenshots
2026-02-18 06:28:34 +00:00
renovate[bot]
ec3972e88b
Update npm non-major dependencies (#32550)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-17 17:27:18 +00:00