Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 625fd06

Browse files
authored
UX: improve layout of inline title editing buttons (#1000)
1 parent b32b1cf commit 625fd06

File tree

4 files changed

+47
-9
lines changed

4 files changed

+47
-9
lines changed

assets/javascripts/discourse/components/suggestion-menus/ai-category-suggester.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default class AiCategorySuggester extends Component {
115115
@icon={{this.triggerIcon}}
116116
@identifier="ai-category-suggester"
117117
@onClose={{this.onClose}}
118-
@triggerClass="suggestion-button suggest-category-button {{if
118+
@triggerClass="btn-transparent suggestion-button suggest-category-button {{if
119119
this.loading
120120
'is-loading'
121121
}}"

assets/javascripts/discourse/components/suggestion-menus/ai-tag-suggester.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export default class AiTagSuggester extends Component {
180180
@icon={{this.triggerIcon}}
181181
@identifier="ai-tag-suggester"
182182
@onClose={{this.onClose}}
183-
@triggerClass="suggestion-button suggest-tags-button {{if
183+
@triggerClass="btn-transparent suggestion-button suggest-tags-button {{if
184184
this.loading
185185
'is-loading'
186186
}}"

assets/javascripts/discourse/components/suggestion-menus/ai-title-suggester.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export default class AiTitleSuggester extends Component {
117117
@icon={{this.triggerIcon}}
118118
@identifier="ai-title-suggester"
119119
@onClose={{this.onClose}}
120-
@triggerClass="suggestion-button suggest-titles-button {{if
120+
@triggerClass="btn-transparent suggestion-button suggest-titles-button {{if
121121
this.loading
122122
'is-loading'
123123
}}"

assets/stylesheets/modules/ai-helper/common/ai-helper.scss

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,30 @@
209209
border-bottom-right-radius: 0;
210210
}
211211
}
212+
213+
#edit-title {
214+
padding-right: 2em;
215+
}
216+
217+
.category-chooser {
218+
.select-kit-header-wrapper {
219+
padding-right: 1.5em;
220+
}
221+
}
222+
223+
.mini-tag-chooser {
224+
.multi-select-header {
225+
padding-right: 2em;
226+
}
227+
}
228+
229+
.select-kit.is-expanded {
230+
// need to raise the z-index so the sibling input buttons don't cover the dropdown
231+
z-index: z("dropdown") + 1;
232+
+ button {
233+
z-index: z("dropdown") + 1;
234+
}
235+
}
212236
}
213237

214238
.suggestion-button {
@@ -217,15 +241,23 @@
217241
}
218242
}
219243

244+
.edit-title__wrapper,
245+
.edit-category__wrapper,
246+
.edit-tags__wrapper {
247+
position: relative;
248+
}
249+
220250
.suggest-titles-button,
221251
.suggest-tags-button,
222252
.suggest-category-button {
223-
align-self: baseline;
224-
border: 1px solid var(--primary-400);
225-
border-left: none;
226-
background: none;
227-
border-top-left-radius: 0;
228-
border-bottom-left-radius: 0;
253+
position: absolute;
254+
right: 0;
255+
top: 1px; // container border width
256+
z-index: z("dropdown");
257+
258+
#reply-control & {
259+
z-index: z("composer", "dropdown") + 1;
260+
}
229261
}
230262

231263
.ai-category-suggester-content,
@@ -319,6 +351,12 @@
319351
}
320352
}
321353
}
354+
355+
.showing-ai-suggestions {
356+
#reply-title {
357+
padding-right: 2em;
358+
}
359+
}
322360
}
323361

324362
.suggest-tags-button + .ai-suggestions-menu {

0 commit comments

Comments
 (0)