85 Commits

Author SHA1 Message Date
Will Hunt
ef8bf8acd5
Update packages/shared-components/src/i18n/strings/en_EN.json
Co-authored-by: Jim Mackenzie <jim@jimmackenzie.co.uk>
2026-01-13 14:08:56 +00:00
Half-Shot
823814aa4d Update snaps 2026-01-13 12:36:09 +00:00
Half-Shot
4d0f9a3f34 Revert snap changes 2026-01-13 12:30:38 +00:00
Half-Shot
224ebb88af Merge remote-tracking branch 'origin/develop' into hs/safety-error-code 2026-01-13 12:29:41 +00:00
Will Hunt
2e6cf8734b
Refactor RoomStatusBar into MVVM (#31523)
* Refactor RoomStatusBar into MVVM

* cleanup

* updated snaps

* More cleanup

* fix loop

* fixup

* drop comment

* lint

* cleanup console statements

* Starting to move to a MVVM v2 component.

* extra

* Refactor as a shared-componend / MVVM v2

* some cleanup

* i18n for banner

* remove removed css

* Update playwright tests to have a two stage on the consent bar.

* Update snaps

* Update snapshots

* cleanup

* update snaps

* refactor to use enum

* fix slight differences in pw snaps

* Add unit tests

* fix snaps

* snaps updated

* more test cleanups

* fix snaps

* fixed now?

* Disable animationsq

* lint lint lint

* remove console

* lint

* fix snap

* Refactor based on review comments.

* update view model test

* oops!

* fix snap

* Update snaps

* snap snap snap

* switch to a const map of strings

* Use this.disposables

* Update translations to be inside shared-components

* fix the tac

* Also retry

* Cleanup

* update snaps

* update other snaps

* snap updates
2026-01-12 21:13:15 +00:00
Will Hunt
7ad6b4b411
Ensure correct focus configuration for Element Call before allowing users to call. (#31490)
* fixup type

* Validate Element Call foci config

* revert changes

* Split out logic to CallStore so we don't repeat checks.

* Refactor to use CallStore so we only fetch once.

* Add test for useRoomCall

* lint

* Ensure we enable MatrixRTC when configuring element call.

* fix test

* Update @element-hq/element-web-playwright-common to 2.2.2 and enable matrix rtc

* lint

* Ensure call is configured for header test

* type

* Improve coverage

* Update based on feedback

* fix type
2026-01-09 12:04:31 +00:00
renovate[bot]
a5af6cf23f
Update dependency @element-hq/element-web-playwright-common to v2.2.0 (#31659)
* Update dependency @element-hq/element-web-playwright-common to v2.2.0

* Update playwright-common

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

* Update playwright-common s'more

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>
2026-01-07 14:45:03 +00:00
renovate[bot]
9db08a4574
Update dependency matrix-web-i18n to v3.5.0 (#31660)
* Update dependency matrix-web-i18n to v3.5.0

* Update matrix-web-i18n

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

* Update matrix-web-i18n in shared-components too

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

* matrix-web-i18n is now ESM

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>
2026-01-07 14:15:03 +00:00
David Baker
2f817f32ce
Fix shared components i18n check (#31672)
* Remove extra encryption strings

Found their way in during the i18n changes

* Remove log level silent

to try & work out why it only fails on CI

* Try giving it its own prettierrc

so the import is correct

* Comment why it needs its own prettierrc & put log level silent back

* Comment the right .prettierrc
2026-01-07 12:42:30 +00:00
David Baker
13696af194
Split translations between EW and shared components (#31441)
* Split translations between EW and shared components

Uses update module API with global TranslationKey type that can be
overridden.

WIP.

* Removed the wrong script (for now)

* Add the type files

* Add shared components i18n file

* More i18n strings

* Add i18n check for shared conmponents

* Needs a different name

* rerun i18n for merge from develop, fix test

* Move translated strings to shared components file

NB. there are lots of removed strings for a few languages where we
seem to have hit a localazy bug or something where the key/value
for plurals got switched, making the translations invalid. They've
been missing for a while so I'm removing them rather than trying to
restore them,

* Add shared components files to localazy

* Merge element web & shared component translations

for the built app

* Use right translations for shared component tests

and fix missign en_EN strings

* Pull shared components translations too

* Fix/disable warnings

* We can now remove the build:res call

...right? (right?)

* Remove webpack import for languages index

..and just load it using a relative path which we do for the individual
language files and also did anyway for the index because even in non-test
it was an object, not a string, so we always usesd the 'test' code path.

* Make the storybook language selector work

...without referring to the parent app's files

* Revert unnecessary yarn lock change

* Typo

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

* Add comment on why we use merge

* Fix localazy download config

to actually put the translations in the right place

* Better typescript syntax

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

* Watch both translations files

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-01-07 11:49:01 +00:00
renovate[bot]
4ee04d0661
Update npm non-major dependencies (#31662)
* Update npm non-major dependencies

* Make types 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>
2026-01-07 10:52:05 +00:00
renovate[bot]
aa6509e01c
Update storybook (#31658)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-06 15:08:29 +00:00
renovate[bot]
770ff42496
Update eslint-plugins (#31661)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-06 15:07:03 +00:00
dependabot[bot]
4bd1d4144f
Bump qs from 6.14.0 to 6.14.1 in /packages/shared-components (#31636)
Bumps [qs](https://github.com/ljharb/qs) from 6.14.0 to 6.14.1.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.14.0...v6.14.1)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-05 15:00:41 +00:00
Will Hunt
cf7bf71d01
Fix Compound Link elements not having an underline. (#31583)
* Do not alter text-decoration if an <a> tag is a Link.

* Update screenshots

* update compound web to 8.3.4

* Update snaps

* Update alllllll the snaps

* update screenshots
2026-01-05 09:27:00 +00:00
Half-Shot
16eb46fb17 misc updates 2025-12-30 12:08:27 +00:00
Half-Shot
f58da1802d Add safety views. 2025-12-30 11:16:33 +00:00
Half-Shot
14e1f9770a lint 2025-12-22 10:17:34 +00:00
Half-Shot
940f5be5aa lint lint lint 2025-12-19 17:52:52 +00:00
Half-Shot
22b68bfcc1 Disable animationsq 2025-12-19 17:50:36 +00:00
Half-Shot
72cb2718ed fixed now? 2025-12-19 17:33:22 +00:00
Half-Shot
5fdf04fea2 Merge remote-tracking branch 'origin/develop' into hs/roomstatusbar-vm 2025-12-19 17:29:16 +00:00
Half-Shot
401383a9c8 fix snaps 2025-12-19 17:19:32 +00:00
Half-Shot
5c5f89985a more test cleanups 2025-12-19 16:15:17 +00:00
Half-Shot
768a731e2d snaps updated 2025-12-19 15:59:02 +00:00
Half-Shot
847cc91a62 fix snaps 2025-12-19 15:57:40 +00:00
Half-Shot
ecc4671b57 Merge remote-tracking branch 'origin/develop' into hs/roomstatusbar-vm 2025-12-19 15:48:23 +00:00
Skye Elliot
aa84b2e07c
fix: Allow wrapping in Banner component. (#31532)
* fix: Allow wrapping in `Banner` component.

* chore: Remove translations from stories, update snapshot.
2025-12-19 15:40:45 +00:00
Half-Shot
1b744d09d6 refactor to use enum 2025-12-19 15:03:41 +00:00
ElementRobot
d1762ed29d
Localazy Download (#31563)
* [create-pull-request] automated change

* 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>
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2025-12-19 14:41:00 +00:00
Half-Shot
335498d56c Update snapshots 2025-12-19 14:09:21 +00:00
Half-Shot
3168186ef7 Update snaps 2025-12-19 13:29:33 +00:00
Half-Shot
c799ee2e38 i18n for banner 2025-12-19 12:43:00 +00:00
Half-Shot
7ce4f49cd5 some cleanup 2025-12-19 12:43:00 +00:00
Half-Shot
e449a9d8d1 Refactor as a shared-componend / MVVM v2 2025-12-19 12:43:00 +00:00
Half-Shot
15713604e3 extra 2025-12-19 12:43:00 +00:00
Half-Shot
919134616a Starting to move to a MVVM v2 component. 2025-12-19 12:43:00 +00:00
renovate[bot]
2a669d492d
Update dependency storybook to v10.1.10 [SECURITY] (#31578)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-19 09:40:12 +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
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
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
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
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
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]
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
R Midhun Suresh
f4e74c8dd2
Introduce a hook to auto dispose view models (#31178)
* Create hook to auto dispose vm

* Write test

* Fix lint error

* Use proper license

* whatever -> whichever

* Remove eslint comments

* Add clarifying comment
2025-12-05 06:48:50 +00:00
David Baker
81b3ec9df2
Make ESLint's TS Root dir relative to .eslintrc.js (#31411)
* Make ESLint's TS Root dir relative to .eslintrc.js

As per https://github.com/typescript-eslint/typescript-eslint/issues/251 seems
like this is the answer for having vscode not getting confused about
multiple projects in a monorepo with different tsconfigs.

* Add it here too for good measure
2025-12-03 16:11:15 +00:00
David Baker
61168f0531
Make shared components a regular dependency (#31402)
As other packages need the types too. Also bump version
2025-12-03 13:25:48 +00:00