577 Commits

Author SHA1 Message Date
Florian Duros
81212a3c16 feat(builtins): add hideHeader and hideComposer props to RoomViewProps and renderRoomView 2025-10-28 16:06:28 +01:00
R Midhun Suresh
879c5c47f6 Update doc 2025-10-28 16:36:39 +05:30
R Midhun Suresh
74acfb84aa Add openRoom to Navigation 2025-10-28 16:36:01 +05:30
dependabot[bot]
10d73fa0ea Bump vite in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 7.1.6 to 7.1.11
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.11
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-28 10:10:32 +01:00
R Midhun Suresh
4698f68d8a Merge pull request #109 from element-hq/midhun/multiroom/client-api
Allow modules to access a part of `MatrixClient` functionality
2025-10-27 18:11:17 +05:30
R Midhun Suresh
4381032d63 Update API doc 2025-10-24 00:30:01 +05:30
R Midhun Suresh
4ee9b05608 Return a watchable 2025-10-24 00:29:18 +05:30
R Midhun Suresh
af3d476a70 Convert to property 2025-10-24 00:28:54 +05:30
R Midhun Suresh
97e1462474 Updat api doc 2025-10-24 00:08:45 +05:30
R Midhun Suresh
200d52a162 Add Stores API 2025-10-24 00:08:43 +05:30
R Midhun Suresh
6b4f33bee1 Update API doc 2025-10-23 23:45:36 +05:30
R Midhun Suresh
04379cc089 Return watchable in account data api 2025-10-23 23:41:08 +05:30
R Midhun Suresh
cd9a21ac93 Add onFirstWatch and onLastWatch to watchable
So that we can create custom watchable objects that can add/remove event
listeners as necessary.
2025-10-23 23:38:31 +05:30
David Baker
a6316d99d5 bump shared components version 2025-10-23 15:56:17 +01:00
R Midhun Suresh
17f1a54a1f Fix comment 2025-10-23 16:11:50 +05:30
R Midhun Suresh
7c40be9054 Change method to property 2025-10-23 16:07:07 +05:30
Florian Duros
0e6bacffed
Replace ViewWrapper by useMockedViewModel (#31067)
* feat: replace `ViewWrapper` by `useMockedViewModel`

* feat: update existing story
2025-10-23 08:06:06 +00:00
R Midhun Suresh
4930da1e97 Update api doc 2025-10-23 12:43:10 +05:30
R Midhun Suresh
051fd6e8fe Add method to render room avatar 2025-10-23 12:39:11 +05:30
R Midhun Suresh
b9a90b2bfc Render RoomView instead of simply returning it 2025-10-23 12:38:36 +05:30
R Midhun Suresh
d0923c7b76 Update api doc 2025-10-23 12:22:39 +05:30
R Midhun Suresh
00f9283262 Add client API 2025-10-23 12:21:22 +05:30
R Midhun Suresh
949e64c7b5 Make field protected so that Watchable can be extended
So that you can have custom watchables that have very specific
behaviour, think `class NameWatchable extends Watchable`. Useful to have
access to `listeners` when you do this.
2025-10-23 12:19:22 +05:30
R Midhun Suresh
c24cfb6311 Introduce an abstraction for Room
All APIs that need to return a room will use this type.
2025-10-23 12:18:33 +05:30
Florian Duros
55a7bc5b13
fix: only export setLanguage for shared-component build (#31053) 2025-10-21 13:08:13 +00:00
David Baker
214f3e20a8 Merge pull request #79 from element-hq/dbkr/module_experiments
Add some module interfaces
2025-10-21 11:03:39 +01:00
David Baker
824f262ac9 Make onSelected non-optional 2025-10-20 17:44:15 +01:00
David Baker
a41a7faa75 docs 2025-10-20 17:33:09 +01:00
David Baker
79344ffd31 Update docs 2025-10-20 16:36:48 +01:00
David Baker
c938dbe519 Rename contextMenuTooltip to just tooltip
because it has nothing to do with context menus afaics
2025-10-20 16:34:58 +01:00
David Baker
b5639c25a4 Fix public/alpha statuses 2025-10-17 12:14:20 +01:00
David Baker
e1f7a798a2 More doc 2025-10-17 12:11:39 +01:00
David Baker
b83b5f4ad6 Add more docs 2025-10-17 12:10:07 +01:00
David Baker
6d0a715ac0 Tweak doc 2025-10-17 11:56:48 +01:00
R Midhun Suresh
c8f1c19517
Add missing dependency (#31034) 2025-10-15 16:45:49 +00:00
R Midhun Suresh
2598e4ea22
Move view model code to shared components package (#31024)
* Remove vm related code from element-web/src

* Add and export view model code from package

* Update imports

* Rewrite vm tests using vitest

* Add github action to run vm tests

* Fix lint errors

* Mvoe tests over to jest

* Try fixing code coverage

* Second attempt at fixing code coverage
2025-10-15 13:49:12 +00:00
renovate[bot]
ac96ab0d46
Update react monorepo (#31014)
* Update react monorepo

* Update snapshots

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

* Update shared-components snapshots

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-10-15 11:20:34 +00:00
David Baker
c519438dad
Add prepare script (#31030)
Removed it when we switched to publishing, but that doesn't really
make sense
2025-10-15 09:22:42 +00:00
David Baker
5dc8edcae0
Build the published shared components (#30986)
* Move shared components to a packages/ directory

so they can be publish more sensibly

* Iterate towards split out shared-components module

 * Move shared component source into src/ subdir
 * Fix up imports
 * Include shared components in babel-ing (again)

* Remove now unused dependencies

* Update import in storybook preview

* ...except of course they aren't unused

if we import the shared components by source

* Ignore shared components deps

* Add shared-components to i18n paths

and upgrade web-i18n to version that supports doing so

* Move storybook stuff to shared-components

* Seems we don't need this anymore...

* Remove unused deps

and remove storybook plugin from eslint

* Presumably working-directory is only valid on run steps

* Ignore dep & run prettier

* Prettier on knips.ts

* Hopefully run in right dir

* Remember how to software write

* Okay... how about THIS way?

* Oh right, they were git ignored. Sigh.

* Add concurrently

* Ignore in knip

* Better?

* Paaaaaaaackageeeeeeees

* More packages

* Move playwright snapshots

* Still need a custom snapshots dir

* Build shared components in their separate package

Port https://github.com/element-hq/element-web/pull/30963
to https://github.com/element-hq/element-web/pull/30962

* Add prepare script

* try making it a postinstall

* no, this probably does want to be prepare

postinstall doesn't really make sense since you would not have the
dev dependencies at that point

* Add workflow to publish shared components

* Put in the namespace

* Add eslint back

* Oh, now knip sees them

* Fix another import

* Don't lint shared-components with everything else

Okay, eslint & tsconfig are tied too closely for this to work and
running tsc on the shared components will need its deps installing

* Maybe lint shared components

please?

* Not quite

* Fix name, add main, move patch-package to dependencies

Although the only patched package is a dev dependency, but the postinstall
will fail if patch-package isn't there.

* Switch to npm for publishing

Mostly because knip seems to this that yarn publish doesn't exist,
although actually it seems super confused about versioning so let's
just skip it.

* Also hopefully enable provenance

because why not

* Maybe get exports right

* Add richlist

* Yeah, of course the keys are ordered

why would the keys not be ordered

* Build web resources first

Otherwise yarn prepare won't work

* Fix exports

and add web-i18n as a dep

* prettier

* build res for static analysis

* more build:res

* ViewModel is only an interface

so export type

* Prettier

* Bump to 5

as I'll do at least one test with the publish action
2025-10-14 10:04:23 +00:00
David Baker
2698ad422e
Move shared components to a packages/ directory (#30962)
* Move shared components to a packages/ directory

so they can be publish more sensibly

* Iterate towards split out shared-components module

 * Move shared component source into src/ subdir
 * Fix up imports
 * Include shared components in babel-ing (again)

* Remove now unused dependencies

* Update import in storybook preview

* ...except of course they aren't unused

if we import the shared components by source

* Ignore shared components deps

* Add shared-components to i18n paths

and upgrade web-i18n to version that supports doing so

* Move storybook stuff to shared-components

* Seems we don't need this anymore...

* Remove unused deps

and remove storybook plugin from eslint

* Presumably working-directory is only valid on run steps

* Ignore dep & run prettier

* Prettier on knips.ts

* Hopefully run in right dir

* Remember how to software write

* Okay... how about THIS way?

* Oh right, they were git ignored. Sigh.

* Add concurrently

* Ignore in knip

* Better?

* Paaaaaaaackageeeeeeees

* More packages

* Move playwright snapshots

* Still need a custom snapshots dir

* Add eslint back

* Oh, now knip sees them

* Fix another import

* Don't lint shared-components with everything else

Okay, eslint & tsconfig are tied too closely for this to work and
running tsc on the shared components will need its deps installing

* Maybe lint shared components

please?

* Not quite

* Remove storybook again

Re-check if it does work without it

* Remove storybook eslint plugin

as we're not linting storybook here anymore

* Remove this too

* We do need it here though
2025-10-13 10:54:50 +00:00
Richard van der Hoff
31d6b73476 v2.0.0 2025-10-03 17:00:45 +01:00
Richard van der Hoff
68de37a6cb Playwright: add a createNewInstance utility function
Sometimes it's useful to be able to use two separate Element-Web instances, in
isolated browsers. This patch adds a utility method which creates such an
instance.
2025-10-03 14:34:22 +01:00
Richard van der Hoff
d0c3901a1a Merge remote-tracking branch 'origin/main' into rav/new_context 2025-10-03 14:32:47 +01:00
Richard van der Hoff
595141cf4b Playwright: factor out helpers for config.json
Factor out some helper functions for building `config.json` files,
and adding the relevant routes to browser contexts.
2025-10-03 14:28:35 +01:00
Richard van der Hoff
92b9896deb Factor out a helper function populateLocalStorageWithCredentials
This just takes the innards of the `pageWithCredentials` fixture and makes it
reusable in contexts outside the fixture. (This can be useful if you want to
use Element with an account other than the default provided by the
`credentials` fixture.)
2025-10-03 12:42:57 +01:00
Richard van der Hoff
885e7c36d9 Add homeserverBaseUrl field to Credentials
`Credentials` is used to record the access token etc once we log in a or
register a user. An access token isn't much use to you unless you know where to
send it, so this patch addes a new field, `homeserverUrl`, which contains
the base public URL for the homeserver.
2025-10-03 12:25:21 +01:00
David Baker
cf869c9454 Tweak api so it can be called multiple times
to update the space item's properties.
2025-09-25 17:33:53 +01:00
David Baker
446830776f New interface for adding space panel items 2025-09-25 11:57:13 +01:00
David Baker
9685775528 Maybe make api-extractor happy 2025-09-24 16:07:31 +01:00
David Baker
2cd86f7c3d Add some experimental module interfaces
...with somewhat placeholder names as they're the best I can think of right now:

 * 'Extras': To add new bits of UI to places (specifically the space panel)
 * 'Builtins': For modules to render components that are part of Element Web
 * 'Navigation': For modules to add paths to the URL router
2025-09-24 10:58:41 +01:00