UX: Let's try X for the closed topic icon instead of a \

This commit is contained in:
Kris 2020-04-23 17:23:25 -04:00
parent b19d50f355
commit 9f52997be1
9 changed files with 24 additions and 23 deletions

View File

@ -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;
}

View File

@ -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", {

View File

@ -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));

View File

@ -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")) {

View File

@ -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",

View File

@ -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"
});
}

View File

@ -64,7 +64,7 @@ module SvgSprite
"discourse-compress",
"discourse-comment",
"discourse-comment-plus",
"discourse-comment-slash",
"discourse-comment-close",
"discourse-expand",
"download",
"ellipsis-h",

View File

@ -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);
}
});

View File

@ -27,17 +27,18 @@ Additional SVG icons
<symbol id='discourse-bell-slash' viewBox="0 0 448 512">
<path d="M442.7 396.2L36.5 70.7c-6.9-5.5-17-4.4-22.5 2.5L4 85.6c-5.5 6.9-4.4 17 2.5 22.5l406.2 325.5c6.9 5.5 17 4.4 22.5-2.5l10-12.5c5.5-6.9 3.7-17.7-3.2-23.2l.7.8zM67.5 368c16.7-22 34.5-55.8 41.4-110.6l-45.5-35.6C60.2 312.6 27 342.5 8.6 362.3 2.6 368.7 0 376.4 0 384c.1 16.4 13 32 32.1 32h279.7l-61.4-48H67.5zM224 96c61.9 0 112 50.1 112 112 0 .2-.1.4-.1.6 0 16.8 1.2 31.8 2.8 45.7l59.5 46.5c-8.3-22.1-14.3-51.5-14.3-92.9 0-77.7-54.5-139.9-127.9-155.2V32c0-17.7-14.3-32-32-32s-32 14.3-32 32v20.8c-26 5.4-49.4 16.9-69.1 32.7l38.2 29.8C179 103.2 200.6 96 224 96zm0 416c35.3 0 64-28.6 64-64H160c0 35.4 28.7 64 64 64z"/>
</symbol>
<!-- "Discourse Comment Slash" is a version of https://fontawesome.com/icons/comment-slash?style=regular that has been recreated to be more legible at small sizes -->
<symbol id='discourse-comment-slash' viewBox="0 0 640 512">
<path d="M634 471L481.6 351.8l-6.8-5.3L36 3.5C29.1-2 19-.9 13.5 6l-10 12.5C-2 25.4-.9 35.5 6 41l598 467.5c6.9 5.5 17 4.4 22.5-2.5l10-12.5c5.5-6.9 4.4-17-2.5-22.5zM224.2 89.9c36.8-19.6 81.2-29.1 127.6-24.6 59 5.6 113 33.3 148 76.1 29.5 36 43.3 80 38.8 123.7-2.1 20.4-8 39.7-17 57.3l41.6 32.5c14.8-25.9 24.1-54.4 27.2-84.5 5.9-57.7-11.9-115.2-50.3-162-43.8-53.4-110.7-88-183.4-94.9-63.4-6.1-125.6 8.8-176.5 42l44 34.4zM407.1 416c-22 7.2-45.8 11.1-70.4 11.1-7.4 0-14.9-.4-22.5-1.1-29.6-2.8-57.7-11-83.6-24.4-3.7-1.9-7.8-2.9-11.9-2.9-2.2 0-4.4.3-6.6.9l-102.9 27 38.5-87c3.9-8.7 2.6-18.9-3.2-26.5-15.2-19.6-20.9-48.8-17-86.9.9-8.6 2.5-17 4.7-25.2l-43.6-34.1c-6.5 17.2-10.8 35.3-12.8 54-4.6 44.6 1.7 81.8 18.6 110.7L39.7 454.9c-4 9.1-2.5 19.8 4 27.4 5 5.9 12.3 9.2 19.8 9.2 2.2 0 4.4-.3 6.6-.9l145.8-38.2c29.3 13.8 60.6 22.3 93.4 25.4 9.2.9 18.5 1.3 27.6 1.3 41.4 0 81.5-8.9 117.7-25.9L407.1 416z"/>
</symbol>
<!-- "Discourse Comment" is a Discourse derivative of https://fontawesome.com/icons/comment?style=regular that has been built to match the custom discourse-comment-slash icon -->
<!-- "Discourse Comment" is a Discourse derivative of https://fontawesome.com/icons/comment?style=regular that has been built to match the custom discourse-comment-close icon -->
<symbol id='discourse-comment' viewBox="0 0 550 512">
<path d="M26 479.3c-7.5 0-14.8-3.3-19.8-9.2-6.5-7.6-8-18.3-4-27.4l54.6-123.2c-17-28.9-23.2-66.1-18.6-110.7C44.6 146.2 77.8 90.2 131.6 51 184.4 12.4 251.1-5.2 319.2 1.3c72.8 7 139.6 41.5 183.3 94.9 38.4 46.8 56.3 104.4 50.3 162-6.5 62.5-39.6 118.5-93.4 157.7-45.7 33.3-101.7 51-160 51-9.2 0-18.4-.4-27.6-1.3-32.8-3.1-64.2-11.7-93.4-25.4L32.6 478.4c-2.2.6-4.4.9-6.6.9zm155.2-92.7c4.1 0 8.2 1 11.9 2.9 25.9 13.4 54 21.6 83.6 24.4 7.5.7 15 1.1 22.5 1.1 104 0 192.3-69.1 201.9-162 4.5-43.8-9.3-87.7-38.8-123.7-35-42.7-89-70.4-148-76.1-113.5-10.9-214.1 61.4-224.4 161-3.9 38.1 1.8 67.3 17 86.9 5.9 7.6 7.1 17.7 3.2 26.5l-38.5 87 102.9-27c2.3-.7 4.5-1 6.7-1z"/>
</symbol>
<!-- "Discourse Comment Plus" is a version of https://fontawesome.com/icons/comment-plus?style=regular that has been recreated to match the custom discourse-comment-slash icon -->
<symbol id='discourse-comment-plus' viewBox="0 0 550 512">
<!-- "Discourse Comment Plus" is a version of https://fontawesome.com/icons/comment-plus?style=regular that has been recreated to match the custom discourse-comment icon -->
<symbol id="discourse-comment-plus" viewBox="0 0 550 512">
<path d="M26 479.3c-7.5 0-14.8-3.3-19.8-9.2-6.5-7.6-8-18.3-4-27.4l54.6-123.2c-17-28.9-23.2-66.1-18.6-110.7C44.6 146.2 77.8 90.2 131.6 51 184.4 12.4 251.1-5.2 319.2 1.3c72.8 7 139.6 41.5 183.3 94.9 38.4 46.8 56.3 104.4 50.3 162-6.5 62.5-39.6 118.5-93.4 157.7-45.7 33.3-101.7 51-160 51-9.2 0-18.4-.4-27.6-1.3-32.8-3.1-64.2-11.7-93.4-25.4L32.6 478.4c-2.2.6-4.4.9-6.6.9zm155.2-92.7c4.1 0 8.2 1 11.9 2.9 25.9 13.4 54 21.6 83.6 24.4 7.5.7 15 1.1 22.5 1.1 104 0 192.3-69.1 201.9-162 4.5-43.8-9.3-87.7-38.8-123.7-35-42.7-89-70.4-148-76.1-113.5-10.9-214.1 61.4-224.4 161-3.9 38.1 1.8 67.3 17 86.9 5.9 7.6 7.1 17.7 3.2 26.5l-38.5 87 102.9-27c2.3-.7 4.5-1 6.7-1z"/>
<path d="M375.6 207.7h-54.2v-54.2c0-10.6-8.6-19.2-19.2-19.2h-13.3c-10.6 0-19.2 8.6-19.2 19.2v54.2h-54.2c-10.6 0-19.2 8.6-19.2 19.2v13.3c0 10.6 8.6 19.2 19.2 19.2h54.2v54.2c0 10.6 8.6 19.2 19.2 19.2h13.3c10.6 0 19.2-8.6 19.2-19.2v-54.2h54.2c10.6 0 19.2-8.6 19.2-19.2V227c0-10.6-8.6-19.3-19.2-19.3z"/>
<path d="M385.8 199.7h-61.4v-61.4c0-12-9.7-21.8-21.8-21.8h-15.1c-12 0-21.8 9.7-21.8 21.8v61.4h-61.4c-12 0-21.8 9.7-21.8 21.8v15.1c0 12 9.7 21.8 21.8 21.8h61.4v61.4c0 12 9.7 21.8 21.8 21.8h15.1c12 0 21.8-9.7 21.8-21.8v-61.4h61.4c12 0 21.8-9.7 21.8-21.8v-15c-.1-12-9.8-21.9-21.8-21.9z"/>
</symbol>
<!-- "Discourse Comment Close" is a version of https://fontawesome.com/icons/comment-times?style=regular that has been recreated to match the custom discourse-comment icon -->
<symbol id="discourse-comment-close" viewBox="0 0 550 512">
<path d="M26 479.3c-7.5 0-14.8-3.3-19.8-9.2-6.5-7.6-8-18.3-4-27.4l54.6-123.2c-17-28.9-23.2-66.1-18.6-110.7C44.6 146.2 77.8 90.2 131.6 51 184.4 12.4 251.1-5.2 319.2 1.3c72.8 7 139.6 41.5 183.3 94.9 38.4 46.8 56.3 104.4 50.3 162-6.5 62.5-39.6 118.5-93.4 157.7-45.7 33.3-101.7 51-160 51-9.2 0-18.4-.4-27.6-1.3-32.8-3.1-64.2-11.7-93.4-25.4L32.6 478.4c-2.2.6-4.4.9-6.6.9zm155.2-92.7c4.1 0 8.2 1 11.9 2.9 25.9 13.4 54 21.6 83.6 24.4 7.5.7 15 1.1 22.5 1.1 104 0 192.3-69.1 201.9-162 4.5-43.8-9.3-87.7-38.8-123.7-35-42.7-89-70.4-148-76.1-113.5-10.9-214.1 61.4-224.4 161-3.9 38.1 1.8 67.3 17 86.9 5.9 7.6 7.1 17.7 3.2 26.5l-38.5 87 102.9-27c2.3-.7 4.5-1 6.7-1z"/>
<path d="M379.9 272.5L336.5 229l43.4-43.4c8.5-8.5 8.5-22.3 0-30.8l-10.7-10.7c-8.5-8.5-22.3-8.5-30.8 0L295 187.5l-43.4-43.4c-8.5-8.5-22.3-8.5-30.8 0l-10.7 10.7c-8.5 8.5-8.5 22.3 0 30.8l43.4 43.4-43.4 43.4c-8.5 8.5-8.5 22.3 0 30.8l10.7 10.7c8.5 8.5 22.3 8.5 30.8 0l43.4-43.4 43.4 43.4c8.5 8.5 22.3 8.5 30.8 0l10.6-10.6c8.5-8.5 8.6-22.4.1-30.8z"/>
</symbol>
</svg>

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB