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

Commit 893fa62

Browse files
authored
UX: increase gist size, and adjust surrounding elements to accommodate (#900)
1 parent 1ad5321 commit 893fa62

File tree

2 files changed

+47
-5
lines changed

2 files changed

+47
-5
lines changed

assets/javascripts/discourse/components/ai-topic-gist.gjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Component from "@glimmer/component";
22
import { service } from "@ember/service";
3+
import bodyClass from "discourse/helpers/body-class";
34

45
export default class AiTopicGist extends Component {
56
@service router;
@@ -21,6 +22,7 @@ export default class AiTopicGist extends Component {
2122

2223
<template>
2324
{{#if this.showGist}}
25+
{{bodyClass "--topic-list-with-gist"}}
2426
<div class="ai-topic-gist">
2527
<div class="ai-topic-gist__text">
2628
{{@topic.ai_topic_gist}}

assets/stylesheets/modules/summarization/common/ai-summary.scss

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,22 +224,62 @@
224224
line-height: 1.4;
225225
width: 90%;
226226
}
227-
.desktop-view & {
228-
margin-top: 0.15em;
229-
margin-bottom: -0.15em;
230-
}
227+
231228
&__text {
232229
color: var(--primary-high);
233230
text-wrap: pretty;
234231
word-wrap: break-word;
235232
font-size: var(--font-down-1);
236-
max-width: 70ch;
233+
max-width: 65ch;
237234
.visited & {
238235
color: var(--primary-medium);
239236
}
240237
}
241238
}
242239

240+
.--topic-list-with-gist {
241+
.topic-list-item {
242+
.main-link {
243+
.desktop-view & {
244+
padding: 1em 1em 1em 0.67em;
245+
}
246+
font-size: var(--font-up-2);
247+
line-height: var(--line-height-medium);
248+
}
249+
.link-bottom-line {
250+
font-size: var(--font-down-2);
251+
margin-top: 0.25em;
252+
}
253+
.ai-topic-gist {
254+
font-size: var(--font-up-1);
255+
line-height: var(--line-height-large);
256+
margin-top: 0.25em;
257+
margin-bottom: 0.15em;
258+
}
259+
.topic-post-badges {
260+
font-size: var(--font-down-1);
261+
}
262+
}
263+
264+
.mobile-view & {
265+
.topic-list {
266+
.topic-list-item > .topic-list-data {
267+
padding: 1em 0;
268+
}
269+
.topic-item-stats .num.activity {
270+
align-self: end;
271+
margin-bottom: -0.15em; // vertical alignment
272+
}
273+
.pull-left {
274+
padding-top: 0.25em;
275+
}
276+
.right {
277+
margin-left: 3.75em;
278+
}
279+
}
280+
}
281+
}
282+
243283
.ai-gists-dropdown-trigger {
244284
font-size: var(--font-down-1);
245285
color: var(--primary-medium);

0 commit comments

Comments
 (0)