mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 05:32: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) {
|
modifyClass(resolverName, changes, opts) {
|
||||||
if (
|
if (
|
||||||
resolverName === "component:topic-list" ||
|
resolverName === "component:topic-list" ||
|
||||||
resolverName === "component:topic-list-item"
|
resolverName === "component:topic-list-item" ||
|
||||||
|
resolverName === "raw-view:topic-status"
|
||||||
) {
|
) {
|
||||||
deprecated(
|
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",
|
since: "v3.4.0.beta3-dev",
|
||||||
id: "discourse.hbr-topic-list-overrides",
|
id: "discourse.hbr-topic-list-overrides",
|
||||||
|
@ -352,10 +353,11 @@ class PluginApi {
|
||||||
modifyClassStatic(resolverName, changes, opts) {
|
modifyClassStatic(resolverName, changes, opts) {
|
||||||
if (
|
if (
|
||||||
resolverName === "component:topic-list" ||
|
resolverName === "component:topic-list" ||
|
||||||
resolverName === "component:topic-list-item"
|
resolverName === "component:topic-list-item" ||
|
||||||
|
resolverName === "raw-view:topic-status"
|
||||||
) {
|
) {
|
||||||
deprecated(
|
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",
|
since: "v3.4.0.beta3-dev",
|
||||||
id: "discourse.hbr-topic-list-overrides",
|
id: "discourse.hbr-topic-list-overrides",
|
||||||
|
|
|
@ -1,8 +1,33 @@
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
|
import deprecated from "discourse-common/lib/deprecated";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import { i18n } from "discourse-i18n";
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
export default class TopicStatus extends EmberObject {
|
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;
|
showDefault = null;
|
||||||
|
|
||||||
@discourseComputed("defaultIcon")
|
@discourseComputed("defaultIcon")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user