discourse/app
David Taylor fb259acd52
DEV: Introduce callback-based native class syntax for modifyClass (#27324)
This allows modifyClass to be used like this:

```
api.modifyClass(
  "model:topic",
  (Superclass) =>
    class extends Superclass {
      static someStaticMethod() {
        return `${super.someStaticMethod()} modified`;
      }

      someFunction() {
        return `${super.someFunction()} modified`;
      }

      get someGetter() {
        return `${super.someGetter} modified`;
      }
    }
);
```

One limitation, which is the same as the old object-literal syntax, is that native class fields and constructors cannot be modified.

`@tracked` properties can be overriden, because the decorator turns them into getters/setters.

There is no need to pass a `pluginId` any more. Changes are automatically rolled back as part of test cleanup 🎉
2024-06-14 14:39:23 +01:00
..
assets DEV: Introduce callback-based native class syntax for modifyClass (#27324) 2024-06-14 14:39:23 +01:00
controllers DEV: Allow fetching specific site settings and introduce a service for updating site settings (#27481) 2024-06-14 13:07:27 +03:00
helpers DEV: Remove duplicate definition of RTL locales and add Uyghur to the list (#27387) 2024-06-08 21:24:39 +02:00
jobs FIX: `Jobs::EnsureS3UploadsExistence` broken for multisite (#27401) 2024-06-10 16:26:39 +08:00
mailers FIX: correctly compute the window for email summaries 2024-05-27 22:33:51 +02:00
models FEATURE: Capture 28 day interval request stats (#27471) 2024-06-13 16:02:28 -04:00
serializers UX: Show message and chat buttons on hidden profiles (#27326) 2024-06-10 10:38:22 -03:00
services DEV: Allow fetching specific site settings and introduce a service for updating site settings (#27481) 2024-06-14 13:07:27 +03:00
views UX: Rename FAQ to Guidelines (#27451) 2024-06-13 12:09:53 -03:00