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

Commit ac705b6

Browse files
authored
UX: minor improvements to LLM page and admin tables (#1034)
1 parent a4033e2 commit ac705b6

File tree

2 files changed

+40
-18
lines changed

2 files changed

+40
-18
lines changed

assets/javascripts/discourse/components/ai-llms-list-editor.gjs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,17 @@ export default class AiLlmsListEditor extends Component {
119119
@llmTemplate={{@llmTemplate}}
120120
/>
121121
{{else}}
122+
<DPageSubheader
123+
@titleLabel={{i18n "discourse_ai.llms.short_title"}}
124+
@descriptionLabel={{i18n
125+
"discourse_ai.llms.preconfigured.description"
126+
}}
127+
@learnMoreUrl="https://meta.discourse.org/t/discourse-ai-large-language-model-llm-settings-page/319903"
128+
/>
122129
{{#if this.hasLlmElements}}
123130
<section class="ai-llms-list-editor__configured">
124131
<DPageSubheader
125132
@titleLabel={{i18n "discourse_ai.llms.configured.title"}}
126-
@descriptionLabel={{i18n
127-
"discourse_ai.llms.preconfigured.description"
128-
}}
129-
@learnMoreUrl="https://meta.discourse.org/t/discourse-ai-large-language-model-llm-settings-page/319903"
130133
/>
131134
<table class="d-admin-table">
132135
<thead>
@@ -185,18 +188,7 @@ export default class AiLlmsListEditor extends Component {
185188
</section>
186189
{{/if}}
187190
<section class="ai-llms-list-editor__templates">
188-
<DPageSubheader
189-
@titleLabel={{i18n this.preconfiguredTitle}}
190-
@descriptionLabel={{unless
191-
this.hasLlmElements
192-
(i18n "discourse_ai.llms.preconfigured.description")
193-
}}
194-
@learnMoreUrl={{unless
195-
this.hasLlmElements
196-
"https://meta.discourse.org/t/discourse-ai-large-language-model-llm-settings-page/319903"
197-
}}
198-
/>
199-
191+
<DPageSubheader @titleLabel={{i18n this.preconfiguredTitle}} />
200192
<AdminSectionLandingWrapper
201193
class="ai-llms-list-editor__templates-list"
202194
>

assets/stylesheets/modules/llms/common/ai-llms-editor.scss

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
margin: 0 0 1em 0;
77
}
88

9-
&__configured + &__templates {
10-
margin-top: 3em;
9+
&__configured,
10+
&__templates {
11+
margin-top: 2em;
1112
}
1213
}
1314

@@ -66,12 +67,41 @@
6667
}
6768
}
6869

70+
.ai-llms-list-editor__configured,
71+
.ai-llms-list-editor__templates {
72+
h2 {
73+
font-size: var(--font-up-1);
74+
}
75+
}
76+
6977
.ai-llms-list-editor__configured {
7078
.d-toggle-switch {
7179
justify-content: center;
7280
}
7381
}
7482

83+
.ai-tool-list-editor__current,
84+
.ai-persona-list-editor__current,
85+
.ai-llms-list-editor__configured {
86+
.d-admin-table {
87+
tr:hover {
88+
background: inherit;
89+
}
90+
th,
91+
td {
92+
&:first-child {
93+
padding-left: 0;
94+
}
95+
}
96+
th,
97+
td {
98+
&:last-child {
99+
padding-right: 0;
100+
}
101+
}
102+
}
103+
}
104+
75105
.ai-llms-list-editor__templates {
76106
&-list {
77107
display: grid;

0 commit comments

Comments
 (0)