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

Commit 55dde0a

Browse files
authored
UX: minor adjustments to search bot (#1146)
1 parent 09f4895 commit 55dde0a

File tree

7 files changed

+41
-16
lines changed

7 files changed

+41
-16
lines changed

assets/javascripts/discourse/components/ai-search-discoveries.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export default class AiSearchDiscoveries extends Component {
182182
<CookText @rawText={{this.discobotDiscoveries.discovery}} />
183183
</div>
184184
{{else}}
185-
<div class="ai-search-discoveries___discovery-preview cooked">
185+
<div class="ai-search-discoveries__discovery-preview cooked">
186186
<CookText
187187
@rawText={{this.discobotDiscoveries.discoveryPreview}}
188188
/>

assets/javascripts/discourse/connectors/full-page-search-below-search-header/ai-full-page-discobot-discoveries.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class AiFullPageDiscobotDiscoveries extends Component {
2525
class="ai-search-discoveries__discoveries-title full-page-discoveries"
2626
>
2727
<span>
28-
{{icon "ai-bot"}}
28+
{{icon "discobot"}}
2929
{{i18n "discourse_ai.discobot_discoveries.main_title"}}
3030
</span>
3131

assets/javascripts/discourse/connectors/search-menu-results-type-top/ai-discobot-discoveries.gjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class AiDiscobotDiscoveries extends Component {
2020
<div class="ai-discobot-discoveries">
2121
<h3 class="ai-search-discoveries__discoveries-title">
2222
<span>
23-
{{icon "ai-bot"}}
23+
{{icon "discobot"}}
2424
{{i18n "discourse_ai.discobot_discoveries.main_title"}}
2525
</span>
2626

@@ -51,7 +51,7 @@ export default class AiDiscobotDiscoveries extends Component {
5151

5252
<AiSearchDiscoveries />
5353

54-
<h3 class="ai-discobot-discoveries__regular-results-title">
54+
<h3 class="ai-search-discoveries__regular-results-title">
5555
{{icon "bars-staggered"}}
5656
{{i18n "discourse_ai.discobot_discoveries.regular_results"}}
5757
</h3>

assets/stylesheets/modules/ai-bot/common/ai-discobot-discoveries.scss

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,34 @@
44
}
55

66
&__completion {
7-
margin: 1em 0;
7+
margin: 0;
88
}
99

1010
&__discovery-preview {
11-
@include ellipsis;
12-
max-height: 300px;
11+
height: 3.5em; // roughly the loading skeleton height
12+
overflow: hidden;
13+
position: relative;
14+
15+
&::after {
16+
content: "";
17+
position: absolute;
18+
display: block;
19+
background: linear-gradient(rgba(255, 255, 255, 0), var(--secondary));
20+
height: 50%;
21+
width: 100%;
22+
bottom: 0;
23+
}
1324
}
1425

1526
&__discoveries-title,
1627
&__regular-results-title {
1728
padding-bottom: 0.5em;
1829
border-bottom: 1px solid var(--primary-low);
30+
font-size: var(--font-0);
31+
32+
.d-icon {
33+
color: var(--primary-high);
34+
}
1935
}
2036

2137
&__discoveries-title {
@@ -27,6 +43,10 @@
2743
padding-left: 0;
2844
margin-bottom: 0.5em;
2945
}
46+
47+
.cooked p:first-child {
48+
margin-top: 0;
49+
}
3050
}
3151

3252
.ai-search-discoveries-tooltip {
@@ -38,6 +58,10 @@
3858
.fk-d-tooltip__trigger {
3959
vertical-align: middle;
4060
}
61+
62+
.d-icon {
63+
color: var(--primary-medium);
64+
}
4165
}
4266

4367
.ai-discobot-discoveries {
@@ -47,3 +71,9 @@
4771
.full-page-discoveries {
4872
padding: 1em 10%;
4973
}
74+
75+
.d-icon-discobot {
76+
// appears a little undersized next to other icons
77+
height: 1.15em;
78+
width: 1.15em;
79+
}

plugin.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ def self.public_asset_path(name)
134134
face-smile
135135
face-meh
136136
face-angry
137-
ai-bot
138137
]
139138
plugin_icons.each { |icon| register_svg_icon(icon) }
140139
end

svg-icons/ai-bot-icon.svg

Lines changed: 0 additions & 8 deletions
This file was deleted.

svg-icons/icons-sprite.svg

Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)