discourse/plugins/discourse-lti/assets/javascripts
Sérgio Saquetim a2e64d4b45
DEV: Replace discourseComputed with @computed across the codebase (#36840)
Migrates all uses of the legacy `@discourseComputed` decorator from
`discourse/lib/decorators` to the standard `@computed` from
`@ember/object` across ~250 files in core, admin, select-kit, and
several plugins.

`discourseComputed` was a Discourse-specific wrapper that passed
dependent property values as function arguments. The modern `@computed`
pattern instead uses a native getter with explicit `this.propertyName`
access, which is more readable, easier to type-check, and consistent
with standard Ember idioms. The bulk of the migration was performed
using the ESLint `discourse/no-discourse-computed` auto-fix rule
(introduced via `@discourse/lint-configs` 2.41.0); edge cases that could
not be auto-fixed — spread operators, nested block reassignments, calls
through `BufferedProxy` — were converted manually.

- **Core migration**: `@discourseComputed('a', 'b') method(a, b) {}` →
`@computed('a', 'b') get method() { return this.a ... }`
- **Deprecation**: `discourseComputedDecorator` in
`discourse/lib/decorators` is now marked `@deprecated`, pointing to
`@computed` or `@tracked` + native getters as replacements
- **BufferedProxy compatibility**: Properties backed by `BufferedProxy`
keep `this.get("buffered.X")` rather than optional chaining, with TODOs
marking spots to revisit once reactive proxy support is available
- **Comment cleanup**: Remaining inline references to
`discourseComputed` in code comments were updated to reflect the new
terminology
- **Plugins covered**: `discourse-ads`, `discourse-assign`,
`discourse-cakeday`, `discourse-gamification`, `discourse-local-dates`,
`discourse-patreon`, `discourse-subscriptions`, `poll`, `styleguide`
2026-03-02 17:55:24 -03:00
..
discourse/initializers UX: add admin sidebar icons for preinstalled plugins (#36764) 2025-12-18 16:39:00 -05:00
discourse-lti/api-initializers DEV: Replace discourseComputed with @computed across the codebase (#36840) 2026-03-02 17:55:24 -03:00