discourse/app/assets/javascripts/admin/addon
Godfrey Chan 82506096b7
DEV: remove trivial {{action}} usages (#24278)
This removes all trivial usages of the `{{action}}` keyword (the helper form, not the modifier form), where trivial means:

1. It's a co-located component (`.hbs` next to `.js`)
2. The JS file has a default export that is native class
3. `{{action "foo"}}` or `(action "foo")` with no extra arguments
4. There is a corresponding `foo()` method defined on the class (not inherited, etc)

There are more usages that is slightly more involved (with arguments, etc) that we can deal with, but this PR seems big enough so I just included the easiest cases here.

To aid review, each file is converted in an individual commit, and the matching method is temporary annotated with `@__action__` instead of the normal `@action`. This forces a git diff when it is already annotated as `@action`.

* DEV: {{action}} -> @action admin-penalty-post-action.hbs
* DEV: {{action}} -> @action admin-report.hbs
* DEV: {{action}} -> @action admin-watched-word.hbs
* DEV: {{action}} -> @action emoji-value-list.hbs
* DEV: {{action}} -> @action bool.hbs
* DEV: {{action}} -> @action category.hbs
* DEV: {{action}} -> @action secret-value-list.hbs
* DEV: {{action}} -> @action category-list.hbs
* DEV: {{action}} -> @action color.hbs
* DEV: {{action}} -> @action compact-list.hbs
* DEV: {{action}} -> @action group-list.hbs
* DEV: {{action}} -> @action host-list.hbs
* DEV: {{action}} -> @action named-list.hbs
* DEV: {{action}} -> @action simple-list.hbs
* DEV: {{action}} -> @action tag-group-list.hbs
* DEV: {{action}} -> @action tag-list.hbs
* DEV: {{action}} -> @action value-list.hbs
* DEV: {{action}} -> @action watched-word-form.hbs
* DEV: {{action}} -> @action composer-messages.hbs
* DEV: {{action}} -> @action section.hbs
* DEV: {{action}} -> @action user-status-picker.hbs
* DEV: cleanup @__action__ -> @action
2023-11-08 10:53:06 +01:00
..
adapters DEV: Migrate remaining admin classes to native syntax (#20717) 2023-03-17 12:25:05 +00:00
components DEV: remove trivial {{action}} usages (#24278) 2023-11-08 10:53:06 +01:00
controllers FEATURE: Add keywords support for site_settings search (#24146) 2023-10-27 15:42:57 -06:00
helpers DEV: replace registerUnbound usage with default exports (#23802) 2023-10-19 14:28:25 +01:00
lib DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
mixins DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
models DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
routes FEATURE: Add theme-components route for admin (#24264) 2023-11-08 13:42:27 +10:00
services DEV: Automatically generate all admin links for app for new sidebar (#24175) 2023-11-02 10:34:37 +10:00
templates DEV: add PluginOutlet around the Customize > Themes tab (#24280) 2023-11-07 16:48:30 -05:00