FIX: AI Helper UX bugs (#223)

This commit is contained in:
Keegan George 2023-09-13 09:53:19 -07:00 committed by GitHub
parent cdd6faa648
commit cf6a6ed9b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 5 deletions

View File

@ -121,7 +121,7 @@ export default class AiHelperContextMenu extends Component {
)
: "";
if (this.selectedText.length === 0) {
if (this.selectedText?.length === 0) {
this.closeContextMenu();
return;
}

View File

@ -206,11 +206,18 @@
// Suggest Titles Related
.suggest-titles-button {
position: absolute;
top: 1px;
right: 1px;
display: block;
align-self: baseline;
background: var(--secondary);
border: none;
border: 1px solid var(--primary-medium);
border-left: none;
}
.title-input:has(.suggestion-button) {
// border on focus should be on top of suggestion button
input:focus {
z-index: 1;
}
}
.suggestion-button {
@ -249,6 +256,21 @@
position: relative;
}
// Prevent suggestion button from wrapping on smaller screens
@media screen and (max-width: 768px) {
#reply-control {
.category-input:has(.suggestion-button) {
.category-chooser {
width: 10px;
}
+ .mini-tag-chooser {
width: 10px;
}
}
}
}
.suggest-tags-button + .ai-suggestions-menu {
top: 4.25rem;
}