mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 05:42:41 +08:00
DEV: Add deprecations for topic-status raw-view modifications (#30496)
This will make the 'auto' glimmer-topic-list feature aware of these modifications, so that the new topic-list will not be enabled until they're resolved.
This commit is contained in:
parent
9c83872a4e
commit
bf35f7f860
|
@ -302,10 +302,11 @@ class PluginApi {
|
|||
modifyClass(resolverName, changes, opts) {
|
||||
if (
|
||||
resolverName === "component:topic-list" ||
|
||||
resolverName === "component:topic-list-item"
|
||||
resolverName === "component:topic-list-item" ||
|
||||
resolverName === "raw-view:topic-status"
|
||||
) {
|
||||
deprecated(
|
||||
"Modifying topic-list and topic-list-item with `modifyClass` is deprecated. Use the value transformer `topic-list-columns` and other new topic-list plugin APIs instead.",
|
||||
`Modifying '${resolverName}' with 'modifyClass' is deprecated. Use the value transformer 'topic-list-columns' and other new topic-list plugin APIs instead.`,
|
||||
{
|
||||
since: "v3.4.0.beta3-dev",
|
||||
id: "discourse.hbr-topic-list-overrides",
|
||||
|
@ -352,10 +353,11 @@ class PluginApi {
|
|||
modifyClassStatic(resolverName, changes, opts) {
|
||||
if (
|
||||
resolverName === "component:topic-list" ||
|
||||
resolverName === "component:topic-list-item"
|
||||
resolverName === "component:topic-list-item" ||
|
||||
resolverName === "raw-view:topic-status"
|
||||
) {
|
||||
deprecated(
|
||||
"Modifying topic-list and topic-list-item with `modifyClassStatic` is deprecated. Use the value transformer `topic-list-columns` and other new topic-list plugin APIs instead.",
|
||||
`Modifying '${resolverName}' with 'modifyClass' is deprecated. Use the value transformer 'topic-list-columns' and other new topic-list plugin APIs instead.`,
|
||||
{
|
||||
since: "v3.4.0.beta3-dev",
|
||||
id: "discourse.hbr-topic-list-overrides",
|
||||
|
|
|
@ -1,8 +1,33 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
export default class TopicStatus extends EmberObject {
|
||||
static reopen() {
|
||||
deprecated(
|
||||
"Modifying raw-view:topic-status with `reopen` is deprecated. Use the value transformer `topic-list-columns` and other new topic-list plugin APIs instead.",
|
||||
{
|
||||
since: "v3.4.0.beta3-dev",
|
||||
id: "discourse.hbr-topic-list-overrides",
|
||||
}
|
||||
);
|
||||
|
||||
return super.reopen(...arguments);
|
||||
}
|
||||
|
||||
static reopenClass() {
|
||||
deprecated(
|
||||
"Modifying raw-view:topic-status with `reopenClass` is deprecated. Use the value transformer `topic-list-columns` and other new topic-list plugin APIs instead.",
|
||||
{
|
||||
since: "v3.4.0.beta3-dev",
|
||||
id: "discourse.hbr-topic-list-overrides",
|
||||
}
|
||||
);
|
||||
|
||||
return super.reopenClass(...arguments);
|
||||
}
|
||||
|
||||
showDefault = null;
|
||||
|
||||
@discourseComputed("defaultIcon")
|
||||
|
|
Loading…
Reference in New Issue
Block a user