mirror of
https://github.com/discourse/discourse.git
synced 2025-04-10 04:10:58 +08:00
UX: Better handling of long category names and button bar in composer (#10542)
This commit is contained in:
parent
7cdef9f793
commit
489443e3a9
app/assets/stylesheets
@ -191,7 +191,6 @@
|
|||||||
.user-selector,
|
.user-selector,
|
||||||
.title-and-category {
|
.title-and-category {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
@ -219,7 +218,8 @@
|
|||||||
|
|
||||||
.category-input {
|
.category-input {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1 0 35%;
|
flex: 1 0 40%;
|
||||||
|
max-width: 40%;
|
||||||
margin: 0 0 5px 10px;
|
margin: 0 0 5px 10px;
|
||||||
@media screen and (max-width: 955px) {
|
@media screen and (max-width: 955px) {
|
||||||
flex: 1 0 100%;
|
flex: 1 0 100%;
|
||||||
@ -228,15 +228,42 @@
|
|||||||
.category-chooser {
|
.category-chooser {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1 0 auto;
|
flex: 1 0 auto;
|
||||||
|
max-width: 100%;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
.select-kit-header {
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
// below needed for text-overflow: ellipsis;
|
||||||
|
.selected-name {
|
||||||
|
max-width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
.name {
|
||||||
|
max-width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
.badge-wrapper {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
// This prevents the first category from being too-truncated at the expense of a long subcategory
|
||||||
|
.badge-wrapper:first-of-type:not(:last-of-type) {
|
||||||
|
flex: 1 0 auto;
|
||||||
|
max-width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.with-tags {
|
.with-tags {
|
||||||
|
.title-and-category {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
.category-input {
|
.category-input {
|
||||||
flex-basis: 25%;
|
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-right: 5px;
|
min-width: 0; // allows flex to shrink
|
||||||
|
flex-wrap: wrap;
|
||||||
|
max-width: 50%;
|
||||||
@media screen and (max-width: 920px) {
|
@media screen and (max-width: 920px) {
|
||||||
flex-basis: 100%;
|
flex-basis: 100%;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
@ -256,20 +283,17 @@
|
|||||||
#reply-title {
|
#reply-title {
|
||||||
margin: 0 0 5px 0;
|
margin: 0 0 5px 0;
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
|
width: unset;
|
||||||
&:focus {
|
&:focus {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mini-tag-chooser {
|
.mini-tag-chooser {
|
||||||
flex: 1 1 25%;
|
width: 49%;
|
||||||
margin: 0 0 5px 0;
|
margin: 0 0 5px auto;
|
||||||
background: var(--secondary);
|
background: var(--secondary);
|
||||||
z-index: z("composer", "dropdown");
|
z-index: z("composer", "dropdown");
|
||||||
@media all and (max-width: 900px) {
|
|
||||||
margin: 0;
|
|
||||||
flex: 1 1 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-tip {
|
.popup-tip {
|
||||||
@ -509,3 +533,11 @@ body:not(.ios-safari-composer-hacks) {
|
|||||||
padding-bottom: var(--composer-ipad-padding);
|
padding-bottom: var(--composer-ipad-padding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.show-preview {
|
||||||
|
@media screen and (max-width: 850px) {
|
||||||
|
.d-editor-button-bar {
|
||||||
|
font-size: $font-down-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -21,9 +21,10 @@
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
max-width: 250px;
|
max-width: 250px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
white-space: nowrap;
|
@include ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,10 +24,14 @@
|
|||||||
.select-kit.is-expanded {
|
.select-kit.is-expanded {
|
||||||
z-index: z("composer", "dropdown") + 1;
|
z-index: z("composer", "dropdown") + 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.category-input {
|
.d-editor-textarea-wrapper {
|
||||||
margin-left: 10px;
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.d-editor-button-bar {
|
||||||
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-title {
|
.edit-title {
|
||||||
@ -45,9 +49,6 @@
|
|||||||
.with-tags {
|
.with-tags {
|
||||||
.d-editor-preview-wrapper {
|
.d-editor-preview-wrapper {
|
||||||
margin-top: -77px;
|
margin-top: -77px;
|
||||||
@media screen and (max-width: 900px) {
|
|
||||||
margin-top: -105px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -184,25 +184,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.with-tags {
|
.with-tags {
|
||||||
.category-input {
|
|
||||||
flex: 1 0 0px;
|
|
||||||
margin: 0;
|
|
||||||
width: 45%;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mini-tag-chooser {
|
.mini-tag-chooser {
|
||||||
width: 50%;
|
|
||||||
flex: 1 0 0px;
|
|
||||||
margin-left: 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
z-index: z("base");
|
z-index: z("base");
|
||||||
}
|
}
|
||||||
|
|
||||||
.selected-name {
|
.selected-name {
|
||||||
overflow: hidden;
|
|
||||||
.name {
|
.name {
|
||||||
@include ellipsis;
|
|
||||||
font-size: $font-down-1;
|
font-size: $font-down-1;
|
||||||
.badge-wrapper {
|
.badge-wrapper {
|
||||||
font-size: $font-0;
|
font-size: $font-0;
|
||||||
@ -211,8 +198,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-input,
|
.user-selector {
|
||||||
.category-input,
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
.users-input,
|
.users-input,
|
||||||
.add-warning {
|
.add-warning {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user