1
0
mirror of https://github.com/element-hq/element-web.git synced 2025-09-13 06:06:34 +03:00

21 Commits

Author SHA1 Message Date
Florian Duros
24f923feac Move number.ts to utils in shared components (#30498)
* refactor: move `number.ts` in shared components

* chore: include ts test file in sonar config
2025-08-05 17:04:45 +00:00
David Baker
4bbcb8bb5d Initial structure for shared component views (#30216)
* Very first pass at shared component views

Turn the trivial TextualEvent into a shared component with a separate view
model for element web. Args to view model will probably change to be more
specific and VM typer needs abstracting out into an interface, but should
give the general idea.

* Remove old TextualEvent

* Pass showHiddenEvents

Because we used it anyway, we just cheated by getting it from the context

* Factor out common view model stuff

* Move ViewModel interface into the shared components

* Add tiny wrapper hook

* Move showHiddenEvents into props fully

* Fill in stories / test

* chore: setup storybook

cherry pick edc5e87056
from florianduros/storybook

* Add TextualEvent component to storybook

* Add mock view model & snapshot

* Remove old style stories entry

* Change import

* Change import

* Prettier

* Add paxckage patch to @types/mdx

for React 19 compat

* Pass getSnapshot as getServerSnapshot too

* Maybe make sonar regognise tests as tests

* Typo

* Use storybook reacvt-vite

There's no reason to use the react-webpack plugin just because our app
is stuck on webpack, it just means we have vite as a dependency too.

* Change here too

* Workaround for incomatible types in rollup

https://github.com/rollup/rollup/issues/5199

* Remove webpack styling addon

Not necessary now we're using vite

* Hopefully do screenshot testing...

* need newer node

* quote issues

* Make it an npm script

* colons

* use right port

* Install playwright browsers

* Try without the if

* Oh right, we need the headless shell

* Pass flag to store received screenshots

and upload diffs too

* Update snapshot from received

* Include platform in snapshot / received dir

because font rendering differs between platforms

* Suffix snapshots with platform instead

like we do for playwright

* Remove unnecessary env vars

and better name

* Add some comments

* Prettier

* Fix yarn.lock

* Memoise vm creation

Co-authored-by: Florian Duros <florianduros@element.io>

* Add implements

Co-authored-by: Florian Duros <florianduros@element.io>

* Fix listener interface

* Add implements

Co-authored-by: Florian Duros <florianduros@element.io>

* Fix types

* Fix more types

* Revert useMemo

as this isn't a hook

* Unused import

* Add missing playwright step

* Add return type annotation

* Change to add / remove subscription callback

* Change to 'add' rather than 'subs.subscribe'

* Add cache specifier for only shell playwright browsers

* Add copyright headers

---------

Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
Co-authored-by: Florian Duros <florianduros@element.io>
2025-07-14 13:13:02 +00:00
Doug
90f4d34fbb Update the mobile_guide page to the new design and link out to Element X by default. (#30172)
* Reapply "Update the mobile_guide page to the new design. (#30006)" (#30104)

This reverts commit c51823db5e.

* Use Element X as the default mobile_guide_app_variant when omitted.

* Fix a build error on Windows.

Additionally revert "Remove unnecessary <%= require %> usages" and let webpack handle all of the assets (without a manual copy rule).

* Exclude mobile_guide from coverage gate

It has playwright tests

* Revert the re-introduction of <%= require %>

* Fix snapshot tests on mobile_guide.

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2025-07-03 08:28:07 +00:00
Michael Telatynski
772019711d Small tweaks & improvements (#28253)
* Ignore playwright generated files in git & prettier

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

* Correct .editorconfig

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

* Fix jest coverage errors

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

* Exclude scripts & type defs from coverage

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-21 13:40:49 +00:00
Michael Telatynski
f0ee7f7905 Merge matrix-react-sdk into element-web
Merge remote-tracking branch 'repomerge/t3chguy/repomerge' into t3chguy/repo-merge

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-15 15:32:09 +01:00
David Baker
deeeffa104 Update project key too
because for reasons known only to sonar, they're not namespaced per-org
2024-09-06 15:40:27 +01:00
David Baker
35f96b47a1 Update GH org in the sonar config file 2024-09-06 15:26:21 +01:00
Michael Telatynski
26ac7462fd Update sonar-project.properties 2024-07-31 09:42:26 +01:00
David Baker
4728503f66 Exclude modernizr from coverage 2024-07-17 16:51:40 +02:00
Michael Telatynski
5983528a8d Remove Cypress & Playwright in their entirety (#12145) 2024-01-16 09:48:49 +00:00
Richard van der Hoff
d13b6e1b41 Add mechanism to check only one instance of the app is running (#11416)
* Add mechanism to check only one instance of the app is running

This isn't used yet, but will form part of the solution to
https://github.com/vector-im/element-web/issues/25157.

* disable instrumentation for SessionLock

* disable coverage reporting

* exclude SessionLock in sonar.properties

* Revert "disable coverage reporting"

This reverts commit 80c4336f76ec8e47e376b6744ef612a73299d14f.

* only disable session storage

* use pagehide instead of visibilitychange

* Add `checkSessionLockFree`

* Give up waiting for a lock immediately when someone else claims

* Update src/utils/SessionLock.ts
2023-08-22 14:10:47 +00:00
Michael Telatynski
aee6247ad8 Switch to nested object pluralisation format for i18n files (#11412) 2023-08-16 20:08:54 +01:00
Germain
509459f1d7 Exclude devtools view from coverage checks (#10049) 2023-02-02 17:18:35 +00:00
Michael Telatynski
a347525781 Update to @casualbot/jest-sonar-reporter (#9538) 2022-11-03 16:55:28 +00:00
Michael Telatynski
1b51456718 Update to @casualbot/jest-sonar-reporter (#23690) 2022-11-03 14:54:21 +00:00
Michael Telatynski
88b5368f72 Ignore decoder-ring for Sonar coverage (#22225) 2022-05-16 14:02:31 -06:00
Michael Telatynski
6c87e294c4 Run CI in Github Actions (#22054)
* Tidy workflows

* Update get-version-from-git.sh

* Run tests in Actions

* Upload coverage to SonarCloud

* Run linters in Actions

* Run builds in Actions, consolidating with sentry uploader

* Update sonar-project.properties

* chmod +x

* Iterate

* Use new env vars

* Delete yarn-sub.js

* Use re-usable sonarqube action

* Add README badges

* Match reality
2022-05-16 16:23:44 +02:00
Michael Telatynski
cda31136b9 Tweak sonar-project.properties (#8498) 2022-05-04 15:29:34 -04:00
Michael Telatynski
2141b122f9 Tweak sonarqube run (#8475) 2022-05-03 14:46:38 +01:00
Michael Telatynski
7477a2df7d Switch coverage over to SonarQube (#8463) 2022-05-02 21:34:31 +01:00
Michael Telatynski
6cb29f2b8d Try SonarCloud (#8441) 2022-04-29 09:38:24 +00:00