UX: Maximize the preview space in composer (#15188)

A follow-up to #15117 and #15141. Applies the previous changes to PM-specific fields, makes the preview area take the all the available height of the composer, and unifies more spacing between composer elements.
This commit is contained in:
Jarek Radosz 2021-12-24 12:38:33 +01:00 committed by GitHub
parent a263743268
commit 0b34d5ac6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 259 additions and 235 deletions

View File

@ -1,4 +1,4 @@
{{d-editor {{#d-editor
value=composer.reply value=composer.reply
placeholder=replyPlaceholder placeholder=replyPlaceholder
previewUpdated=(action "previewUpdated") previewUpdated=(action "previewUpdated")
@ -19,6 +19,8 @@
disabled=disableTextarea disabled=disableTextarea
outletArgs=(hash composer=composer editorType="composer") outletArgs=(hash composer=composer editorType="composer")
}} }}
{{yield}}
{{/d-editor}}
{{#if allowUpload}} {{#if allowUpload}}
{{#if acceptsAllFormats}} {{#if acceptsAllFormats}}

View File

@ -1,58 +1,62 @@
<div class="d-editor-container"> <div class="d-editor-container">
<div class="d-editor-textarea-wrapper {{if disabled "disabled"}} {{if isEditorFocused "in-focus"}}"> <div class="d-editor-textarea-column">
<div class="d-editor-button-bar" role="toolbar"> {{yield}}
{{#each toolbar.groups as |group|}}
{{#each group.buttons as |b|}} <div class="d-editor-textarea-wrapper {{if disabled "disabled"}} {{if isEditorFocused "in-focus"}}">
{{#if b.popupMenu}} <div class="d-editor-button-bar" role="toolbar">
{{toolbar-popup-menu-options {{#each toolbar.groups as |group|}}
content=popupMenuOptions {{#each group.buttons as |b|}}
onChange=onPopupMenuAction {{#if b.popupMenu}}
onOpen=(action b.action b) {{toolbar-popup-menu-options
class=b.className content=popupMenuOptions
tabindex=-1 onChange=onPopupMenuAction
onKeydown=rovingButtonBar onOpen=(action b.action b)
options=(hash class=b.className
tabindex=-1
onKeydown=rovingButtonBar
options=(hash
icon=b.icon
focusAfterOnChange=false
)
}}
{{else}}
{{d-button
action=b.action
type="button"
actionParam=b
translatedTitle=b.title
label=b.label
icon=b.icon icon=b.icon
focusAfterOnChange=false class=b.className
) preventFocus=b.preventFocus
}} tabindex=b.tabindex
{{else}} onKeyDown=rovingButtonBar
{{d-button }}
action=b.action {{/if}}
type="button" {{/each}}
actionParam=b
translatedTitle=b.title {{#unless group.lastGroup}}
label=b.label <div class="d-editor-spacer"></div>
icon=b.icon {{/unless}}
class=b.className
preventFocus=b.preventFocus
tabindex=b.tabindex
onKeyDown=rovingButtonBar
}}
{{/if}}
{{/each}} {{/each}}
</div>
{{#unless group.lastGroup}} {{conditional-loading-spinner condition=loading}}
<div class="d-editor-spacer"></div> {{d-textarea
{{/unless}} autocomplete="discourse"
{{/each}} tabindex=tabindex
value=value
class="d-editor-input"
placeholder=placeholderTranslated
aria-label=placeholderTranslated
disabled=disabled
input=change
focusIn=(action "focusIn")
focusOut=(action "focusOut")
}}
{{popup-input-tip validation=validation}}
{{plugin-outlet name="after-d-editor" tagName="" args=outletArgs}}
</div> </div>
{{conditional-loading-spinner condition=loading}}
{{d-textarea
autocomplete="discourse"
tabindex=tabindex
value=value
class="d-editor-input"
placeholder=placeholderTranslated
aria-label=placeholderTranslated
disabled=disabled
input=change
focusIn=(action "focusIn")
focusOut=(action "focusOut")
}}
{{popup-input-tip validation=validation}}
{{plugin-outlet name="after-d-editor" tagName="" args=outletArgs}}
</div> </div>
<div class="d-editor-preview-wrapper {{if forcePreview "force-preview"}}"> <div class="d-editor-preview-wrapper {{if forcePreview "force-preview"}}">

View File

@ -1,120 +1,68 @@
{{#composer-body composer=model {{#composer-body
showPreview=showPreview composer=model
openIfDraft=(action "openIfDraft") showPreview=showPreview
typed=(action "typed") openIfDraft=(action "openIfDraft")
cancelled=(action "cancelled") typed=(action "typed")
save=(action "save")}} cancelled=(action "cancelled")
save=(action "save")
}}
<div class="grippie"></div> <div class="grippie"></div>
{{#if visible}} {{#if visible}}
{{composer-messages {{composer-messages
composer=model composer=model
messageCount=messageCount messageCount=messageCount
addLinkLookup=(action "addLinkLookup") addLinkLookup=(action "addLinkLookup")
}} }}
{{#if model.viewOpenOrFullscreen}} {{#if model.viewOpenOrFullscreen}}
<div role="form" aria-label={{I18n saveLabel}} class="reply-area {{if canEditTags "with-tags" "without-tags"}}"> <div role="form" aria-label={{I18n saveLabel}} class="reply-area {{if canEditTags "with-tags" "without-tags"}}">
<div class="composer-fields"> {{plugin-outlet name="composer-open" args=(hash model=model)}}
{{plugin-outlet name="composer-open" args=(hash model=model)}}
<div class="reply-to">
{{#unless model.viewFullscreen}}
<div class="reply-details">
{{composer-action-title
model=model
openComposer=(action "openComposer")
closeComposer=(action "closeComposer")
canWhisper=canWhisper
}}
{{plugin-outlet name="composer-action-after" noTags=true args=(hash model=model)}}
{{#unless site.mobileView}} <div class="reply-to">
{{#if model.unlistTopic}}
<span class="unlist">({{i18n "composer.unlist"}})</span>
{{/if}}
{{#if isWhispering}}
{{#if model.noBump}}
<span class="no-bump">{{d-icon "anchor"}}</span>
{{/if}}
{{/if}}
{{/unless}}
{{#if canEdit}}
{{#link-to-input onClick=(action "displayEditReason") showInput=showEditReason icon="info-circle" class="display-edit-reason"}}
{{text-field value=editReason id="edit-reason" maxlength="255" placeholderKey="composer.edit_reason_placeholder"}}
{{/link-to-input}}
{{/if}}
</div>
{{/unless}}
{{plugin-outlet name="before-composer-controls" args=(hash model=model) tagName="" connectorTagName=""}}
{{composer-toggles
composeState=model.composeState
showToolbar=showToolbar
toggleComposer=(action "toggle")
toggleToolbar=(action "toggleToolbar")
toggleFullscreen=(action "fullscreenComposer")
disableTextarea=disableTextarea
}}
</div>
{{#unless model.viewFullscreen}} {{#unless model.viewFullscreen}}
{{#if model.canEditTitle}} <div class="reply-details">
{{#if model.creatingPrivateMessage}} {{composer-action-title
<div class="user-selector"> model=model
{{composer-user-selector openComposer=(action "openComposer")
topicId=topicModel.id closeComposer=(action "closeComposer")
recipients=model.targetRecipients canWhisper=canWhisper
hasGroups=model.hasTargetGroups }}
focusTarget=focusTarget
class=(concat "users-input" (if showWarning " can-warn")) {{plugin-outlet name="composer-action-after" noTags=true args=(hash model=model)}}
}}
{{#if showWarning}} {{#unless site.mobileView}}
<label class="add-warning"> {{#if model.unlistTopic}}
{{input type="checkbox" checked=model.isWarning}} <span class="unlist">({{i18n "composer.unlist"}})</span>
<span>{{i18n "composer.add_warning"}}</span> {{/if}}
</label> {{#if isWhispering}}
{{#if model.noBump}}
<span class="no-bump">{{d-icon "anchor"}}</span>
{{/if}} {{/if}}
</div> {{/if}}
{{/unless}}
{{#if canEdit}}
{{#link-to-input onClick=(action "displayEditReason") showInput=showEditReason icon="info-circle" class="display-edit-reason"}}
{{text-field value=editReason id="edit-reason" maxlength="255" placeholderKey="composer.edit_reason_placeholder"}}
{{/link-to-input}}
{{/if}} {{/if}}
</div>
<div class="title-and-category {{if showPreview "with-preview"}}">
{{composer-title composer=model lastValidatedAt=lastValidatedAt focusTarget=focusTarget}}
{{#if model.showCategoryChooser}}
<div class="category-input">
{{category-chooser
value=model.categoryId
onChange=(action (mut model.categoryId))
isDisabled=disableCategoryChooser
options=(hash
scopedCategoryId=scopedCategoryId
prioritizedCategoryId=prioritizedCategoryId
)
}}
{{popup-input-tip validation=categoryValidation}}
</div>
{{/if}}
{{#if canEditTags}}
{{mini-tag-chooser
value=model.tags
isDisabled=disableTagsChooser
onChange=(action (mut model.tags))
options=(hash
categoryId=model.categoryId
minimum=model.minimumRequiredTags
)
}}
{{popup-input-tip validation=tagValidation}}
{{/if}}
</div>
{{/if}}
{{plugin-outlet name="composer-fields" args=(hash model=model showPreview=showPreview)}}
{{/unless}} {{/unless}}
{{plugin-outlet name="before-composer-controls" args=(hash model=model) tagName="" connectorTagName=""}}
{{composer-toggles
composeState=model.composeState
showToolbar=showToolbar
toggleComposer=(action "toggle")
toggleToolbar=(action "toggleToolbar")
toggleFullscreen=(action "fullscreenComposer")
disableTextarea=disableTextarea
}}
</div> </div>
{{composer-editor {{#composer-editor
topic=topic topic=topic
composer=model composer=model
lastValidatedAt=lastValidatedAt lastValidatedAt=lastValidatedAt
@ -141,8 +89,67 @@
focusTarget=focusTarget focusTarget=focusTarget
disableTextarea=disableTextarea disableTextarea=disableTextarea
}} }}
<div class="composer-fields">
{{#unless model.viewFullscreen}}
{{#if model.canEditTitle}}
{{#if model.creatingPrivateMessage}}
<div class="user-selector">
{{composer-user-selector
topicId=topicModel.id
recipients=model.targetRecipients
hasGroups=model.hasTargetGroups
focusTarget=focusTarget
class=(concat "users-input" (if showWarning " can-warn"))
}}
{{#if showWarning}}
<label class="add-warning">
{{input type="checkbox" checked=model.isWarning}}
<span>{{i18n "composer.add_warning"}}</span>
</label>
{{/if}}
</div>
{{/if}}
<div class="title-and-category {{if showPreview "with-preview"}}">
{{composer-title composer=model lastValidatedAt=lastValidatedAt focusTarget=focusTarget}}
{{#if model.showCategoryChooser}}
<div class="category-input">
{{category-chooser
value=model.categoryId
onChange=(action (mut model.categoryId))
isDisabled=disableCategoryChooser
options=(hash
scopedCategoryId=scopedCategoryId
prioritizedCategoryId=prioritizedCategoryId
)
}}
{{popup-input-tip validation=categoryValidation}}
</div>
{{/if}}
{{#if canEditTags}}
{{mini-tag-chooser
value=model.tags
isDisabled=disableTagsChooser
onChange=(action (mut model.tags))
options=(hash
categoryId=model.categoryId
minimum=model.minimumRequiredTags
)
}}
{{popup-input-tip validation=tagValidation}}
{{/if}}
</div>
{{/if}}
{{plugin-outlet name="composer-fields" args=(hash model=model showPreview=showPreview)}}
{{/unless}}
</div>
{{/composer-editor}}
{{plugin-outlet name="composer-after-composer-editor" connectorTagName="" args=(hash model=model)}} {{plugin-outlet name="composer-after-composer-editor" connectorTagName="" args=(hash model=model)}}
<div class="submit-panel"> <div class="submit-panel">
{{plugin-outlet name="composer-fields-below" args=(hash model=model)}} {{plugin-outlet name="composer-fields-below" args=(hash model=model)}}
@ -175,6 +182,7 @@
{{d-icon "far-eye-slash"}} {{d-icon "far-eye-slash"}}
</span> </span>
{{/if}} {{/if}}
{{#if model.noBump}} {{#if model.noBump}}
<span class="no-bump">{{d-icon "anchor"}}</span> <span class="no-bump">{{d-icon "anchor"}}</span>
{{/if}} {{/if}}
@ -187,11 +195,13 @@
{{else}} {{else}}
{{loading-spinner size="small"}}<span>{{i18n "upload_selector.uploading"}} {{uploadProgress}}%</span> {{loading-spinner size="small"}}<span>{{i18n "upload_selector.uploading"}} {{uploadProgress}}%</span>
{{/if}} {{/if}}
{{#if isCancellable}} {{#if isCancellable}}
<a href id="cancel-file-upload" {{action "cancelUpload"}}>{{d-icon "times"}}</a> <a href id="cancel-file-upload" {{action "cancelUpload"}}>{{d-icon "times"}}</a>
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}
<div class={{if isUploading "hidden"}} id="draft-status"> <div class={{if isUploading "hidden"}} id="draft-status">
{{#if model.draftStatus}} {{#if model.draftStatus}}
<span title={{model.draftStatus}}> <span title={{model.draftStatus}}>
@ -206,6 +216,7 @@
</span> </span>
{{/if}} {{/if}}
</div> </div>
{{plugin-outlet name="composer-after-save-or-cancel" connectorTagName="" args=(hash model=model)}} {{plugin-outlet name="composer-after-save-or-cancel" connectorTagName="" args=(hash model=model)}}
</div> </div>
@ -233,10 +244,8 @@
class=(concat "btn-flat btn-mini-toggle toggle-preview " (unless showPreview "active")) class=(concat "btn-flat btn-mini-toggle toggle-preview " (unless showPreview "active"))
}} }}
{{/if}} {{/if}}
</div> </div>
</div> </div>
{{else}} {{else}}
<div class="saving-text"> <div class="saving-text">
{{#if model.createdPost}} {{#if model.createdPost}}
@ -261,7 +270,5 @@
toggleToolbar=(action "toggleToolbar") toggleToolbar=(action "toggleToolbar")
}} }}
{{/if}} {{/if}}
{{/if}} {{/if}}
{{/composer-body}} {{/composer-body}}

View File

@ -360,7 +360,7 @@ acceptance("Composer Actions", function (needs) {
"whisper icon is not visible" "whisper icon is not visible"
); );
assert.ok( assert.ok(
!exists(".composer-fields .whisper .d-icon-anchor"), !exists(".reply-details .whisper .d-icon-anchor"),
"no-bump icon is not visible" "no-bump icon is not visible"
); );
assert.strictEqual( assert.strictEqual(
@ -380,7 +380,7 @@ acceptance("Composer Actions", function (needs) {
"whisper icon is visible" "whisper icon is visible"
); );
assert.strictEqual( assert.strictEqual(
count(".composer-fields .no-bump .d-icon-anchor"), count(".reply-details .no-bump .d-icon-anchor"),
1, 1,
"no-bump icon is visible" "no-bump icon is visible"
); );

View File

@ -563,7 +563,7 @@ acceptance("Composer", function (needs) {
await click("#create-topic"); await click("#create-topic");
assert.ok( assert.ok(
!exists(".composer-fields .whisper .d-icon-far-eye-slash"), !exists(".reply-details .whisper .d-icon-far-eye-slash"),
"it should reset the state of the composer's model" "it should reset the state of the composer's model"
); );
@ -573,9 +573,9 @@ acceptance("Composer", function (needs) {
); );
assert.ok( assert.ok(
queryAll(".composer-fields .unlist") query(".reply-details .unlist").innerText.includes(
.text() I18n.t("composer.unlist")
.indexOf(I18n.t("composer.unlist")) > 0, ),
"it sets the topic to unlisted" "it sets the topic to unlisted"
); );
@ -583,7 +583,7 @@ acceptance("Composer", function (needs) {
await click(".topic-post:nth-of-type(1) button.reply"); await click(".topic-post:nth-of-type(1) button.reply");
assert.ok( assert.ok(
!exists(".composer-fields .whisper"), !exists(".reply-details .whisper"),
"it should reset the state of the composer's model" "it should reset the state of the composer's model"
); );
}); });

View File

@ -30,7 +30,8 @@
.saving-text, .saving-text,
.draft-text { .draft-text {
display: none; display: none;
padding-left: 10px; padding-left: 8px;
.spinner { .spinner {
margin-left: 8px; margin-left: 8px;
border-color: var(--secondary); border-color: var(--secondary);
@ -59,14 +60,17 @@
background: var(--tertiary); background: var(--tertiary);
color: var(--secondary); color: var(--secondary);
flex-direction: row; flex-direction: row;
width: 100%; justify-content: space-between;
.composer-controls { .composer-controls {
margin-left: auto;
display: flex; display: flex;
gap: 8px;
padding-right: 8px; padding-right: 8px;
.toggle-toolbar { .toggle-toolbar {
display: none; display: none;
} }
.d-icon { .d-icon {
color: var(--secondary); color: var(--secondary);
} }
@ -100,11 +104,11 @@
justify-content: flex-end; justify-content: flex-end;
.reply-details { .reply-details {
flex: 1 1 auto; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
min-width: 0;
white-space: nowrap; white-space: nowrap;
overflow: auto;
.d-icon { .d-icon {
color: var(--primary-medium); color: var(--primary-medium);
@ -151,6 +155,7 @@
.composer-controls { .composer-controls {
display: flex; display: flex;
gap: 8px;
margin-left: 8px; margin-left: 8px;
.d-icon { .d-icon {
@ -196,11 +201,11 @@
display: flex; display: flex;
width: 100%; width: 100%;
align-items: center; align-items: center;
margin-bottom: 8px;
position: relative; position: relative;
&.with-preview { }
width: 50%;
} .user-selector {
margin-bottom: 8px;
} }
.title-input { .title-input {
@ -231,19 +236,24 @@
flex: 1 0 40%; flex: 1 0 40%;
max-width: 40%; max-width: 40%;
margin: 0 0 8px 8px; margin: 0 0 8px 8px;
@media screen and (max-width: 955px) { @media screen and (max-width: 955px) {
flex: 1 0 100%; flex: 1 0 100%;
margin-left: 0; margin-left: 0;
} }
.category-chooser { .category-chooser {
display: flex; display: flex;
flex: 1 0 auto; flex: 1 0 auto;
max-width: 100%; max-width: 100%;
width: auto; width: auto;
.select-kit-header { .select-kit-header {
color: var(--primary-high);
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
// below needed for text-overflow: ellipsis; // below needed for text-overflow: ellipsis;
.selected-name { .selected-name {
max-width: 100%; max-width: 100%;
@ -269,42 +279,56 @@
.title-and-category { .title-and-category {
flex-wrap: wrap; flex-wrap: wrap;
} }
.category-input { .category-input {
margin-left: 0; margin-left: 0;
margin-bottom: 0px; margin-bottom: 8px;
min-width: 0; // allows flex to shrink min-width: 0; // allows flex to shrink
flex-wrap: wrap; flex-wrap: wrap;
max-width: 50%; max-width: calc(50% - 4px);
@media screen and (max-width: 920px) { @media screen and (max-width: 920px) {
flex-basis: 100%;
margin-right: 0; margin-right: 0;
margin-bottom: 6px;
max-width: calc(50% - 3px);
} }
} }
} }
.add-warning { .add-warning {
margin-left: 0.75em; color: var(--primary-high);
padding-left: 8px;
margin-bottom: 0; margin-bottom: 0;
display: flex; display: flex;
input { input {
margin-right: 8px; margin-right: 8px;
} }
} }
#reply-title { #reply-title {
margin: 0 0 8px 0; margin-bottom: 8px;
flex-basis: 50%; flex-basis: 50%;
width: unset; width: unset;
&:focus { &:focus {
box-shadow: none; box-shadow: none;
} }
} }
.mini-tag-chooser { .mini-tag-chooser {
width: 49%; flex-grow: 1;
margin: 0 0 0 auto; max-width: calc(50% - 4px);
background: var(--secondary); margin: 0 0 8px 8px;
z-index: z("composer", "dropdown"); z-index: z("composer", "dropdown");
@media screen and (max-width: 920px) {
max-width: calc(50% - 3px);
}
.select-kit-header {
color: var(--primary-high);
}
} }
.wmd-controls { .wmd-controls {
@ -316,30 +340,36 @@
} }
.submit-panel { .submit-panel {
align-items: center;
display: flex; display: flex;
flex-shrink: 0; flex-shrink: 0;
margin-top: 8px; margin-top: 8px;
} }
.save-or-cancel { .save-or-cancel {
display: flex;
align-items: center; align-items: center;
display: flex;
flex: 1 1 auto; flex: 1 1 auto;
.btn-primary { .btn-primary {
flex: 0 0 auto; flex: 0 0 auto;
} }
.cancel { .cancel {
align-items: center;
display: flex;
margin-left: 1.25em; margin-left: 1.25em;
line-height: normal; line-height: normal;
color: var(--primary-high); color: var(--primary-high);
transition: color 250ms; transition: color 250ms;
&:hover, &:hover,
&:focus { &:focus {
outline: none; outline: none;
color: var(--danger); color: var(--danger);
} }
} }
#draft-status, #draft-status,
#file-uploading { #file-uploading {
margin-left: 25px; margin-left: 25px;
@ -539,6 +569,7 @@ body:not(.ios-safari-composer-hacks) {
} }
.toggle-preview { .toggle-preview {
margin-left: 8px;
transition: all 0.33s ease-out; transition: all 0.33s ease-out;
&.active { &.active {

View File

@ -10,17 +10,19 @@
min-height: 0; min-height: 0;
} }
.d-editor-textarea-wrapper, .d-editor-textarea-column {
.d-editor-preview-wrapper { display: flex;
flex: 1; flex: 1;
flex-direction: column;
} }
.d-editor-textarea-wrapper { .d-editor-textarea-wrapper {
display: flex; display: flex;
flex: 1;
flex-direction: column; flex-direction: column;
background-color: var(--secondary); background-color: var(--secondary);
position: relative; position: relative;
border: 1px solid var(--primary-low); border: 1px solid var(--primary-medium);
textarea { textarea {
background: transparent; background: transparent;
@ -44,13 +46,10 @@
} }
.d-editor-preview-wrapper { .d-editor-preview-wrapper {
max-width: 49%;
margin-left: 1%;
display: flex; display: flex;
flex: 1;
flex-direction: column; flex-direction: column;
} margin-left: 16px;
.d-editor-preview-wrapper {
overflow: auto; overflow: auto;
cursor: default; cursor: default;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
@ -297,8 +296,6 @@
border-bottom: 1px solid var(--primary-low); border-bottom: 1px solid var(--primary-low);
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding-left: 2px;
padding-right: 2px;
.d-editor-spacer { .d-editor-spacer {
height: 1em; height: 1em;

View File

@ -7,7 +7,7 @@
outline: none; outline: none;
padding: 0; padding: 0;
margin-right: 8px; margin-right: 8px;
border: 1px solid var(--primary-low); border: 1px solid var(--primary-medium);
min-height: unset; min-height: unset;
.d-icon { .d-icon {

View File

@ -8,7 +8,6 @@
.submit-panel { .submit-panel {
flex-wrap: wrap; flex-wrap: wrap;
align-items: center;
} }
} }
@ -23,7 +22,7 @@
.mini-tag-chooser { .mini-tag-chooser {
margin-bottom: 8px; // match title input margin margin-bottom: 8px; // match title input margin
flex: 0 0 auto; flex: 0 0 auto;
margin-left: 1%; // matches margin between category and tag input margin-left: 8px; // matches margin between category and tag input
width: 39%; width: 39%;
} }
} }
@ -47,12 +46,6 @@
@include ellipsis; @include ellipsis;
} }
} }
&.show-preview {
.user-selector {
width: 50%;
}
}
} }
} }
@ -88,22 +81,16 @@
} }
} }
.composer-popup-container {
max-width: 1500px;
margin-left: auto;
margin-right: auto;
}
.composer-popup { .composer-popup {
box-sizing: border-box; box-sizing: border-box;
position: absolute; position: absolute;
width: calc(49% - 8px); width: calc(50% - 8px);
top: 8px; // .reply-to margin-top + .reply-area padding-top top: 8px; // .reply-to margin-top + .reply-area padding-top
bottom: 8px; bottom: 8px;
left: 51%; right: 8px;
overflow-y: auto; overflow-y: auto;
z-index: z("composer", "popover"); z-index: z("composer", "popover");
padding: 8px 8px 32px 8px; padding: 1.5em;
box-shadow: shadow("dropdown"); box-shadow: shadow("dropdown");
background: var(--highlight-medium); background: var(--highlight-medium);
@ -136,10 +123,6 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
p {
margin-bottom: 10px;
}
a.close { a.close {
display: flex; display: flex;
align-items: center; align-items: center;
@ -239,7 +222,6 @@
} }
.composer-popup:nth-of-type(2) { .composer-popup:nth-of-type(2) {
margin-left: 10px;
width: calc(50% - 65px); width: calc(50% - 65px);
} }
@ -282,10 +264,7 @@ a.toggle-preview {
.reply-to { .reply-to {
border-bottom: 1px solid var(--primary-low); border-bottom: 1px solid var(--primary-low);
margin-bottom: 0; margin-bottom: 0;
padding-bottom: 8px;
.composer-controls {
margin-right: 0;
}
} }
.d-editor-textarea-wrapper { .d-editor-textarea-wrapper {

View File

@ -29,7 +29,7 @@
.keyboard-visible body.ios-safari-composer-hacks &.open { .keyboard-visible body.ios-safari-composer-hacks &.open {
height: calc(var(--composer-vh, 1vh) * 100); height: calc(var(--composer-vh, 1vh) * 100);
.reply-area { .reply-area {
padding-bottom: 0px; padding-bottom: 6px;
} }
} }
@ -55,6 +55,7 @@
.composer-controls { .composer-controls {
align-self: flex-start; align-self: flex-start;
gap: 6px;
} }
} }
} }
@ -71,7 +72,7 @@
.toggle-toolbar, .toggle-toolbar,
.toggle-minimize { .toggle-minimize {
top: 8px; top: 6px;
} }
.draft-text { .draft-text {
width: calc(100% - 40px); width: calc(100% - 40px);
@ -81,6 +82,7 @@
#reply-title { #reply-title {
width: calc(100% - 20px); width: calc(100% - 20px);
margin-bottom: 6px;
} }
.category-input { .category-input {
@ -89,10 +91,10 @@
.submit-panel { .submit-panel {
margin-top: 6px; margin-top: 6px;
align-items: baseline;
.save-or-cancel { .save-or-cancel {
flex: 1 1 auto; flex: 1 1 auto;
#draft-status, #draft-status,
#file-uploading { #file-uploading {
margin-left: 6px; margin-left: 6px;
@ -121,10 +123,6 @@
} }
} }
.d-editor-textarea-wrapper {
width: 100%;
}
&.show-preview { &.show-preview {
.submit-panel { .submit-panel {
padding-top: 10px; padding-top: 10px;
@ -179,7 +177,7 @@
.user-selector { .user-selector {
margin: 0; margin: 0;
.users-input { .users-input {
margin-bottom: 5px; margin-bottom: 6px;
} }
} }
@ -187,7 +185,10 @@
.mini-tag-chooser, .mini-tag-chooser,
.category-chooser { .category-chooser {
z-index: z("base"); z-index: z("base");
margin-bottom: 5px; }
.mini-tag-chooser {
margin: 0 0 6px 6px;
} }
.selected-name { .selected-name {
@ -206,7 +207,7 @@
.without-tags { .without-tags {
.category-input { .category-input {
margin-left: 5px; margin-left: 6px;
} }
} }
@ -219,11 +220,15 @@
width: 100%; width: 100%;
} }
.users-input .select-kit.multi-select {
width: 100%;
}
.add-warning { .add-warning {
margin: 0 0 5px 5px; margin-bottom: 6px;
} }
.whisper { .whisper {
margin-right: 5px; margin-right: 6px;
} }
} }

View File

@ -9,10 +9,10 @@
display: flex; display: flex;
span.presence-text { span.presence-text {
margin-left: 5px; align-items: center;
margin-right: 2px; display: flex;
flex: 0 0 auto; flex: 0 0 auto;
padding-top: 3px; margin-left: 8px;
} }
.presence-avatars { .presence-avatars {
@ -66,8 +66,7 @@
// TMP: RTL overrides // TMP: RTL overrides
.rtl { .rtl {
span.presence-text { span.presence-text {
margin-left: 2px; margin-right: 8px;
margin-right: 5px;
} }
.composer-fields .presence-users { .composer-fields .presence-users {

View File

@ -193,7 +193,7 @@ acceptance("Discourse Presence Plugin", function (needs) {
await click("#topic-footer-buttons .btn.create"); await click("#topic-footer-buttons .btn.create");
assert.ok(exists(".d-editor-input"), "the composer input is visible"); assert.ok(exists(".d-editor-input"), "the composer input is visible");
const avatarSelector = ".composer-fields .presence-avatars .avatar"; const avatarSelector = ".reply-to .presence-avatars .avatar";
assert.strictEqual(count(avatarSelector), 0, "no avatars displayed"); assert.strictEqual(count(avatarSelector), 0, "no avatars displayed");
await joinChannel("/discourse-presence/reply/280", { await joinChannel("/discourse-presence/reply/280", {