Skip to content

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

UX: move Quote whole post from main toolbar to more menu (#33366)

Renato Atilio20f5b3f75443
diff --git a/app/assets/javascripts/discourse/app/components/composer-editor.gjs b/app/assets/javascripts/discourse/app/components/composer-editor.gjs
index d3748f32a85..069622c1928 100644
--- a/app/assets/javascripts/discourse/app/components/composer-editor.gjs
+++ b/app/assets/javascripts/discourse/app/components/composer-editor.gjs
@@ -898,15 +898,6 @@ export default class ComposerEditor extends Component {
@action
extraButtons(toolbar) {
- toolbar.addButton({
- id: "quote",
- group: "fontStyles",
- icon: "far-comment",
- sendAction: this.composer.importQuote,
- title: "composer.quote_post_title",
- unshift: true,
- });
-
if (
this.composer.allowUpload &&
this.composer.uploadIcon &&
diff --git a/app/assets/javascripts/discourse/app/services/composer.js b/app/assets/javascripts/discourse/app/services/composer.js
index 84d2ecc1b58..26fd1af21c6 100644
--- a/app/assets/javascripts/discourse/app/services/composer.js
+++ b/app/assets/javascripts/discourse/app/services/composer.js
@@ -413,6 +413,15 @@ export default class ComposerService extends Service {
if (composeState === "open" || composeState === "fullscreen") {
const options = [];
+ options.push(
+ this._setupPopupMenuOption({
+ name: "quote",
+ action: this.importQuote,
+ icon: "far-comment",
+ label: "composer.quote_post_title",
+ })
+ );
+
options.push(
this._setupPopupMenuOption({
name: "toggle-invisible",
diff --git a/app/assets/javascripts/discourse/tests/integration/components/composer-editor-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/composer-editor-test.gjs
index c2beb339da2..ecbbc001a67 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/composer-editor-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/composer-editor-test.gjs
@@ -51,10 +51,4 @@ module("Integration | Component | ComposerEditor", function (hooks) {
await fillIn(".d-editor-input", `"><svg onload="prompt(/xss/)"></svg>`);
assert.dom(".d-editor-preview").hasHtml('<p>"&gt;<svg></svg></p>');
});
-
- test("has a toolbar button to quote a post", async function (assert) {
- await render(<template><ComposerEditor /></template>);
-
- assert.dom(".d-editor-button-bar .btn.quote").exists();
- });
});