UX: place (edited) on same line (#23866)

Attempts to have the `(edited)` text on the same line than the content when possible. Impossible cases include: onebox, youtube video, ...
This commit is contained in:
chapoi 2023-10-10 11:00:16 +02:00 committed by GitHub
parent 542f77181a
commit c1017a479b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View File

@ -1,6 +1,9 @@
<div class="chat-message-collapser">
{{#if this.hasUploads}}
{{html-safe @cooked}}
{{#if @isEdited}}
<span class="chat-message-edited">({{i18n "chat.edited"}})</span>
{{/if}}
<Collapser @header={{this.uploadsHeader}} @onToggle={{@onToggleCollapse}}>
<div class="chat-uploads">
@ -25,5 +28,8 @@
{{cooked.body}}
{{/if}}
{{/each}}
{{#if @isEdited}}
<span class="chat-message-edited">({{i18n "chat.edited"}})</span>
{{/if}}
{{/if}}
</div>

View File

@ -4,14 +4,13 @@
@cooked={{@cooked}}
@uploads={{@uploads}}
@onToggleCollapse={{@onToggleCollapse}}
@isEdited={{this.isEdited}}
/>
{{else}}
{{html-safe @cooked}}
{{/if}}
{{#if this.isEdited}}
<span class="chat-message-edited">({{i18n "chat.edited"}})</span>
{{/if}}
{{/if}}
{{yield}}
</div>

View File

@ -60,6 +60,10 @@
min-width: 0;
width: 100%;
p {
display: inline-block;
}
code {
box-sizing: border-box;
font-size: var(--font-down-1);