Commit Graph
26 Commits
Author SHA1 Message Date
Sérgio Saquetim c2c1cd978e DEV: Purge the widget rendering system (#36109)
This commit removes the legacy widget rendering system from the Discourse codebase.

See the topics below for more information:

- https://meta.discourse.org/t/upcoming-eol-for-the-widget-rendering-system/375332
- https://meta.discourse.org/t/upcoming-post-stream-changes-how-to-prepare-themes-and-plugins/372063
2025-11-26 16:10:02 -03:00
David Taylor 9c36c7bf93 DEV: Reduce console noise in qunit tests (#36044)
1. Patch node deprecation in http-proxy
2. Disable Discourse/Ember version logging in qunit tests
3. Disable memory-use reporting, but keep code so it can be re-enabled
when debugging
2025-11-14 15:55:09 +00:00
Sérgio Saquetim 74b2103d23 DEV: Replace deprecated Ember's array replace with native splice (#35019)
* Replace uses of Ember’s deprecated array extension .replace with
native .splice, using TrackedArray where reactivity is needed
(components and tests)
* Modernize TopicController computed properties to getters with
@dependentKeyCompat to preserve reactivity without Ember array
extensions
* Adjust history modal action signature to destructure the argument as
[bodyDiff]
* Add a deprecation-workflow entry for
discourse.native-array-extensions.replace to improve logging
* Add an Ember 6.6.0 patch to ensure isMutableArray excludes native
arrays, preventing false detection as MutableArray
2025-09-30 15:31:19 -03:00
Jarek RadoszandDavid Taylor 06f841da08 DEV: Update Ember to 6.6.0 (#34460)
This upgrade does not include any breaking changes for Discourse
themes/plugins. Two of the three deprecations in Ember 6 (array
prototype extensions, component-template resolution) have already been
polyfilled in Discourse. The third (action helper/modifier) is
polyfilled in this commit.

Performance testing shows a 2-3% improvement in Discourse rendering
time, thanks to upstream performance fixes in the glimmer-vm since the
regressions in the Ember 5.x series.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-08-27 16:48:40 +01:00
David Taylor cb6cc8dcd3 DEV: Drop support for template overrides and mobile-specific templates (#33101)
https://meta.discourse.org/t/355668
2025-06-06 14:34:20 +01:00
David TaylorandJarek Radosz d213cd1b00 DEV: Refactor content-tag usage in theme-transpiler, and upgrade (#32684)
This strategy allows us to synchronously init the wasm, without needing
a patch on the npm package

---------

Co-authored-by: Jarek Radosz <jarek@cvx.dev>
2025-05-12 17:54:48 +01:00
Jarek Radosz 5f3dae06fe DEV: Update content-tag to 3.1.3 (#32577) 2025-05-05 17:02:52 +02:00
Jarek Radosz e0bb7e936b DEV: Update content-tag from 3.1.1 to 3.1.2 (#32038) 2025-03-27 15:33:59 +01:00
Jarek Radosz e55d00d405 DEV: Update content-tag to 3.1.1 (#31131) 2025-02-03 17:59:41 +01:00
Jarek Radosz b2b0c462ba DEV: Update content-tag to 3.1.0 (#30339) 2024-12-18 12:59:27 +01:00
Sérgio Saquetim 1505978586 DEV: Upgrade dependencies to Ember 5.12 (#30131) 2024-12-11 11:09:25 -03:00
Jarek Radosz 5af056c48c DEV: Set version on tracked-built-ins patch (#30024) 2024-12-02 10:10:59 +01:00
Jarek Radosz c4d86635d1 DEV: Update decorator-transforms to 2.3.0 (#30020)
1. the patch is no longer needed
2. this unblocks dependabot (it's been erroring out for a bit)
2024-12-02 01:04:20 +01:00
Jarek Radosz 045f119f67 DEV: Update licensee to 11.1.1 (#30022) 2024-12-02 07:34:19 +08:00
Jarek Radosz 2137f2bb74 DEV: Update content-tag to 3.0.0 (#29980) 2024-11-28 14:07:01 +01:00
David Taylor 7f81c27cd9 PERF: Patch memory-leak fix into tracked-built-ins (#29944)
Patches the fixes from https://github.com/tracked-tools/tracked-built-ins/pull/425 into the older `@ember-compat/tracked-utils` fork which we use.

Built from https://github.com/davidtaylorhq/tracked-built-ins/commit/6a790bff68dbfb6be4f665473410ef95da15a08d
2024-11-26 20:14:20 +00:00
Jarek Radosz 1ba6f6f1ae DEV: Update content-tag to 2.0.3 (#29616) 2024-11-06 13:29:24 +01:00
Jarek Radosz 8e41af5ca7 DEV: Update decorator-transform to 2.2.2 (#29153) 2024-10-10 10:02:16 +02:00
Jarek Radosz cec5e27192 DEV: Update content-tag to 2.0.2 (#29071) 2024-10-03 12:45:11 +02:00
Jarek Radosz cfbfcc7b81 DEV: Update licensee to 11.1.0 (#28850) 2024-09-11 15:56:22 +02:00
David Taylor 80b9c280ba DEV: Switch to pnpm for JS dependencies (#28671)
This will bring significant improvements to install speed & storage requirements. For information on how it may affect you, see https://meta.discourse.org/t/324521

This commit:
- removes the `yarn.lock` and replaces with `pnpm-lock.yaml`
- updates workspaces to pnpm format
- adjusts package dependencies to work with pnpm's stricter resolution strategy
- updates Rails app to load modules from more specific node_modules directories
- adds a `.pnpmfile` which automatically cleans up old yarn-managed `node_modules` directories
- updates various scripts to call `pnpm` instead of `yarn`
- updates patches to use pnpm's native patch system instead of patch-package
- adds a patch for licensee to support pnpm
2024-09-03 10:51:07 +01:00
David Taylor 565c753dd2 DEV: @babel/plugin-proposal-decorators -> decorator-transforms (#27260)
decorator-transforms (https://github.com/ef4/decorator-transforms) is a modern replacement for babel's plugin-proposal-decorators. It provides a decorator implementation using modern browser features, without needing to enable babel's full suite of class feature transformations. This improves the developer experience and performance.

In local testing with Google's 'tachometer' tool, this reduces Discourse's 'init-to-render' time by around 3-4% (230ms -> 222ms).

It reduces our initial gzip'd JS payloads by 3.2% (2.43MB -> 2.35MB), or 7.5% (14.5MB -> 13.4MB) uncompressed.

This was previously reverted in 97847f6. This version includes a babel transformation which works around the bug in Safari <= 15.

For Cloudflare compatibility issues, check https://meta.discourse.org/t/311390
2024-06-10 15:51:48 +01:00
David Taylor 97847f6cd8 Revert "DEV: @babel/plugin-proposal-decorators -> decorator-transforms (#25290)" (#26971)
This reverts commit 0f4520867b.

This has led to two problems:

1. An incompatibility with Cloudflare's "auto minify" feature. They've deprecated this feature because of incompatibility with modern JS syntax. But unfortunately it will remain enabled on existing properties until 2024-08-05.

2. Discourse fails to boot in Safari 15. This is strange, because Safari does support all the required features in our production JS bundles. Even more strangely, things start working as soon as you open the developer tools. That suggests the cause could be a Safari bug rather than a simple incompatibility.

Reverting while we work out a path forward on both those issues.
2024-05-10 12:48:16 +01:00
David Taylor 0f4520867b DEV: @babel/plugin-proposal-decorators -> decorator-transforms (#25290)
decorator-transforms (https://github.com/ef4/decorator-transforms) is a modern replacement for babel's plugin-proposal-decorators. It provides a decorator implementation using modern browser features, without needing to enable babel's full suite of class feature transformations. This improves the developer experience and performance.

In local testing with Google's 'tachometer' tool, this reduces Discourse's 'init-to-render' time by around 3-4% (230ms -> 222ms).

It reduces our initial gzip'd JS payloads by 3.2% (2.43MB -> 2.35MB), or 7.5% (14.5MB -> 13.4MB) uncompressed.
2024-05-08 10:40:51 +01:00
Jarek Radosz 299b323d9a DEV: Update ember-cli to 5.6.0 (#25886) 2024-02-27 10:48:30 +01:00
David TaylorandJarek Radosz 588a79c80c DEV: Merge root JS packages (#25857)
Before this commit, we had a yarn package set up in the root directory and also in `app/assets/javascripts`. That meant two `yarn install` calls and two `node_modules` directories. This commit merges them both into the root location, and updates references to node_modules.

A previous attempt can be found at https://github.com/discourse/discourse/pull/21172. This commit re-uses that script to merge the `yarn.lock` files.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-02-26 13:45:58 +00:00