UX: update chat icon to d-chat (#20744)

This commit is contained in:
Kris 2023-03-21 10:40:42 -04:00 committed by GitHub
parent 5d03ddfbc8
commit 147941a5d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 21 additions and 19 deletions

View File

@ -98,7 +98,7 @@ acceptance("Sidebar - Plugin API", function (needs) {
}
get prefixValue() {
return "hashtag";
return "d-chat";
}
get prefixColor() {
@ -285,7 +285,7 @@ acceptance("Sidebar - Plugin API", function (needs) {
);
assert.strictEqual(
links[0].children[0].children[0].classList.contains("d-icon-hashtag"),
links[0].children[0].children[0].classList.contains("d-icon-d-chat"),
true,
"displays prefix icon"
);

View File

@ -86,7 +86,7 @@ class Wizard
step.add_field(
id: "chat_enabled",
type: "checkbox",
icon: "comment",
icon: "d-chat",
value: SiteSetting.chat_enabled,
)
end

View File

@ -53,7 +53,7 @@
class="chat-channel-title__category-badge"
style={{this.channelColorStyle}}
>
{{d-icon "hashtag"}}
{{d-icon "d-chat"}}
{{#if this.channel.chatable.read_restricted}}
{{d-icon "lock" class="chat-channel-title__restricted-category-icon"}}
{{/if}}

View File

@ -8,7 +8,7 @@
@action={{action "onCancelChatDraft"}}
/>
<h2 class="chat-draft-header__title">
{{d-icon "comment"}}
{{d-icon "d-chat"}}
{{i18n "chat.draft_channel_screen.header"}}
</h2>
</header>

View File

@ -3,7 +3,7 @@
tabindex="0"
class={{concat-class "icon btn-flat" (if this.isActive "active")}}
>
{{d-icon "comment"}}
{{d-icon "d-chat"}}
{{#unless this.currentUserInDnD}}
<ChatHeaderIconUnreadIndicator />

View File

@ -3,6 +3,6 @@
@class="btn-primary user-card-chat-btn"
@action={{action "startChatting"}}
@label="chat.title_capitalized"
@icon="comment"
@icon="d-chat"
/>
{{/if}}

View File

@ -1,6 +1,6 @@
{{#if (or this.model.can_chat this.currentUser.admin)}}
<LinkTo @route="preferences.chat">
{{d-icon "comment"}}
{{d-icon "d-chat"}}
<span>{{i18n "chat.title_capitalized"}}</span>
</LinkTo>
{{/if}}

View File

@ -4,10 +4,13 @@ import { bind } from "discourse-common/utils/decorators";
import { getOwner } from "discourse-common/lib/get-owner";
import { MENTION_KEYWORDS } from "discourse/plugins/chat/discourse/components/chat-message";
import { clearChatComposerButtons } from "discourse/plugins/chat/discourse/lib/chat-composer-buttons";
import { replaceIcon } from "discourse-common/lib/icon-library";
let _lastForcedRefreshAt;
const MIN_REFRESH_DURATION_MS = 180000; // 3 minutes
replaceIcon("d-chat", "comment");
export default {
name: "chat-setup",

View File

@ -68,7 +68,7 @@ export default {
}
get prefixValue() {
return "hashtag";
return "d-chat";
}
get prefixColor() {

View File

@ -69,7 +69,7 @@ export default {
}
get icon() {
return "comment";
return "d-chat";
}
get label() {
@ -112,7 +112,7 @@ export default {
}
get icon() {
return "comment";
return "d-chat";
}
get count() {

View File

@ -33,7 +33,7 @@ const chatNotificationItem = {
const title = this.notificationTitle(notificationName, data);
const text = this.text(notificationName, data);
const html = new RawHtml({ html: `<div>${text}</div>` });
const contents = [iconNode("comment"), html];
const contents = [iconNode("d-chat"), html];
const href = this.url(data);
return h(

View File

@ -179,7 +179,7 @@ html.rtl {
text-overflow: ellipsis;
}
.d-icon:not(.d-icon-hashtag) {
.d-icon:not(.d-icon-d-chat) {
color: var(--primary-high);
}
.category-hashtag {

View File

@ -5,7 +5,7 @@
<a href="{{url}}">
{{#is_category}}
<span class="category-chat-badge" style="color: #{{color}}">
<svg class="fa d-icon d-icon-hashtag svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#hashtag"></use></svg>
<svg class="fa d-icon d-icon-d-chat svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#d-chat"></use></svg>
</span>
{{/is_category}}
<span class="clear-badge">{{{channel_name}}}</span>
@ -42,7 +42,7 @@
<a class="chat-transcript-channel" href="/chat/c/-/{{channel_id}}">
{{#is_category}}
<span class="category-chat-badge" style="color: #{{color}}">
<svg class="fa d-icon d-icon-hashtag svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#hashtag"></use></svg>
<svg class="fa d-icon d-icon-d-chat svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#d-chat"></use></svg>
</span>
{{/is_category}}
{{#is_topic}}

View File

@ -17,7 +17,6 @@ register_asset "stylesheets/mobile/index.scss", :mobile
register_svg_icon "comments"
register_svg_icon "comment-slash"
register_svg_icon "hashtag"
register_svg_icon "lock"
register_svg_icon "file-audio"
register_svg_icon "file-video"

View File

@ -178,7 +178,7 @@ describe Chat do
<h3 class="chat-onebox-title">
<a href="#{chat_url}">
<span class="category-chat-badge" style="color: ##{chat_channel.chatable.color}">
<svg class="fa d-icon d-icon-hashtag svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#hashtag"></use></svg>
<svg class="fa d-icon d-icon-d-chat svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#d-chat"></use></svg>
</span>
<span class="clear-badge">#{chat_channel.name}</span>
</a>
@ -210,7 +210,7 @@ describe Chat do
</div>
<a class="chat-transcript-channel" href="/chat/c/-/#{chat_channel.id}">
<span class="category-chat-badge" style="color: ##{chat_channel.chatable.color}">
<svg class="fa d-icon d-icon-hashtag svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#hashtag"></use></svg>
<svg class="fa d-icon d-icon-d-chat svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#d-chat"></use></svg>
</span>
#{chat_channel.name}
</a>

View File

@ -30,7 +30,7 @@ RSpec.describe "Sidebar navigation menu", type: :system, js: true do
visit("/")
expect(sidebar_page.channels_section).to have_css(
".sidebar-section-link-#{channel_1.slug} .sidebar-section-link-prefix svg.prefix-icon.d-icon-hashtag",
".sidebar-section-link-#{channel_1.slug} .sidebar-section-link-prefix svg.prefix-icon.d-icon-d-chat",
)
end