From 9f52997be166a0c14d082274a2da5eff541435a2 Mon Sep 17 00:00:00 2001 From: Kris Date: Thu, 23 Apr 2020 17:23:25 -0400 Subject: [PATCH] UX: Let's try X for the closed topic icon instead of a \ --- .../discourse/app/components/topic-status.js | 6 +++--- .../app/controllers/topic-bulk-actions.js | 2 +- .../discourse/app/helpers/topic-status-icons.js | 6 +++--- .../discourse/app/raw-views/topic-status.js | 6 +++--- .../discourse/app/widgets/post-small-action.js | 4 ++-- .../discourse/app/widgets/topic-admin-menu.js | 2 +- lib/svg_sprite/svg_sprite.rb | 2 +- test/javascripts/widgets/topic-status-test.js | 2 +- .../assets/svg-icons/discourse-additional.svg | 17 +++++++++-------- 9 files changed, 24 insertions(+), 23 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/topic-status.js b/app/assets/javascripts/discourse/app/components/topic-status.js index 19f16b3ca36..404ab913d0b 100644 --- a/app/assets/javascripts/discourse/app/components/topic-status.js +++ b/app/assets/javascripts/discourse/app/components/topic-status.js @@ -25,7 +25,7 @@ export default Component.extend({ if (closed && archived) { this._set( "closedArchived", - "discourse-comment-slash", + "discourse-comment-close", "locked_and_archived" ); this._reset("closed"); @@ -34,10 +34,10 @@ export default Component.extend({ } else { this._reset("closedArchived"); closed - ? this._set("closed", "discourse-comment-slash", "locked") + ? this._set("closed", "discourse-comment-close", "locked") : this._reset("closed"); archived - ? this._set("archived", "discourse-comment-slash", "archived") + ? this._set("archived", "discourse-comment-close", "archived") : this._reset("archived"); return false; } diff --git a/app/assets/javascripts/discourse/app/controllers/topic-bulk-actions.js b/app/assets/javascripts/discourse/app/controllers/topic-bulk-actions.js index d8416436b55..7cc2a9652a9 100644 --- a/app/assets/javascripts/discourse/app/controllers/topic-bulk-actions.js +++ b/app/assets/javascripts/discourse/app/controllers/topic-bulk-actions.js @@ -30,7 +30,7 @@ addBulkButton("showChangeCategory", "change_category", { class: "btn-default" }); addBulkButton("closeTopics", "close_topics", { - icon: "discourse-comment-slash", + icon: "discourse-comment-close", class: "btn-default" }); addBulkButton("archiveTopics", "archive_topics", { diff --git a/app/assets/javascripts/discourse/app/helpers/topic-status-icons.js b/app/assets/javascripts/discourse/app/helpers/topic-status-icons.js index a1776e4f6f2..316b5270927 100644 --- a/app/assets/javascripts/discourse/app/helpers/topic-status-icons.js +++ b/app/assets/javascripts/discourse/app/helpers/topic-status-icons.js @@ -10,10 +10,10 @@ export default ArrayProxy.extend({ }; if (topic.get("closed") && topic.get("archived")) { - renderIcon("discourse-comment-slash", "locked_and_archived"); + renderIcon("discourse-comment-close", "locked_and_archived"); } else { - renderIconIf("closed", "discourse-comment-slash", "locked"); - renderIconIf("archived", "discourse-comment-slash", "archived"); + renderIconIf("closed", "discourse-comment-close", "locked"); + renderIconIf("archived", "discourse-comment-close", "archived"); } this.forEach(args => renderIconIf(...args)); diff --git a/app/assets/javascripts/discourse/app/raw-views/topic-status.js b/app/assets/javascripts/discourse/app/raw-views/topic-status.js index ba8bf335113..25d50c2b167 100644 --- a/app/assets/javascripts/discourse/app/raw-views/topic-status.js +++ b/app/assets/javascripts/discourse/app/raw-views/topic-status.js @@ -39,13 +39,13 @@ export default EmberObject.extend({ if (topic.get("closed") && topic.get("archived")) { results.push({ - icon: "discourse-comment-slash", + icon: "discourse-comment-close", key: "locked_and_archived" }); } else if (topic.get("closed")) { - results.push({ icon: "discourse-comment-slash", key: "locked" }); + results.push({ icon: "discourse-comment-close", key: "locked" }); } else if (topic.get("archived")) { - results.push({ icon: "discourse-comment-slash", key: "archived" }); + results.push({ icon: "discourse-comment-close", key: "archived" }); } if (topic.get("pinned")) { diff --git a/app/assets/javascripts/discourse/app/widgets/post-small-action.js b/app/assets/javascripts/discourse/app/widgets/post-small-action.js index b456d3d0395..7f02cb07034 100644 --- a/app/assets/javascripts/discourse/app/widgets/post-small-action.js +++ b/app/assets/javascripts/discourse/app/widgets/post-small-action.js @@ -32,9 +32,9 @@ export function actionDescription(actionCode, createdAt, username) { } const icons = { - "closed.enabled": "discourse-comment-slash", + "closed.enabled": "discourse-comment-close", "closed.disabled": "discourse-comment-plus", - "autoclosed.enabled": "discourse-comment-slash", + "autoclosed.enabled": "discourse-comment-close", "autoclosed.disabled": "discourse-comment-plus", "archived.enabled": "folder", "archived.disabled": "folder-open", diff --git a/app/assets/javascripts/discourse/app/widgets/topic-admin-menu.js b/app/assets/javascripts/discourse/app/widgets/topic-admin-menu.js index 904269d5ba3..ced88e467a6 100644 --- a/app/assets/javascripts/discourse/app/widgets/topic-admin-menu.js +++ b/app/assets/javascripts/discourse/app/widgets/topic-admin-menu.js @@ -173,7 +173,7 @@ export default createWidget("topic-admin-menu", { className: "topic-admin-close", buttonClass: "btn-default", action: "toggleClosed", - icon: "discourse-comment-slash", + icon: "discourse-comment-close", label: "actions.close" }); } diff --git a/lib/svg_sprite/svg_sprite.rb b/lib/svg_sprite/svg_sprite.rb index d28044c96a7..19a64fd332c 100644 --- a/lib/svg_sprite/svg_sprite.rb +++ b/lib/svg_sprite/svg_sprite.rb @@ -64,7 +64,7 @@ module SvgSprite "discourse-compress", "discourse-comment", "discourse-comment-plus", - "discourse-comment-slash", + "discourse-comment-close", "discourse-expand", "download", "ellipsis-h", diff --git a/test/javascripts/widgets/topic-status-test.js b/test/javascripts/widgets/topic-status-test.js index 5cc6f9d4372..66ccf6199c2 100644 --- a/test/javascripts/widgets/topic-status-test.js +++ b/test/javascripts/widgets/topic-status-test.js @@ -12,7 +12,7 @@ widgetTest("basics", { }); }, test(assert) { - assert.ok(find(".topic-status .d-icon-discourse-comment-slash").length); + assert.ok(find(".topic-status .d-icon-discourse-comment-close").length); } }); diff --git a/vendor/assets/svg-icons/discourse-additional.svg b/vendor/assets/svg-icons/discourse-additional.svg index e1d9f8dbf3b..066a93c4f7d 100644 --- a/vendor/assets/svg-icons/discourse-additional.svg +++ b/vendor/assets/svg-icons/discourse-additional.svg @@ -27,17 +27,18 @@ Additional SVG icons - - - - - + - - + + - + + + + + +