diff --git a/app/assets/javascripts/discourse/app/components/d-button.gjs b/app/assets/javascripts/discourse/app/components/d-button.gjs
index f5756a71d35..dcfd972ef9e 100644
--- a/app/assets/javascripts/discourse/app/components/d-button.gjs
+++ b/app/assets/javascripts/discourse/app/components/d-button.gjs
@@ -7,6 +7,7 @@ import { htmlSafe } from "@ember/template";
import { or } from "truth-helpers";
import GlimmerComponentWithDeprecatedParentView from "discourse/components/glimmer-component-with-deprecated-parent-view";
import concatClass from "discourse/helpers/concat-class";
+import element from "discourse/helpers/element";
import icon from "discourse-common/helpers/d-icon";
import deprecated from "discourse-common/lib/deprecated";
import { i18n } from "discourse-i18n";
@@ -161,18 +162,14 @@ export default class DButton extends GlimmerComponentWithDeprecatedParentView {
}
get wrapperElement() {
- const { href, type } = this.args;
-
- return href
- ? {{yield}}
- :
-
- ;
+ return element(this.args.href ? "a" : "button");
}
{{! template-lint-disable no-pointer-down-event-binding }}
+
+
+ {{yield}}
+
+
+;
+
+const EmptyWrapper =
+ {{! template-lint-disable no-yield-only }}
+ {{yield}}
+;
+
export default class FKField extends Component {
@tracked field;
@tracked name;
@@ -72,18 +85,9 @@ export default class FKField extends Component {
get wrapper() {
if (this.args.size) {
- return
-
-
- {{yield}}
-
-
- ;
+ return RowColWrapper;
} else {
- return
- {{! template-lint-disable no-yield-only }}
- {{yield}}
- ;
+ return EmptyWrapper;
}
}
diff --git a/app/assets/javascripts/discourse/app/helpers/plugin-outlet.gjs b/app/assets/javascripts/discourse/app/helpers/plugin-outlet.gjs
index f695a967ab2..ba0305b674f 100644
--- a/app/assets/javascripts/discourse/app/helpers/plugin-outlet.gjs
+++ b/app/assets/javascripts/discourse/app/helpers/plugin-outlet.gjs
@@ -4,6 +4,12 @@ import { connectorsExist } from "discourse/lib/plugin-connectors";
import rawRenderGlimmer from "discourse/lib/raw-render-glimmer";
import RawHandlebars from "discourse-common/lib/raw-handlebars";
+const GlimmerPluginOutletWrapper =
+ {{~! no whitespace ~}}
+
+ {{~! no whitespace ~}}
+;
+
RawHandlebars.registerHelper("plugin-outlet", function (options) {
const { name, tagName, outletArgs } = options.hash;
@@ -15,11 +21,7 @@ RawHandlebars.registerHelper("plugin-outlet", function (options) {
rawRenderGlimmer(
this,
`${tagName || "span"}.hbr-ember-outlet`,
-
- {{~! no whitespace ~}}
-
- {{~! no whitespace ~}}
- ,
+ GlimmerPluginOutletWrapper,
{ name, outletArgs }
)
);
diff --git a/app/assets/javascripts/discourse/app/raw-views/topic-bulk-select-dropdown.gjs b/app/assets/javascripts/discourse/app/raw-views/topic-bulk-select-dropdown.gjs
index 0ac85b60db3..3e1db81f25e 100644
--- a/app/assets/javascripts/discourse/app/raw-views/topic-bulk-select-dropdown.gjs
+++ b/app/assets/javascripts/discourse/app/raw-views/topic-bulk-select-dropdown.gjs
@@ -4,6 +4,16 @@ import BulkSelectTopicsDropdown from "discourse/components/bulk-select-topics-dr
import rawRenderGlimmer from "discourse/lib/raw-render-glimmer";
import { i18n } from "discourse-i18n";
+const BulkSelectGlimmerWrapper =
+
+ {{i18n "topics.bulk.selected_count" count=@data.selectedCount}}
+
+
+;
+
export default class extends EmberObject {
@service router;
@@ -20,15 +30,7 @@ export default class extends EmberObject {
return rawRenderGlimmer(
this,
"div.bulk-select-topics-dropdown",
-
-
- {{i18n "topics.bulk.selected_count" count=@data.selectedCount}}
-
-
- ,
+ BulkSelectGlimmerWrapper,
{
bulkSelectHelper: this.bulkSelectHelper,
selectedCount: this.selectedCount,
diff --git a/app/assets/javascripts/select-kit/addon/components/topic-notifications-button.gjs b/app/assets/javascripts/select-kit/addon/components/topic-notifications-button.gjs
index 3618346afc1..3395dda47b6 100644
--- a/app/assets/javascripts/select-kit/addon/components/topic-notifications-button.gjs
+++ b/app/assets/javascripts/select-kit/addon/components/topic-notifications-button.gjs
@@ -10,6 +10,11 @@ import getURL from "discourse-common/lib/get-url";
import I18n, { i18n } from "discourse-i18n";
import TopicNotificationsOptions from "select-kit/components/topic-notifications-options";
+const ParagraphWrapper = {{yield}}
;
+const EmptyWrapper =
+ {{! template-lint-disable no-yield-only}}{{yield}}
+;
+
export default class TopicNotificationsButton extends Component {
@service currentUser;
@@ -86,11 +91,9 @@ export default class TopicNotificationsButton extends Component {
get conditionalWrapper() {
if (this.args.expanded) {
- return {{yield}}
;
+ return ParagraphWrapper;
} else {
- return
- {{! template-lint-disable no-yield-only}}{{yield}}
- ;
+ return EmptyWrapper;
}
}