DEV: add deprecation ids for base-url, fa-icon and chat service (#27911)

This commit is contained in:
Kelv 2024-07-15 14:29:17 +08:00 committed by GitHub
parent 97e2b353f6
commit 98cbfd598c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View File

@ -5,6 +5,8 @@ import { registerRawHelper } from "discourse-common/lib/helpers";
registerRawHelper("base-url", baseUrl);
export default function baseUrl() {
deprecated("Use `{{base-path}}` instead of `{{base-url}}`");
deprecated("Use `{{base-path}}` instead of `{{base-url}}`", {
id: "discourse.base-url",
});
return getUrl("");
}

View File

@ -9,6 +9,8 @@ export function iconHTML(id, params) {
registerRawHelper("fa-icon", faIcon);
export default function faIcon(icon, params) {
deprecated("Use `{{d-icon}}` instead of `{{fa-icon}}");
deprecated("Use `{{d-icon}}` instead of `{{fa-icon}}", {
id: "discourse.fa-icon",
});
return htmlSafe(iconHTML(icon, params));
}

View File

@ -391,7 +391,8 @@ export default class Chat extends Service {
addToolbarButton() {
deprecated(
"Use the new chat API `api.registerChatComposerButton` instead of `chat.addToolbarButton`"
"Use the new chat API `api.registerChatComposerButton` instead of `chat.addToolbarButton`",
{ id: "discourse.chat.addToolbarButton" }
);
}