Commit Graph

292 Commits (ebef0d353e22f64e903d2209fb075a550c29cc2d)

Author SHA1 Message Date
Richard van der Hoff 299270e52d
Move rust-sdk wasm artifact into bundles directory (#28718)
As of https://github.com/matrix-org/matrix-rust-sdk-crypto-wasm/pull/167, the
wasm build of matrix-sdk-crypto is actually shipped as a `.wasm` file, rather
than base64-ed into Javascript. Our current webpack config then dumps it into
the top level of the build directory, which will be a problem on redeployment
(specifically, if you try to fetch the wasm artifact for vN after vN+1 has been
deployed, you'll get a 404 and sadness).

So, instead we use Webpack's experimental support for WASM-as-ES-module, which
makes Webpack put the wasm file in the bundle, along with everything else.

Fixes: https://github.com/element-hq/element-web/issues/28632
2024-12-11 22:49:41 +00:00
Michael Telatynski 0c4189f2ed
Remove stale webpack configuration (#28649)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-05 14:42:26 +00:00
Michael Telatynski 085854b125
Merge pull request #28626 from element-hq/t3chguy/web-friendly-buffers
Remove usages of Buffer so we don't need to ship the polyfill
2024-12-04 22:10:30 +00:00
Michael Telatynski db5b3359c6
Switch to using @fontsource for Inter & Inconsolata (#28540)
* Switch to using @fontsource for Inter & Inconsolata

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

* Remove unused font Open_Sans

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

* Switch to less broken imports

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

* Switch to Ubuntu 24.04

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

* Discard changes to res/themes/dark/css/dark.pcss

* Discard changes to res/themes/legacy-light/css/_fonts.pcss

* Discard changes to res/themes/light-high-contrast/css/light-high-contrast.pcss

* Discard changes to res/themes/light/css/light.pcss

* Discard changes to .github/workflows/end-to-end-tests.yaml

* Set outputDir for fonts

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

* Use headed mode for Playwright

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

* Switch to new Chrome headless mode instead

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

* Cache bust playwright browser install in CI

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

* Update screenshots

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

* Try with 22.04

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

* Update to Ubuntu Noble

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-04 11:55:27 +00:00
Michael Telatynski af0391b86a
Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-03 17:32:10 +00:00
Michael Telatynski 36108c0c22
Update js-sdk usages around Buffers to avoid needing Buffer polyfill
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-12-03 17:18:43 +00:00
Michael Telatynski 8e213c5d34
Add source-map-loader for easier debugging (#28580)
of matrix-widget-api and other libs

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-27 14:16:05 +00:00
Michael Telatynski 7329a5f1fc
Fix source maps in production builds (#28499)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-20 16:28:03 +00:00
Michael Telatynski d36cfc37e2
Make the version file part of webpack output (#28461)
* Make the version file part of webpack output

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

* Fix outputFile path for Windows compat

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-15 09:04:00 +00:00
Michael Telatynski d8800ef987
Update to React 18 (#24763)
* Upgrade target to es2021

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

* Upgrade target to es2021

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

* Upgrade to es2022

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

* Upgrade to es2022

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

* Fix babel config

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

* Fix babel config

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

* Fix React contexts

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

* Fix types

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

* Fix React state

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

* Iterate

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

* Update to React 18

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

* Update to React 18

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Install @testing-library/dom

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Update lockfile

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

* Yarn lock update

* Iterate

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

* Iterate

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

* Iterate

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

* Iterate

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-21 13:50:06 +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
Michael Telatynski 2a33d553e4
Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-08 10:28:51 +01:00
Michael Telatynski 9407af0bfb
Remove broken HMR support
It has been broken since the Webpack 5 upgrade

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-10-04 13:41:25 +01:00
Florian Duros 6e8f0f6f6d
Fix develop build. Use `console.warn` instead of an undefined `compilation` object. 2024-08-05 19:10:34 +02:00
Richard van der Hoff 7c7cbe655a Remove code which loads legacy libolm
Now that we use the Rust crypto stack
(https://github.com/matrix-org/matrix-react-sdk/pull/12630), the legacy olm
library is unneeded. Remove all the dedicated cruft for loading it.

(All this crap is why matrix-sdk-crypto-wasm has to base64 its wasm artifact,
cf https://github.com/matrix-org/matrix-rust-sdk/pull/1167.)
2024-06-26 16:27:14 +01:00
Michael Telatynski 4651bf4eb4
Fix webpack deprecation warnings
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-13 13:16:18 +01:00
Travis Ralston bcd5c838e8
Typescriptify & use service worker for MSC3916 authentication (#27326)
* Typescriptify & use service worker for MSC3916 authentication

* appease the linter

* appease jest

* appease linter

* Get the access token directly

* Add a bit of jitter

* Improve legibility, use factored-out functions for pickling

* Add docs

* Appease the linter

* Document risks of postMessage

* Split service worker post message handling out to function

* Move registration to async function

* Use more early returns

* Thanks(?), WebStorm

* Handle case of no access token for /versions

* Appease linter

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Remove spurious try/catch

* Factor out fetch config stuff

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Finish applying code review suggestions

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-05-14 13:17:38 -06:00
Benoit Marty 095c613b69 Fix deployment of file `res/.well-known/assetlinks.json` 2024-05-14 17:42:11 +02:00
Benoit Marty 9b988f70de Add /.well-known/assetlinks.json to webpack.config.js 2024-05-07 14:09:42 +02:00
Michael Telatynski 28038cc53e
svgo prefixIds
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-12 22:22:36 +00:00
Michael Telatynski 97c3da3789
Fix svgo plugins
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-12 20:48:01 +00:00
Michael Telatynski 89e455e9a7
Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-12 19:07:08 +00:00
Michael Telatynski c022ae2853
Update config
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-02-23 11:18:13 +00:00
Robin 7622dd35c5 Allow Element Web to use cascade layers
This upgrades a number of PostCSS dependencies so that we can make use of cascade layers, a feature which I plan to use for theming of Compound: https://compound.element.io/?path=/docs/develop-theming--docs
2024-02-09 00:59:36 -05:00
Michael Telatynski 0aed37a2e5
Merge branch 'develop' into t3chguy/add-webpack-sentry-workaround 2024-01-22 14:51:53 +00:00
Michael Telatynski 5dd1ed9aac
Update webpack.config.js 2024-01-22 08:49:32 +00:00
Michael Telatynski 3867576137
Add workaround for webpack builds on platforms unsupported by Sentry
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-01-19 19:55:19 +00:00
Michael Telatynski e2371c0244
Remove webpack 4 hack
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-01-19 19:47:33 +00:00
Michael Telatynski 2d26c46c1c
Strip data-testid in production
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-01-05 10:46:39 +00:00
David Langley 855bb568b9 rename the GH org in links within documentation 2023-12-20 12:21:26 +00:00
Johannes Marbach d3ef8ff658 Add license and copy it into bundle while making terser ignore the SDK 2023-11-22 21:04:39 +01:00
Johannes Marbach b08f83b415 Add Jitsi SDK as a static resource and set up CI to update it on change 2023-11-21 20:24:38 +01:00
Johannes Marbach 6093cd8fe8 Move worklet rule up to where it used to be 2023-11-18 21:39:17 +01:00
Johannes Marbach e2fdddaa1f Add custom loader for recorder worklet 2023-11-18 21:37:30 +01:00
Johannes Marbach 8dbefcc589 Undo auto public path disablement as it doesn't work with workers 2023-11-16 19:39:39 +01:00
Johannes Marbach a56a2268f0 Merge branch 'develop' into johannes/webpack-5 2023-11-16 19:20:22 +01:00
Johannes Marbach 710336208f Allow config.json to be missing 2023-11-16 14:45:31 +01:00
Johannes Marbach 47b37c996d Revert "Try explicitly relative path for config.json"
This reverts commit 46ecafa73b.
2023-11-16 14:44:42 +01:00
Johannes Marbach 46ecafa73b Try explicitly relative path for config.json 2023-11-16 14:42:19 +01:00
Johannes Marbach d2fa827fad Replace copy/watching of non-language assets with copy-webpack-plugin 2023-11-16 14:21:45 +01:00
Johannes Marbach 432c1d65e1 Squashed commit of the following:
commit 069c1bc833
Author: Johannes Marbach <johannesm@element.io>
Date:   Sat Nov 11 16:08:30 2023 +0100

    Replace worker-loader with built-in Webpack 5 support for web workers
2023-11-13 20:18:00 +01:00
Johannes Marbach 91f46cc8f4 Disable automatic publicPath to unbreak worklets 2023-11-12 12:23:36 +01:00
Johannes Marbach 0584c39a70 Add defaults and fix comment 2023-11-11 21:36:41 +01:00
Johannes Marbach 3e03b2ea29 Appease the linter 2023-11-09 17:05:41 +01:00
Johannes Marbach 37632d84c8 Eliminate worklet-loader 2023-11-09 16:47:01 +01:00
Johannes Marbach 42da986ed3 Only show overlay on build errors 2023-11-09 16:11:49 +01:00
Johannes Marbach ae1d21f08e Remove obsolete comment 2023-11-09 15:47:55 +01:00
Johannes Marbach 25bb2ae492 Replace optimize-css-assets-webpack-plugin with css-minimizer-webpack-plugin 2023-11-08 09:19:20 +01:00
Johannes Marbach d8f46abd77 Appease the linter 2023-10-25 17:11:25 +02:00
Johannes Marbach 88666ee647 Also polyfill buffer and process/browser 2023-10-16 08:16:28 +02:00