Skip to content

Commit 68c255d

Browse files
committed
Implement and refine tooltips for mode selection dropdowns and chat input format buttons
1 parent 76be676 commit 68c255d

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/ui/src/components/editor/panel/ChatInput/ChatInput.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export const ChatInput: React.FC<ChatInputProps> = (props) => {
238238
]]: props.edit_format == format
239239
}
240240
)}
241-
title={props.edit_format_instructions?.[format]}
241+
title={`Edit format instructions: ${props.edit_format_instructions?.[format]}`}
242242
onClick={() => props.on_edit_format_change?.(format)}
243243
data-text={format}
244244
>

‎packages/ui/src/components/editor/panel/Dropdown/Dropdown.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export namespace Dropdown {
1414
on_change: (value: T) => void
1515
max_width?: number
1616
info?: string
17+
title?: string
1718
}
1819
}
1920

@@ -93,6 +94,7 @@ export const Dropdown = <T extends string>(props: Dropdown.Props<T>) => {
9394
className={cn(styles.button, { [styles['button--open']]: is_open })}
9495
onClick={handle_toggle}
9596
style={{ maxWidth: props.max_width }}
97+
title={props.title}
9698
>
9799
<span className={styles.button__label}>
98100
{selected_option ? selected_option.label : 'Select an option'}

‎packages/vscode/src/views/panel/frontend/Main/MainView/components/Header/Header.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export const Header: React.FC<Props> = (props) => {
9393
on_change={props.on_web_mode_change}
9494
info="shift+tab"
9595
max_width={dropdown_max_width}
96+
title="The mode influences the structure of the message"
9697
/>
9798
)}
9899
{props.home_view_type == HOME_VIEW_TYPES.API && (
@@ -104,6 +105,7 @@ export const Header: React.FC<Props> = (props) => {
104105
on_change={props.on_api_mode_change}
105106
info="shift+tab"
106107
max_width={dropdown_max_width}
108+
title="The mode influences the structure of the message"
107109
/>
108110
)}
109111
</div>

0 commit comments

Comments
 (0)