Skip to content

Commit 270de58

Browse files
committed
Update dropdown label font size, fix strict equality checks, and enhance footer button compacting behavior
1 parent b311dcc commit 270de58

4 files changed

Lines changed: 19 additions & 7 deletions

File tree

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
white-space: nowrap;
3131
flex-grow: 1;
3232
text-align: left;
33-
font-size: 13px;
3433
}
3534

3635
&__info {

‎packages/vscode/src/views/panel/backend/message-handlers/handle-send-prompt.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const handle_send_prompt = async (params: {
3434
show_quick_pick?: boolean
3535
}): Promise<void> => {
3636
if (
37-
params.panel_provider.mode === MODE.WEB &&
37+
params.panel_provider.mode == MODE.WEB &&
3838
!params.panel_provider.websocket_server_instance.is_connected_with_browser()
3939
) {
4040
vscode.window.showWarningMessage(

‎packages/vscode/src/views/panel/frontend/components/Layout/Footer/Footer.tsx‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,15 @@ export const Footer: React.FC<Props> = ({ on_donate_click }) => {
8484
<div ref={right_ref}>
8585
<button
8686
className={cn(styles['footer__action-button'], {
87-
[styles['footer__action-button--compact']]: compact_step >= 3
87+
[styles['footer__action-button--compact']]: compact_step >= 4
8888
})}
8989
onClick={handle_apply_click}
9090
title={'Integrate copied chat response or a single code block'}
9191
disabled={is_apply_disabled_temporarily}
9292
>
93-
<span className={styles['footer__action-button__text']}>Apply</span>
93+
<span className={styles['footer__action-button__text']}>
94+
{compact_step == 0 ? 'Apply from Clipboard' : 'Apply'}
95+
</span>
9496
<span
9597
className={cn(
9698
styles['footer__action-button__icon'],
@@ -101,7 +103,7 @@ export const Footer: React.FC<Props> = ({ on_donate_click }) => {
101103
</button>
102104
<button
103105
className={cn(styles['footer__action-button'], {
104-
[styles['footer__action-button--compact']]: compact_step >= 2
106+
[styles['footer__action-button--compact']]: compact_step >= 3
105107
})}
106108
onClick={on_undo_click}
107109
title={
@@ -120,7 +122,7 @@ export const Footer: React.FC<Props> = ({ on_donate_click }) => {
120122
</button>
121123
<button
122124
className={cn(styles['footer__action-button'], {
123-
[styles['footer__action-button--compact']]: compact_step >= 1
125+
[styles['footer__action-button--compact']]: compact_step >= 2
124126
})}
125127
onClick={handle_commit_click}
126128
title={

‎packages/vscode/src/views/panel/frontend/components/Layout/Footer/use-compacting.ts‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ export const use_compacting = () => {
99
step0: number
1010
step1: number
1111
step2: number
12-
}>({ step0: 0, step1: 0, step2: 0 })
12+
step3: number
13+
}>({ step0: 0, step1: 0, step2: 0, step3: 0 })
1314

1415
useLayoutEffect(() => {
1516
if (left_ref.current && right_ref.current) {
@@ -22,6 +23,8 @@ export const use_compacting = () => {
2223
set_thresholds((prev) => ({ ...prev, step1: width }))
2324
else if (compact_step == 2)
2425
set_thresholds((prev) => ({ ...prev, step2: width }))
26+
else if (compact_step == 3)
27+
set_thresholds((prev) => ({ ...prev, step3: width }))
2528
}
2629
}, [compact_step])
2730

@@ -34,6 +37,8 @@ export const use_compacting = () => {
3437
set_compact_step(1)
3538
} else if (thresholds.step2 && width >= thresholds.step2) {
3639
set_compact_step(2)
40+
} else if (thresholds.step3 && width >= thresholds.step3) {
41+
set_compact_step(3)
3742
} else if (thresholds.step0 && width < thresholds.step0) {
3843
if (compact_step == 0) set_compact_step(1)
3944
else if (
@@ -48,6 +53,12 @@ export const use_compacting = () => {
4853
width < thresholds.step2
4954
)
5055
set_compact_step(3)
56+
else if (
57+
compact_step == 3 &&
58+
thresholds.step3 &&
59+
width < thresholds.step3
60+
)
61+
set_compact_step(4)
5162
}
5263
})
5364
if (container_ref.current) observer.observe(container_ref.current)

0 commit comments

Comments
 (0)