UX: New text and style for dominating topic message (#13789)

This commit is contained in:
Kris 2021-07-20 13:58:38 -04:00 committed by GitHub
parent af5cf5ec2a
commit 5f6b9e36ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 35 additions and 18 deletions

View File

@ -0,0 +1,11 @@
<a href {{action closeMessage message}} class="close">{{d-icon "times"}}</a>
{{html-safe message.body}}
{{#if currentUser.can_invite_to_forum}}
{{d-button
class="btn-primary"
label="topic.invite_reply.title"
icon="user-friends"
action=(route-action "showInvite")
}}
{{/if}}

View File

@ -322,7 +322,7 @@
display: flex;
align-items: center;
margin-right: auto;
button {
.btn-primary {
flex: 0 0 auto;
}
.cancel {

View File

@ -631,7 +631,9 @@
&.single-tab {
background: none;
color: var(--primary);
padding: 4px 0;
padding: 0;
font-size: var(--font-up-3);
font-weight: bold;
}
}
}

View File

@ -2,11 +2,6 @@
.modal-body {
max-width: 475px;
min-width: 320px;
padding: 0;
}
.modal-panel {
padding: 0.667em;
}
.modal-header {

View File

@ -85,16 +85,17 @@
}
.composer-popup {
box-sizing: border-box;
position: absolute;
width: calc(50% - 45px);
width: calc(50% - 30px);
max-width: 724px;
top: 20px;
top: 21px; // grippie height + .reply-to margin-top + .reply-area padding-top
bottom: 10px;
left: 51%;
overflow-y: auto;
z-index: z("composer", "popover");
padding: 10px 10px 35px 10px;
box-shadow: shadow("card");
box-shadow: shadow("dropdown");
background: var(--highlight-medium);
.hide-preview & {
z-index: z("composer", "dropdown") + 1;
@ -108,6 +109,18 @@
background-color: var(--tertiary-low);
}
&.dominating-topic-message {
bottom: unset;
padding: 2.25em 6em 2.5em 2.25em;
p {
margin-top: 0;
font-size: var(--font-up-1);
}
button {
margin-top: 0.5em;
}
}
h3 {
margin-bottom: 10px;
}

View File

@ -523,12 +523,7 @@ en:
Its easier for everyone to read topics that have fewer in-depth replies versus lots of small, individual replies.
dominating_topic: |
### Let others join the conversation
This topic is clearly important to you &ndash; you've posted more than %{percent}% of the replies here.
It could be even better if you gave other people space to share their points of view, too. Can you invite them over?
dominating_topic: Youve posted more than %{percent}% of the replies here, is there anyone else you would like to hear from?
get_a_room: |
### Encourage everyone to get involved in the conversation

View File

@ -141,9 +141,9 @@ class ComposerMessagesFinder
{
id: 'dominating_topic',
templateName: 'education',
templateName: 'dominating-topic',
wait_for_typing: true,
extraClass: 'education-message',
extraClass: 'education-message dominating-topic-message',
body: PrettyText.cook(I18n.t('education.dominating_topic', percent: (ratio * 100).round))
}
end

View File

@ -207,6 +207,7 @@ module SvgSprite
"upload",
"user",
"user-edit",
"user-friends",
"user-plus",
"user-secret",
"user-shield",