Skip to content

A platform for community discussion. Free, open, simple.

DEV: Drop legacy widget-related shims (#38860)

David Taylor86046da198d1
diff --git a/frontend/discourse/app/components/decorated-html.gjs b/frontend/discourse/app/components/decorated-html.gjs
index ef5070496dc..b15d9d6d81b 100644
--- a/frontend/discourse/app/components/decorated-html.gjs
+++ b/frontend/discourse/app/components/decorated-html.gjs
@@ -3,13 +3,11 @@ import { untrack } from "@glimmer/validator";
import { trackedArray } from "@ember/reactive/collections";
import { isHTMLSafe, trustHTML } from "@ember/template";
import helperFn from "discourse/helpers/helper-fn";
-import deprecated from "discourse/lib/deprecated";
import {
isProduction,
isRailsTesting,
isTesting,
} from "discourse/lib/environment";
-import { WIDGET_DECOMMISSION_OPTIONS } from "discourse/widgets/widget";
const detachedDocument = document.implementation.createHTMLDocument("detached");
@@ -242,21 +240,15 @@ class DecorateHtmlHelper {
*/
renderGlimmer(targetElement, component, data, opts = {}) {
if (!(targetElement instanceof Element)) {
- deprecated(
- "Invalid `targetElement` passed to `helper.renderGlimmer` while using `api.decorateCookedElement` with the Glimmer Post Stream. `targetElement` must be a valid HTML element. This call has been ignored to prevent errors.",
- WIDGET_DECOMMISSION_OPTIONS
+ throw new Error(
+ "Invalid `targetElement` passed to `helper.renderGlimmer`. `targetElement` must be a valid HTML element."
);
-
- return;
}
if (component.name === "factory") {
- deprecated(
- "Invalid `component` passed to `helper.renderGlimmer` while using `api.decorateCookedElement` with the Glimmer Post Stream. `component` must be a valid Glimmer component. If using a template compiled via ember-cli-htmlbars, replace it with the `<template>...</template>` syntax. This call has been ignored to prevent errors.",
- WIDGET_DECOMMISSION_OPTIONS
+ throw new Error(
+ "Invalid `component` passed to `helper.renderGlimmer`. `component` must be a valid Glimmer component. If using a template compiled via ember-cli-htmlbars, replace it with the `<template>...</template>` syntax."
);
-
- return;
}
const info = {
@@ -280,13 +272,6 @@ class DecorateHtmlHelper {
return this.model;
}
- get widget() {
- deprecated(
- "Using `helper.widget` has been decommissioned. See https://meta.discourse.org/t/372063/1",
- WIDGET_DECOMMISSION_OPTIONS
- );
- }
-
teardown() {
this.#renderGlimmerInfos.length = 0;
}
diff --git a/frontend/discourse/app/components/mount-widget.gjs b/frontend/discourse/app/components/mount-widget.gjs
deleted file mode 100644
index 7f98a7dc5cf..00000000000
--- a/frontend/discourse/app/components/mount-widget.gjs
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-/* eslint-disable ember/no-classic-components */
-import Component from "@ember/component";
-import { tagName } from "@ember-decorators/component";
-import { warnWidgetsDecommissioned } from "discourse/widgets/widget";
-
-export {
- warnWidgetsDecommissioned as addWidgetCleanCallback,
- warnWidgetsDecommissioned as removeWidgetCleanCallback,
- warnWidgetsDecommissioned as resetWidgetCleanCallbacks,
-} from "discourse/widgets/widget";
-
-@tagName("")
-export default class MountWidget extends Component {
- init() {
- super.init(...arguments);
- warnWidgetsDecommissioned();
- }
-
- <template>
- <div ...attributes>
- {{! No-op. The widget rendering system was decommissioned }}
- </div>
- </template>
-}
diff --git a/frontend/discourse/app/deprecation-workflow.js b/frontend/discourse/app/deprecation-workflow.js
index 9f8c1be38f0..cae9c15cbb4 100644
--- a/frontend/discourse/app/deprecation-workflow.js
+++ b/frontend/discourse/app/deprecation-workflow.js
@@ -321,13 +321,6 @@ const workflows = [
handler: "log",
matchId: /^discourse\.native-array-extensions\..+$/,
},
- // widget-related code should fail on all CI tests, including plugins and custom themes
- {
- handler: "throw",
- matchId: "discourse.widgets-decommissioned",
- env: "test",
- },
-
// CRITICAL DEPRECATIONS that should trigger admin warnings,
// To keep warnings meaningful and prevent overflowing users with them,
// we should only add values here after fixing core and official plugins
@@ -353,7 +346,6 @@ const workflows = [
{ handler: "notify-admin", matchId: "discourse.global.site-settings" },
{ handler: "notify-admin", matchId: "discourse.global.site" },
{ handler: "notify-admin", matchId: "discourse.global.user" },
- { handler: "notify-admin", matchId: "discourse.header-widget-overrides" },
{
handler: "notify-admin",
matchId: "discourse.icon-renderer-translatedtitle",
@@ -373,10 +365,6 @@ const workflows = [
handler: "notify-admin",
matchId: "discourse.plugin-outlet-classic-args-clash",
},
- {
- handler: "notify-admin",
- matchId: "discourse.post-stream-widget-overrides",
- },
{
handler: "notify-admin",
matchId: "discourse.post-stream.trigger-new-post",
@@ -388,8 +376,6 @@ const workflows = [
{ handler: "notify-admin", matchId: "discourse.safari-hacks-disabled" },
{ handler: "notify-admin", matchId: "discourse.user.resolved-timezone" },
{ handler: "notify-admin", matchId: "discourse.user.userOptions" },
- { handler: "notify-admin", matchId: "discourse.widgets-decommissioned" },
- { handler: "notify-admin", matchId: "discourse.widgets-end-of-life" },
{ handler: "notify-admin", matchId: "template-action" }, // removed in Ember 6.0, but we have a polyfill
// used in system specs
diff --git a/frontend/discourse/app/discourse-common-loader-shims.js b/frontend/discourse/app/discourse-common-loader-shims.js
index 156fdc77466..adbde999dc9 100644
--- a/frontend/discourse/app/discourse-common-loader-shims.js
+++ b/frontend/discourse/app/discourse-common-loader-shims.js
@@ -36,9 +36,6 @@ loaderShim("discourse-common/helpers/i18n", () =>
importSync("discourse/helpers/i18n")
);
-loaderShim("discourse-common/lib/attribute-hook", () =>
- importSync("discourse/lib/attribute-hook")
-);
loaderShim("discourse-common/lib/avatar-utils", () =>
importSync("discourse/lib/avatar-utils")
);
diff --git a/frontend/discourse/app/global-compat.js b/frontend/discourse/app/global-compat.js
index f26cafe2a74..9f6711b967a 100644
--- a/frontend/discourse/app/global-compat.js
+++ b/frontend/discourse/app/global-compat.js
@@ -1,9 +1,5 @@
import "discourse/lib/load-moment";
import jQuery from "jquery";
-import * as virtualDom from "discourse/widgets/virtual-dom";
-
-// TODO: Eliminate this global
-window.virtualDom = virtualDom;
if (!window.$) {
window.$ = window.jQuery = jQuery;
diff --git a/frontend/discourse/app/helpers/fa-icon-node.js b/frontend/discourse/app/helpers/fa-icon-node.js
deleted file mode 100644
index d7d26bb4f28..00000000000
--- a/frontend/discourse/app/helpers/fa-icon-node.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { iconNode } from "discourse/lib/icon-library";
diff --git a/frontend/discourse/app/helpers/node.js b/frontend/discourse/app/helpers/node.js
deleted file mode 100644
index f0f1f175012..00000000000
--- a/frontend/discourse/app/helpers/node.js
+++ /dev/null
@@ -1,4 +0,0 @@
-export {
- warnWidgetsDecommissioned as dateNode,
- warnWidgetsDecommissioned as numberNode,
-} from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/lib/attribute-hook.js b/frontend/discourse/app/lib/attribute-hook.js
deleted file mode 100644
index 6b0366581a6..00000000000
--- a/frontend/discourse/app/lib/attribute-hook.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { warnWidgetsDecommissioned as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/lib/icon-library.js b/frontend/discourse/app/lib/icon-library.js
index 245b81e1a63..247fbc0f6a2 100644
--- a/frontend/discourse/app/lib/icon-library.js
+++ b/frontend/discourse/app/lib/icon-library.js
@@ -1,7 +1,6 @@
import deprecated from "discourse/lib/deprecated";
import { isDevelopment } from "discourse/lib/environment";
import escape from "discourse/lib/escape";
-import { warnWidgetsDecommissioned } from "discourse/widgets/widget";
import { i18n } from "discourse-i18n";
export const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
@@ -93,15 +92,6 @@ export function iconHTML(id, params) {
return renderIcon("string", id, params);
}
-/**
- * @deprecated The widget rendering system has been decommissioned.
- * - If you need to create DOM nodes directly, use `iconElement` instead.
- * - If you need to render icons in a template, use the `{{icon}}` helper.
- */
-export function iconNode() {
- warnWidgetsDecommissioned();
-}
-
export function iconElement(id, params) {
return renderIcon("element", id, params);
}
diff --git a/frontend/discourse/app/lib/plugin-api.gjs b/frontend/discourse/app/lib/plugin-api.gjs
index 5a98b480f28..a773af25928 100644
--- a/frontend/discourse/app/lib/plugin-api.gjs
+++ b/frontend/discourse/app/lib/plugin-api.gjs
@@ -140,7 +140,6 @@ import { CUSTOM_USER_SEARCH_OPTIONS } from "discourse/select-kit/components/user
import { modifySelectKit } from "discourse/select-kit/lib/plugin-api";
import { addComposerSaveErrorCallback } from "discourse/services/composer";
import { disableDefaultKeyboardShortcuts } from "discourse/services/keyboard-shortcuts";
-import { warnWidgetsDecommissioned } from "discourse/widgets/widget";
import { addImageWrapperButton } from "discourse-markdown-it/features/image-controls";
const blockedModifications = ["component:topic-list"];
@@ -198,7 +197,6 @@ function wrapWithErrorHandler(func, messageKey) {
class _PluginApi {
constructor(container) {
this.container = container;
- this.h = warnWidgetsDecommissioned;
}
/**
@@ -694,20 +692,6 @@ class _PluginApi {
);
}
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- decorateWidget() {
- warnWidgetsDecommissioned();
- }
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- attachWidgetAction() {
- warnWidgetsDecommissioned();
- }
-
/**
* @deprecated
*
@@ -923,13 +907,6 @@ class _PluginApi {
this.addComposerToolbarPopupMenuOption(opts);
}
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- cleanupStream() {
- warnWidgetsDecommissioned();
- }
-
/**
* Called whenever the "page" changes. This allows us to set up analytics
* and other tracking.
@@ -1026,13 +1003,6 @@ class _PluginApi {
addBeforeLoadMoreNotificationsCallback(fn);
}
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- changeWidgetSetting() {
- warnWidgetsDecommissioned();
- }
-
/**
* Prevents a specific post from being cloaked during scroll.
*
@@ -1054,20 +1024,6 @@ class _PluginApi {
preventCloaking(postId, prevent);
}
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- createWidget() {
- warnWidgetsDecommissioned();
- }
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- reopenWidget() {
- warnWidgetsDecommissioned();
- }
-
/**
* Adds a pluralization to the store
*
@@ -1401,13 +1357,6 @@ class _PluginApi {
addCustomUserFieldValidationCallback(callback);
}
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- addPostTransformCallback() {
- warnWidgetsDecommissioned();
- }
-
/**
*
* Adds a new item in the navigation bar. Returns the NavItem object created.
@@ -2480,13 +2429,6 @@ class _PluginApi {
CUSTOM_USER_SEARCH_OPTIONS.push(value);
}
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- dispatchWidgetAppEvent() {
- warnWidgetsDecommissioned();
- }
-
/**
* Support for customizing the composer text. By providing a callback. Callbacks should
* return `null` or `undefined` if you don't need a customization based on the current state.
diff --git a/frontend/discourse/app/lib/transform-post.js b/frontend/discourse/app/lib/transform-post.js
deleted file mode 100644
index 6d8233e666d..00000000000
--- a/frontend/discourse/app/lib/transform-post.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export {
- warnWidgetsDecommissioned as includeAttributes,
- warnWidgetsDecommissioned as transformBasicPost,
- warnWidgetsDecommissioned as transformPost,
-} from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/loader-shims.js b/frontend/discourse/app/loader-shims.js
index a84aa8117f0..49a8616d2fc 100644
--- a/frontend/discourse/app/loader-shims.js
+++ b/frontend/discourse/app/loader-shims.js
@@ -117,7 +117,6 @@ loaderShim("truth-helpers/helpers/not", () =>
loaderShim("truth-helpers/helpers/or", () =>
importSync("truth-helpers/helpers/or")
);
-loaderShim("virtual-dom", () => importSync("discourse/widgets/virtual-dom"));
loaderShim("xss", () => importSync("xss"));
loaderShim("discourse/lib/transformer/registry", () =>
importSync("discourse/lib/registry/transformers")
diff --git a/frontend/discourse/app/widgets/avatar-flair.js b/frontend/discourse/app/widgets/avatar-flair.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/avatar-flair.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/button.js b/frontend/discourse/app/widgets/button.js
deleted file mode 100644
index 838fe632e99..00000000000
--- a/frontend/discourse/app/widgets/button.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-export const ButtonClass = {
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- buildClasses() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- buildAttributes() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _buildIcon() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- html() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- click() {},
-};
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/category-link.js b/frontend/discourse/app/widgets/category-link.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/category-link.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/component-connector.js b/frontend/discourse/app/widgets/component-connector.js
deleted file mode 100644
index a5219673647..00000000000
--- a/frontend/discourse/app/widgets/component-connector.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-import { warnWidgetsDecommissioned } from "discourse/widgets/widget";
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-export default class ComponentConnector {
- constructor() {
- warnWidgetsDecommissioned();
- }
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- init() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- destroy() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- update() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- connectComponent() {}
-}
diff --git a/frontend/discourse/app/widgets/connector.js b/frontend/discourse/app/widgets/connector.js
deleted file mode 100644
index d2ee56482aa..00000000000
--- a/frontend/discourse/app/widgets/connector.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-import { warnWidgetsDecommissioned } from "discourse/widgets/widget";
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-export default class Connector {
- constructor() {
- warnWidgetsDecommissioned();
- }
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- init() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- update() {}
-}
diff --git a/frontend/discourse/app/widgets/decorator-helper.js b/frontend/discourse/app/widgets/decorator-helper.js
deleted file mode 100644
index 6bdd1cce860..00000000000
--- a/frontend/discourse/app/widgets/decorator-helper.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-import { warnWidgetsDecommissioned } from "discourse/widgets/widget";
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-export default class DecoratorHelper {
- constructor() {
- warnWidgetsDecommissioned();
- }
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- attach() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- get model() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- getModel() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- rawHtml() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- cooked() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- connect() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- renderGlimmer() {}
-}
diff --git a/frontend/discourse/app/widgets/discourse-tags.js b/frontend/discourse/app/widgets/discourse-tags.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/discourse-tags.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/embedded-post.js b/frontend/discourse/app/widgets/embedded-post.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/embedded-post.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/emoji.js b/frontend/discourse/app/widgets/emoji.js
deleted file mode 100644
index 7536bcc02b0..00000000000
--- a/frontend/discourse/app/widgets/emoji.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export {
- warnWidgetsDecommissioned as replaceEmoji,
- DummyWidget as default,
-} from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/glue.js b/frontend/discourse/app/widgets/glue.js
deleted file mode 100644
index 577ab6dde82..00000000000
--- a/frontend/discourse/app/widgets/glue.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-import { warnWidgetsDecommissioned } from "discourse/widgets/widget";
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */ export default class WidgetGlue {
- constructor() {
- warnWidgetsDecommissioned();
- }
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- appendTo() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- queueRerender() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- rerenderWidget() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- cleanUp() {}
-}
diff --git a/frontend/discourse/app/widgets/hbs-compiler.js b/frontend/discourse/app/widgets/hbs-compiler.js
deleted file mode 100644
index 6b0366581a6..00000000000
--- a/frontend/discourse/app/widgets/hbs-compiler.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { warnWidgetsDecommissioned as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/hooks.js b/frontend/discourse/app/widgets/hooks.js
deleted file mode 100644
index 02bdac96a88..00000000000
--- a/frontend/discourse/app/widgets/hooks.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-import { warnWidgetsDecommissioned } from "discourse/widgets/widget";
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-class DummyHook {
- constructor() {
- warnWidgetsDecommissioned();
- }
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- hook() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- unhook() {}
-}
-
-export {
- DummyHook as WidgetClickHook,
- DummyHook as WidgetDoubleClickHook,
- DummyHook as WidgetClickOutsideHook,
- DummyHook as WidgetMouseDownOutsideHook,
- DummyHook as WidgetKeyUpHook,
- DummyHook as WidgetKeyDownHook,
- DummyHook as WidgetInputHook,
- DummyHook as WidgetChangeHook,
- DummyHook as WidgetMouseUpHook,
- DummyHook as WidgetMouseDownHook,
- DummyHook as WidgetMouseMoveHook,
- DummyHook as WidgetMouseOverHook,
- DummyHook as WidgetPointerOverHook,
- DummyHook as WidgetPointerOutHook,
- DummyHook as WidgetMouseOutHook,
- DummyHook as WidgetTouchEndHook,
- DummyHook as WidgetTouchStartHook,
- DummyHook as WidgetTouchMoveHook,
- DummyHook as WidgetDragHook,
-};
diff --git a/frontend/discourse/app/widgets/link.js b/frontend/discourse/app/widgets/link.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/link.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/menu-panel.js b/frontend/discourse/app/widgets/menu-panel.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/menu-panel.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/post-cooked.js b/frontend/discourse/app/widgets/post-cooked.js
deleted file mode 100644
index c2b35505b02..00000000000
--- a/frontend/discourse/app/widgets/post-cooked.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-import { warnWidgetsDecommissioned } from "discourse/widgets/widget";
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-class PostCooked {
- constructor() {
- warnWidgetsDecommissioned();
- }
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- init() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- update() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- destroy() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _decorateAndAdopt() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _applySearchHighlight() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _showLinkCounts() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- async _toggleQuote() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _urlForPostNumber() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _updateQuoteElements() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _insertQuoteControls() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _computeCooked() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _decorateMentions() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _rerenderUserStatusOnMentions() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _rerenderUsersStatusOnMentions() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _extractMentions() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _trackMentionedUserStatus() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _stopTrackingMentionedUsersStatus() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _post() {}
-}
-
-export {
- warnWidgetsDecommissioned as addDecorator,
- warnWidgetsDecommissioned as resetDecorators,
- PostCooked as default,
-};
diff --git a/frontend/discourse/app/widgets/post-edits-indicator.js b/frontend/discourse/app/widgets/post-edits-indicator.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/post-edits-indicator.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/post-gap.js b/frontend/discourse/app/widgets/post-gap.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/post-gap.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/post-links.js b/frontend/discourse/app/widgets/post-links.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/post-links.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/post-placeholder.js b/frontend/discourse/app/widgets/post-placeholder.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/post-placeholder.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/post-small-action.js b/frontend/discourse/app/widgets/post-small-action.js
deleted file mode 100644
index 57b6fd6fcb1..00000000000
--- a/frontend/discourse/app/widgets/post-small-action.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export {
- warnWidgetsDecommissioned as actionDescriptionHtml,
- warnWidgetsDecommissioned as actionDescription,
- warnWidgetsDecommissioned as addPostSmallActionIcon,
- warnWidgetsDecommissioned as addPostSmallActionClassesCallback,
- warnWidgetsDecommissioned as resetPostSmallActionClassesCallbacks,
- DummyWidget as default,
-} from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/post-stream.js b/frontend/discourse/app/widgets/post-stream.js
deleted file mode 100644
index 9c5243ea703..00000000000
--- a/frontend/discourse/app/widgets/post-stream.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export {
- warnWidgetsDecommissioned as postTransformCallbacks,
- warnWidgetsDecommissioned as addPostTransformCallback,
- warnWidgetsDecommissioned as disableCloaking,
- warnWidgetsDecommissioned as preventCloak,
- warnWidgetsDecommissioned as cloak,
- warnWidgetsDecommissioned as uncloak,
- DummyWidget as default,
-} from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/post-user-status.js b/frontend/discourse/app/widgets/post-user-status.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/post-user-status.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/post.js b/frontend/discourse/app/widgets/post.js
deleted file mode 100644
index 35d56391075..00000000000
--- a/frontend/discourse/app/widgets/post.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export {
- warnWidgetsDecommissioned as avatarImg,
- warnWidgetsDecommissioned as avatarFor,
- warnWidgetsDecommissioned as addPostClassesCallback,
- warnWidgetsDecommissioned as resetPostClassesCallback,
- DummyWidget as default,
-} from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/poster-name.js b/frontend/discourse/app/widgets/poster-name.js
deleted file mode 100644
index 7ccd8e05d88..00000000000
--- a/frontend/discourse/app/widgets/poster-name.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export {
- warnWidgetsDecommissioned as disableNameSuppression,
- DummyWidget as default,
-} from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/raw-html.js b/frontend/discourse/app/widgets/raw-html.js
deleted file mode 100644
index 2b54b5d4b67..00000000000
--- a/frontend/discourse/app/widgets/raw-html.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-import { warnWidgetsDecommissioned } from "discourse/widgets/widget";
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-export default class RawHtml {
- constructor() {
- warnWidgetsDecommissioned();
- }
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- init() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- decorate() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- update() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- destroy() {}
-}
diff --git a/frontend/discourse/app/widgets/render-glimmer.js b/frontend/discourse/app/widgets/render-glimmer.js
deleted file mode 100644
index a9b5d83270b..00000000000
--- a/frontend/discourse/app/widgets/render-glimmer.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-import { warnWidgetsDecommissioned } from "discourse/widgets/widget";
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-export default class RenderGlimmer {
- constructor() {
- warnWidgetsDecommissioned();
- }
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- init() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- destroy() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- update() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- connectComponent() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- updateElementAttrs() {}
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- get parentMountWidgetComponent() {}
-}
-
-export { createWidgetFrom as registerWidgetShim } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/topic-post-visited-line.js b/frontend/discourse/app/widgets/topic-post-visited-line.js
deleted file mode 100644
index 9d410856b6e..00000000000
--- a/frontend/discourse/app/widgets/topic-post-visited-line.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/virtual-dom.js b/frontend/discourse/app/widgets/virtual-dom.js
deleted file mode 100644
index c916e7ce3cd..00000000000
--- a/frontend/discourse/app/widgets/virtual-dom.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-/**
- * This is a shim used to prevent breaking imports from "virtual-dom"
- */
-export {
- warnWidgetsDecommissioned as create,
- warnWidgetsDecommissioned as h,
-} from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/widget-dropdown.js b/frontend/discourse/app/widgets/widget-dropdown.js
deleted file mode 100644
index e9c9d5ef76f..00000000000
--- a/frontend/discourse/app/widgets/widget-dropdown.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-export const WidgetDropdownHeaderClass = {
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- transform() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- buildAttributes() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- buildClasses() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- click() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _buildLabel() {},
-};
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-export const WidgetDropdownItemClass = {
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- transform() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- buildAttributes() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- buildClasses() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- keyDown() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- click() {},
-};
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-export const WidgetDropdownBodyClass = {
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- buildClasses() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- clickOutside() {},
-};
-
-/**
- * This class is kept only for backward compatibility.
- *
- * @deprecated This class is part of the decommissioned widget system and should not be used anymore.
- */
-export const WidgetDropdownClass = {
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- init() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- buildKey() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- buildAttributes() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- defaultState() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- buildClasses() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- transform() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- hideBody() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _onChange() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- destroy() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- willRerenderWidget() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- didRenderWidget() {},
-
- /**
- * @deprecated the widget rendering system was decommissioned
- */
- _onTrigger() {},
-};
-
-export { DummyWidget as default } from "discourse/widgets/widget";
diff --git a/frontend/discourse/app/widgets/widget.js b/frontend/discourse/app/widgets/widget.js
deleted file mode 100644
index ceec58fff3b..00000000000
--- a/frontend/discourse/app/widgets/widget.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * IMPORTANT: The widget rendering system has been decommissioned.
- *
- * This file is maintained only to prevent breaking imports in existing third-party customizations.
- * New code should not use this component or the widget system.
- */
-
-import deprecated from "discourse/lib/deprecated";
-import { consolePrefix } from "discourse/lib/source-identifier";
-
-export const WIDGET_DEPRECATION_OPTIONS = {
- since: "v3.5.0.beta8-dev",
- id: "discourse.widgets-end-of-life",
- url: "https://meta.discourse.org/t/375332/1",
-};
-
-export const POST_STREAM_DEPRECATION_OPTIONS = {
- since: "v3.5.0.beta1-dev",
- id: "discourse.post-stream-widget-overrides",
- url: "https://meta.discourse.org/t/372063/1",
-};
-
-export const WIDGET_DECOMMISSION_OPTIONS = {
- since: "v3.6.0.beta3-latest",
- id: "discourse.widgets-decommissioned",
- url: "https://meta.discourse.org/t/375332/1",
-};
-
-function warnWidgetsDecommissioned() {
- deprecated(
- `"The widget rendering system has been decommissioned and all related components and APIs are no-longer operational.`,
- WIDGET_DECOMMISSION_OPTIONS
- );
-}
-
-class DummyWidget {
- constructor() {
- // skip if the constructor is run in core code
- // some fake widgets are still instantiated to prevent breaking imports
- if (consolePrefix()) {
- warnWidgetsDecommissioned();
- }
- }
-}
-
-function dummyCreateWidgetFrom() {
- return DummyWidget;
-}
-
-export {
- warnWidgetsDecommissioned,
- warnWidgetsDecommissioned as warnWidgetsDeprecation,
- warnWidgetsDecommissioned as queryRegistry,
- warnWidgetsDecommissioned as deleteFromRegistry,
- warnWidgetsDecommissioned as decorateWidget,
- warnWidgetsDecommissioned as traverseCustomWidgets,
- warnWidgetsDecommissioned as applyDecorators,
- warnWidgetsDecommissioned as resetDecorators,
- warnWidgetsDecommissioned as changeSetting,
- dummyCreateWidgetFrom as createWidgetFrom,
- dummyCreateWidgetFrom as createWidget,
- warnWidgetsDecommissioned as reopenWidget,
- DummyWidget,
- DummyWidget as default,
-};
diff --git a/frontend/discourse/tests/integration/components/decorated-html-test.gjs b/frontend/discourse/tests/integration/components/decorated-html-test.gjs
index 83533a79caa..d9d189c726d 100644
--- a/frontend/discourse/tests/integration/components/decorated-html-test.gjs
+++ b/frontend/discourse/tests/integration/components/decorated-html-test.gjs
@@ -2,15 +2,12 @@ import { tracked } from "@glimmer/tracking";
import { getOwner } from "@ember/owner";
import { trustHTML } from "@ember/template";
import { render, settled } from "@ember/test-helpers";
-import { hbs } from "ember-cli-htmlbars";
import curryComponent from "ember-curry-component";
import { module, test } from "qunit";
import DecoratedHtml, {
registerHtmlDecorator,
} from "discourse/components/decorated-html";
-import { withSilencedDeprecations } from "discourse/lib/deprecated";
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
-import { WIDGET_DECOMMISSION_OPTIONS } from "discourse/widgets/widget";
module("Integration | Component | <DecoratedHtml />", function (hooks) {
setupRenderingTest(hooks);
@@ -86,90 +83,6 @@ module("Integration | Component | <DecoratedHtml />", function (hooks) {
assert.dom("#render-glimmer").hasText("Hello from Curried Component");
});
- test("renderGlimmer is ignored if receives invalid arguments", async function (assert) {
- const state = new (class {
- @tracked html = trustHTML("<h1>Initial</h1>");
- })();
-
- const decorateWithStringTarget = (element, helper) => {
- element.innerHTML += "<div id='appended'>Appended</div>";
-
- withSilencedDeprecations(WIDGET_DECOMMISSION_OPTIONS.id, () => {
- helper.renderGlimmer(
- "div",
- <template>
- <div id="render-glimmer">Hello from Glimmer Component</div>
- </template>
- );
- });
- };
-
- await render(
- <template>
- <DecoratedHtml
- @html={{state.html}}
- @decorate={{decorateWithStringTarget}}
- />
- </template>
- );
-
- assert
- .dom("h1")
- .hasText(
- "Initial",
- "Initial content is rendered when a string is passed as the target element"
- );
- assert
- .dom("#appended")
- .hasText(
- "Appended",
- "Appended content is rendered when a string is passed as the target element"
- );
- assert
- .dom("#render-glimmer")
- .doesNotExist(
- "Glimmer component is not rendered when a string is passed as the target element"
- );
-
- const decorateWithHbsTemplate = (element, helper) => {
- element.innerHTML += "<div id='appended'>Appended</div>";
-
- withSilencedDeprecations(WIDGET_DECOMMISSION_OPTIONS.id, () => {
- helper.renderGlimmer(
- element,
- hbs("<div id='render-glimmer'>Hello from Glimmer Component</div>")
- );
- });
- };
-
- await render(
- <template>
- <DecoratedHtml
- @html={{state.html}}
- @decorate={{decorateWithHbsTemplate}}
- />
- </template>
- );
-
- assert
- .dom("h1")
- .hasText(
- "Initial",
- "Initial content is rendered when a template is passed as the component"
- );
- assert
- .dom("#appended")
- .hasText(
- "Appended",
- "Appended content is rendered when a template is passed as the component"
- );
- assert
- .dom("#render-glimmer")
- .doesNotExist(
- "Glimmer component is not rendered when a template is passed as the component"
- );
- });
-
test("applies registered HTML decorators by default", async function (assert) {
let decoratorCalled = false;
registerHtmlDecorator((element) => {