Skip to content

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

UX: add flex to mentions mixin + update units (#32145)

chapoi564edc52ebb9
diff --git a/app/assets/stylesheets/common/base/topic-post.scss b/app/assets/stylesheets/common/base/topic-post.scss
index 29761e9d598..497edbd1ee5 100644
--- a/app/assets/stylesheets/common/base/topic-post.scss
+++ b/app/assets/stylesheets/common/base/topic-post.scss
@@ -1265,9 +1265,8 @@ a.mention-group {
}
.mention .emoji {
- margin-left: 0.3em;
- width: 15px;
- height: 15px;
+ width: 0.93em;
+ height: 0.93em;
}
span.mention {
diff --git a/app/assets/stylesheets/common/components/hashtag.scss b/app/assets/stylesheets/common/components/hashtag.scss
index a4272acb146..86c290a6341 100644
--- a/app/assets/stylesheets/common/components/hashtag.scss
+++ b/app/assets/stylesheets/common/components/hashtag.scss
@@ -36,9 +36,9 @@ a.hashtag {
}
img.emoji {
- width: 15px;
- height: 15px;
- vertical-align: text-top;
+ width: 0.93em;
+ height: 0.93em;
+ vertical-align: middle;
}
svg {
@@ -56,7 +56,6 @@ a.hashtag {
.hashtag-category-icon,
.hashtag-category-emoji {
- margin-right: 0.25em;
display: inline-block;
}
}
@@ -111,17 +110,17 @@ a.hashtag {
.hashtag-category-icon,
.hashtag-category-emoji {
flex: 0 0 auto;
- width: 15px;
- height: 15px;
+ width: 0.93em;
+ height: 0.93em;
margin-right: 5px;
display: inline-block;
}
.hashtag-category-icon .svg-icon,
.hashtag-category-emoji .emoji {
- width: 15px;
- height: 15px;
- vertical-align: top;
+ width: 0.93em;
+ height: 0.93em;
+ vertical-align: middle;
}
}
diff --git a/app/assets/stylesheets/common/foundation/mixins.scss b/app/assets/stylesheets/common/foundation/mixins.scss
index 410a225de3b..f921c00d4d9 100644
--- a/app/assets/stylesheets/common/foundation/mixins.scss
+++ b/app/assets/stylesheets/common/foundation/mixins.scss
@@ -235,15 +235,18 @@ $hpad: 0.65em;
}
@mixin mention() {
- display: inline;
+ display: inline-flex;
+ align-items: center;
+ gap: 0.25em;
font-size: 0.93em;
font-weight: normal;
color: var(--primary);
- padding: 0.14em 0.34em 0.19em;
+ padding: 0.2em 0.34em;
background: var(--primary-low);
border-radius: 0.6em;
text-decoration: none;
text-wrap: nowrap;
+ line-height: 1;
&.--bot {
background: var(--success-low);
diff --git a/plugins/chat/spec/system/channel_members_page_spec.rb b/plugins/chat/spec/system/channel_members_page_spec.rb
index 12f91562047..fb293b19b97 100644
--- a/plugins/chat/spec/system/channel_members_page_spec.rb
+++ b/plugins/chat/spec/system/channel_members_page_spec.rb
@@ -111,7 +111,8 @@ RSpec.describe "Channel - Info - Members page", type: :system do
chat_page.find(".add-to-channel").click
expect(chat_page).to have_current_path("/chat/c/#{channel_1.slug}/#{channel_1.id}")
- expect(chat_page).to have_content(
+ expect(chat_page).to have_text(
+ :all,
I18n.t(
"chat.channel.users_invited_to_channel",
invited_users: "@#{new_user.username}",
@@ -144,7 +145,8 @@ RSpec.describe "Channel - Info - Members page", type: :system do
chat_page.find(".add-to-channel").click
expect(chat_page).to have_current_path("/chat/c/#{channel_1.slug}/#{channel_1.id}")
- expect(chat_page).to have_content(
+ expect(chat_page).to have_text(
+ :all,
I18n.t(
"chat.channel.users_invited_to_channel",
invited_users: "@#{new_user.username}",