1
0
mirror of https://github.com/element-hq/element-web.git synced 2026-10-23 11:09:01 +03:00

7 Commits

Author SHA1 Message Date
renovate[bot]
5e0bb4ceb8 Update vite to v5 (#34949)
* Update vite to v5

* Clean up vitest configs

* Fix vitest configs

* Iterate

* Iterate

* Iterate

* Iterate

* Iterate

* Tweak vitest reporter

* Update tests.yml

* Update tests.yml

* Add vitest/ui for the html reporert

* Iterate

* Consolidate

* Update tests.yml

* Re-add missing dep

* Iterate

* Tweak vitest reporters

* Tweak vitest reporters

* Iterate

* Iterate

* Iterate

* Update more screenshots

* Update screenshot

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-09-21 15:28:23 +00:00
David Langley
ca589fd7f6 Add multi-digit support for overlay badges and tests (#33637)
* Add multi-digit support for overlay badges and tests

Fix multi-digit notification badge in Windows taskbar overlay

The BadgeOverlayRenderer reused the over-baseImage layout for the
standalone 16x16 overlay, which pushed multi-digit badges off the left
of the canvas (e.g. "10" rendered as just "0"). Keep the pill inside
the canvas bounds in the no-baseImage path and reduce its height for
multi-digit counts so the rounded-rect path actually produces a pill.

Adds a Playwright test that bundles favicon.ts with esbuild, drives
the real BadgeOverlayRenderer in Chromium, and writes the resulting
PNGs to disk plus a scaled-up screenshot snapshot for regression
detection.

Include summary for overlay and favicon

* add esbuild as devDependency

* Update pnpm-lock.yaml

* e2e -> unit test

* Fix regression on vertical alignment of the badge text

* Update pnpm-lock.yaml

* Fix prettier formatting in favicon.ts and image snapshot tests

* Clamp Windows overlay badge at "99+"

Clamp Windows overlay badge at "99+"

The Windows taskbar overlay is only 16x16 px and the platform's own
notification badges clamp at "99+", so do the same here rather than
trying to fit three-digit counts or "1k+" labels into the tiny canvas.
Browser-tab favicons are unaffected and still render larger counts.

* Move badge rendering tests to vitest browser mode

* Rename browser tests to *.test.browser.ts

* Exclude browser tests from jest coverage collection

* Scope browser matcher types to the browser tests

* Tell knip @vitest/browser is used via tsconfig types

---------

Co-authored-by: David Langley <langley.dave@gmail.com>
2026-09-02 07:58:34 +00:00
Michael Telatynski
bbec915fb0 Enable more oxlint rules (#34189)
* Fix type imports

* Fix jsdoc

* Fixup types

* Fix stray awaits on non-thenables

* Fixup imports

* Fix splats

* Fix this-context on callbacks

* Memoise react contexts

* Prefer find/flatMap

* Make oxlint happier about our React keys

* Avoid unsafe default function params

* Fixup jsdoc

* Fixup contexts

* Switch from eslint to oxlint

* Some oxlint-related tweaks

* Iterate

* Partial revert to defer some changes and shrink diff

* Iterate

* Add eslint-plugin-element-call and enable the copyright rule

* Set strictStorePkgContentCheck

* Iterate

* Enable forwardRef oxlint rule

* Enable no-unused-vars oxlint rule

* Enable no-implied-eval oxlint rule

* Enable no-duplicate-type-constituents oxlint rule

* Enable explicit-length-check oxlint rule

* Enable prefer-number-properties oxlint rule

* Enable no-callback-in-promise oxlint rule

* Enable no-require-imports oxlint rule

* Remove disablement of most unicorn oxlint rules

* Enable no-conditional-tests oxlint rule

* Enable promise-valid-params oxlint rule

* Enable require-unicode-regexp oxlint rule

* Remove max-len comments as we use oxfmt for formatting

* Enable majority of oxlint `suspicious` rules

* Iterate

* Fix oxlint type-aware lint running without dependencies built
2026-07-29 08:26:07 +00:00
R Midhun Suresh
e46acef445 Implement tombstone tiles for calls in room and DM (#34141)
* Implement tombstone tile view for a room

* Implement tombstone tile view for a DM

* Implement root call tile view

* Export all the views

* Add screenshots

* Remove old view code

* Implement vm for tombstone tile in a room

* Implement vm for tombstone tile in a DM

* Implement root tile vm

* Use new tile in the event factory

* Remove old vm

* Exclude mock code from code checks
2026-07-07 16:27:26 +00:00
Richard van der Hoff
f93f68056a Improve accessibility of playwright fixture documentation (#34087)
* Improve accessibility of playwright fixture documentation

Empirically. by pulling the type definitions for the playwright fixtures out to
a type alias, we get better documentation for those fixtures.

* Exclude playwright-common from coverage checks
2026-07-02 11:18:14 +00:00
Michael Telatynski
2f4e6a4ec4 Use vitest for some EW unit tests (#33816)
* Use vitest for some EW unit tests

* Ensure library builds are done before unit tests

* Stabilise jest tests

* Move more tests over

* Make sonar happier

* Update types/node for happy-dom compat again

* Decrease max-workers to stabilise jest tests

* Split jest over 3 runners to alleviate memory woes

* Switch jest to runInBand

* Attempt to deflake jest tests

* tweak coverage

* tweak coverage
2026-06-15 13:24:33 +00:00
Michael Telatynski
e9a89d9872 Consolidate vitest CI & coverage (#33808)
* Consolidate modules vitest coverage

* Use vite-common as base for modules vitest config

* Make knip happier

* Fix coverage paths

* Place modules unit tests alongside src

* Switch to defineProject for better type safety

* Consolidate vitest CI & coverage

Kills off vite-common

* Update comment

* Update lockfile

* Fix shared-components vitest config

* Soften eslint config for tests in modules

* Run eslint on modules/playwright dir too

* Make tsc happy
2026-06-10 16:00:34 +00:00