UX: improve layout of inline title editing buttons (#1000)

This commit is contained in:
Kris 2024-12-04 17:04:26 -05:00 committed by GitHub
parent b32b1cf241
commit 625fd06744
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 47 additions and 9 deletions

View File

@ -115,7 +115,7 @@ export default class AiCategorySuggester extends Component {
@icon={{this.triggerIcon}}
@identifier="ai-category-suggester"
@onClose={{this.onClose}}
@triggerClass="suggestion-button suggest-category-button {{if
@triggerClass="btn-transparent suggestion-button suggest-category-button {{if
this.loading
'is-loading'
}}"

View File

@ -180,7 +180,7 @@ export default class AiTagSuggester extends Component {
@icon={{this.triggerIcon}}
@identifier="ai-tag-suggester"
@onClose={{this.onClose}}
@triggerClass="suggestion-button suggest-tags-button {{if
@triggerClass="btn-transparent suggestion-button suggest-tags-button {{if
this.loading
'is-loading'
}}"

View File

@ -117,7 +117,7 @@ export default class AiTitleSuggester extends Component {
@icon={{this.triggerIcon}}
@identifier="ai-title-suggester"
@onClose={{this.onClose}}
@triggerClass="suggestion-button suggest-titles-button {{if
@triggerClass="btn-transparent suggestion-button suggest-titles-button {{if
this.loading
'is-loading'
}}"

View File

@ -209,6 +209,30 @@
border-bottom-right-radius: 0;
}
}
#edit-title {
padding-right: 2em;
}
.category-chooser {
.select-kit-header-wrapper {
padding-right: 1.5em;
}
}
.mini-tag-chooser {
.multi-select-header {
padding-right: 2em;
}
}
.select-kit.is-expanded {
// need to raise the z-index so the sibling input buttons don't cover the dropdown
z-index: z("dropdown") + 1;
+ button {
z-index: z("dropdown") + 1;
}
}
}
.suggestion-button {
@ -217,15 +241,23 @@
}
}
.edit-title__wrapper,
.edit-category__wrapper,
.edit-tags__wrapper {
position: relative;
}
.suggest-titles-button,
.suggest-tags-button,
.suggest-category-button {
align-self: baseline;
border: 1px solid var(--primary-400);
border-left: none;
background: none;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
position: absolute;
right: 0;
top: 1px; // container border width
z-index: z("dropdown");
#reply-control & {
z-index: z("composer", "dropdown") + 1;
}
}
.ai-category-suggester-content,
@ -319,6 +351,12 @@
}
}
}
.showing-ai-suggestions {
#reply-title {
padding-right: 2em;
}
}
}
.suggest-tags-button + .ai-suggestions-menu {