A platform for community discussion. Free, open, simple.
UX: Update share icon (#40999)
Bryce Huhtala168d8990c965
diff --git a/frontend/discourse/app/components/post/menu/buttons/copy-link.gjs b/frontend/discourse/app/components/post/menu/buttons/copy-link.gjsindex 1750790e617..e7ec8392810 100644--- a/frontend/discourse/app/components/post/menu/buttons/copy-link.gjs+++ b/frontend/discourse/app/components/post/menu/buttons/copy-link.gjs@@ -5,7 +5,7 @@ const PostMenuCopyLinkButton = <template>class="post-action-menu__copy-link"...attributes@action={{@buttonActions.copyLink}}- @icon="d-post-share"+ @icon="link"@label={{if @showLabel "post.controls.copy_action"}}@title="post.controls.copy_title"@ariaLabel="post.controls.copy_title"diff --git a/frontend/discourse/app/lib/icon-library.js b/frontend/discourse/app/lib/icon-library.jsindex 247fbc0f6a2..3f3c93d6d0b 100644--- a/frontend/discourse/app/lib/icon-library.js+++ b/frontend/discourse/app/lib/icon-library.js@@ -19,8 +19,8 @@ export const REPLACEMENTS = {"d-drop-collapsed": "angle-right","d-unliked": "far-heart","d-liked": "heart",- "d-post-share": "link",- "d-topic-share": "link",+ "d-post-share": "arrow-up-from-bracket",+ "d-topic-share": "arrow-up-from-bracket","notification.mentioned": "at","notification.group_mentioned": "users","notification.quoted": "quote-right",diff --git a/frontend/discourse/tests/acceptance/share-topic-test.js b/frontend/discourse/tests/acceptance/share-topic-test.jsindex 88a703f45f6..786a6c8aa4a 100644--- a/frontend/discourse/tests/acceptance/share-topic-test.js+++ b/frontend/discourse/tests/acceptance/share-topic-test.js@@ -28,6 +28,12 @@ acceptance("Share and Invite modal", function (needs) {.dom("#topic-footer-button-share-and-invite").exists("the button exists");+ assert+ .dom(+ "#topic-footer-button-share-and-invite svg.d-icon-d-topic-share use[href='#arrow-up-from-bracket']"+ )+ .exists("the button uses the share icon");+await click("#topic-footer-button-share-and-invite");assert.dom(".share-topic-modal").exists("shows the modal");diff --git a/frontend/discourse/tests/unit/components/post-menu-test.gjs b/frontend/discourse/tests/unit/components/post-menu-test.gjsindex a1aff104901..e050272db0a 100644--- a/frontend/discourse/tests/unit/components/post-menu-test.gjs+++ b/frontend/discourse/tests/unit/components/post-menu-test.gjs@@ -106,6 +106,22 @@ module("Unit | Component | PostMenu", function (hooks) {);});+ test("share and copy link buttons use distinct icons", async function (assert) {+ const post = this.post;++ await render(<template><PostMenu @post={{post}} /></template>);++ assert+ .dom(+ ".post-action-menu__share svg.d-icon-d-post-share use[href='#arrow-up-from-bracket']"+ )+ .exists("share uses the share icon");++ assert+ .dom(".post-action-menu__copy-link svg.d-icon-link use[href='#link']")+ .exists("copy link uses the link icon");+ });+test("show more does not request who liked the post", async function (assert) {this.siteSettings.post_menu_hidden_items = "bookmark|copyLink";diff --git a/lib/svg_sprite.rb b/lib/svg_sprite.rbindex 9e20499c14c..d87edc730e5 100644--- a/lib/svg_sprite.rb+++ b/lib/svg_sprite.rb@@ -22,6 +22,7 @@ module SvgSpritearrow-rotate-leftarrow-rotate-rightarrow-up+ arrow-up-from-bracketarrows-rotateasteriskat