mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-22 13:03:05 +08:00
For historical reasons, Discourse has a customized Ember resolver. This had a much more fuzzy implementation of 'normalize' and 'findTemplate' functions. This leniency meant that our file naming hasn't always matched Ember conventions. Standardizing our naming will make things easier to understand for developers, and will make adoption of newer ecosystem tooling easier (e.g. route-based bundle splitting in Embroider/vite) This commit adds deprecations to the resolver when this leniency is used, and uses a fully bespoke codemod to rename all of the affected routes/controllers/templates in the Discourse core repository. Backwards-compatibility is maintained for anyone looking up the old names in the resolver.
27 lines
647 B
JavaScript
Vendored
27 lines
647 B
JavaScript
Vendored
import Controller from "@ember/controller";
|
|
import { action } from "@ember/object";
|
|
import discourseDebounce from "discourse/lib/debounce";
|
|
import { INPUT_DELAY } from "discourse/lib/environment";
|
|
|
|
export default class AdminGroupsIndexController extends Controller {
|
|
queryParams = ["order", "asc", "filter", "type"];
|
|
order = null;
|
|
asc = null;
|
|
filter = "";
|
|
type = null;
|
|
groups = null;
|
|
|
|
@action
|
|
onTypeChanged(type) {
|
|
this.set("type", type);
|
|
}
|
|
|
|
@action
|
|
onFilterChanged(filter) {
|
|
discourseDebounce(this, this._debouncedFilter, filter, INPUT_DELAY);
|
|
}
|
|
|
|
_debouncedFilter(filter) {
|
|
this.set("filter", filter);
|
|
}
|
|
}
|