Skip to content

Commit 7c81a88

Browse files
committed
Refactor the Dropdown component to remove mouse enter/leave behavior and fix a misleading description in the settings UI
1 parent 12081dc commit 7c81a88

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

  • packages

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ export const Dropdown = <T extends string>(props: Dropdown.Props<T>) => {
2929
)
3030

3131
const handle_toggle = () => {
32-
// if dropdown is open, clicking it should not close it
33-
if (is_open) {
34-
return
35-
}
3632
set_is_open(true)
3733
set_just_opened(true)
3834
}
@@ -66,13 +62,6 @@ export const Dropdown = <T extends string>(props: Dropdown.Props<T>) => {
6662
props.on_change(props.options[next_index].value)
6763
}
6864

69-
const handle_mouse_enter = () => {
70-
if (!is_open) {
71-
set_just_opened(true)
72-
}
73-
set_is_open(true)
74-
}
75-
7665
const handle_mouse_leave = () => {
7766
set_is_open(false)
7867
set_just_opened(false)
@@ -100,7 +89,6 @@ export const Dropdown = <T extends string>(props: Dropdown.Props<T>) => {
10089
className={cn(styles.container, { [styles['button--open']]: is_open })}
10190
ref={container_ref}
10291
onWheel={handle_wheel}
103-
onMouseEnter={handle_mouse_enter}
10492
onMouseLeave={handle_mouse_leave}
10593
>
10694
<button

‎packages/vscode/src/views/settings/frontend/Home/Home.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ export const Home: React.FC<Props> = (props) => {
462462
/>
463463
<Item
464464
title="Modal Duration"
465-
description="Automatically accept the generated commit message after a specified number of seconds. Set 0 to disable the modal."
465+
description="Automatically accept the generated commit message after a specified number of seconds. Set 0 to auto-accept generated summaries."
466466
slot={
467467
<Input
468468
type="number"

0 commit comments

Comments
 (0)