Skip to content

Commit d8d501d

Browse files
committed
Update UI text, layout, and overflow handling for settings and prompt field components
1 parent 39ee36c commit d8d501d

5 files changed

Lines changed: 14 additions & 6 deletions

File tree

‎apps/editor/src/views/settings/backend/message-handlers/handle-upsert-model-provider.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ export const handle_upsert_model_provider = async (params: {
403403
quick_pick.items = items
404404
quick_pick.title = 'Add New Model Provider'
405405
quick_pick.placeholder =
406-
'Choose a predefined provider or create a custom one'
406+
'Choose a predefined provider or add a custom endpoint'
407407

408408
return new Promise((resolve) => {
409409
quick_pick.onDidAccept(() => {

‎packages/ui/src/components/editor/panel/PromptField/PromptField.module.scss‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@
291291
.footer {
292292
display: flex;
293293
padding: 6px 10px 6px 6px;
294+
gap: 5px;
294295
justify-content: space-between;
295296
position: relative;
296297

‎packages/ui/src/components/editor/panel/PromptField/hooks/use-edit-format-compacting.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,12 @@ export const use_edit_format_compacting = () => {
1717
]
1818

1919
if (refs.every((ref) => ref.current)) {
20-
// Calculate total width of all elements
2120
const total_width = refs.reduce(
2221
(acc, ref) => acc + (ref.current?.getBoundingClientRect().width || 0),
2322
0
2423
)
25-
// Add gap (4px * 3 gaps)
26-
const width = total_width
2724

28-
report_width(width, compact_step)
25+
report_width(total_width, compact_step)
2926
}
3027
}, [compact_step, report_width])
3128

‎packages/ui/src/components/editor/settings/Section/Section.module.scss‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
display: flex;
5454
flex-direction: column;
5555
gap: 4px;
56+
overflow: hidden;
5657
}
5758

5859
&__group {
@@ -64,10 +65,16 @@
6465
margin: 0;
6566
font-size: 20px;
6667
font-weight: 600;
68+
white-space: nowrap;
69+
overflow: hidden;
70+
text-overflow: ellipsis;
6771
}
6872

6973
&__subtitle {
7074
color: var(--cwc-text-secondary);
7175
font-size: 14px;
76+
white-space: nowrap;
77+
overflow: hidden;
78+
text-overflow: ellipsis;
7279
}
7380
}

‎packages/ui/src/components/editor/settings/Section/Section.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ export const Section = forwardRef<HTMLDivElement, Props>((props, ref) => {
9292
>
9393
<div className={styles.header__marker} ref={marker_ref} />
9494
<div className={styles.header__top}>
95-
<div className={styles.header__content}>
95+
<div
96+
className={styles.header__content}
97+
title={`${props.title}—${props.subtitle}`}
98+
>
9699
<div className={styles.header__title}>
97100
{props.group && (
98101
<span className={styles.header__group}>{props.group}: </span>

0 commit comments

Comments
 (0)