Skip to content

Commit 3e904e8

Browse files
committed
Hide main prompt slot when secondary views are active and update UI component styles
- because the first slot is shown unconditionally, it should have 'visibility: hidden' set whenever there is other slot on top
1 parent 8b65948 commit 3e904e8

4 files changed

Lines changed: 27 additions & 13 deletions

File tree

‎apps/editor/src/views/prompt/frontend/Prompt.module.scss‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
> * {
99
pointer-events: all;
1010
}
11+
12+
&--hidden {
13+
visibility: hidden;
14+
}
1115
}
1216

1317
.content {

‎apps/editor/src/views/prompt/frontend/Prompt.tsx‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,20 @@ export const Prompt = () => {
252252
!!items_in_preview ||
253253
active_view != 'main'
254254

255+
const is_main_slot_hidden =
256+
!!updating_web_configuration ||
257+
!!updating_api_configuration ||
258+
viewing_donations ||
259+
!!items_in_preview
260+
255261
return (
256262
<LayoutContext.Provider value={layout_context_value}>
257263
<div data-modern-ui={is_modern_ui}>
258-
<div className={styles.slot}>
264+
<div
265+
className={cn(styles.slot, {
266+
[styles['slot--hidden']]: is_main_slot_hidden
267+
})}
268+
>
259269
<Layout on_history_click={handle_history_click}>
260270
<div
261271
className={cn(styles.content, {

‎packages/ui/src/components/editor/prompt/Page/Page.module.scss‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
display: flex;
33
flex-direction: column;
44
height: 100%;
5-
background-color: var(--vscode-sideBar-background);
65
position: relative;
76
}
87

‎packages/ui/src/components/editor/prompt/StatusBar/StatusBar.module.scss‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
color: var(--cwc-yellow-foreground);
3939
background: linear-gradient(
4040
45deg,
41-
var(--cwc-yellow-background) 10px,
42-
var(--cwc-bg-tertiary) 40px
41+
var(--cwc-yellow-background) 40px,
42+
var(--cwc-bg-tertiary) 140px
4343
);
4444
--theme-description-color: var(--cwc-yellow-foreground-dimmed);
4545
}
@@ -48,8 +48,8 @@
4848
color: var(--cwc-green-foreground);
4949
background: linear-gradient(
5050
45deg,
51-
var(--cwc-green-background) 10px,
52-
var(--cwc-bg-tertiary) 40px
51+
var(--cwc-green-background) 40px,
52+
var(--cwc-bg-tertiary) 140px
5353
);
5454
--theme-description-color: var(--cwc-green-foreground-dimmed);
5555
}
@@ -58,8 +58,8 @@
5858
color: var(--cwc-red-foreground);
5959
background: linear-gradient(
6060
45deg,
61-
var(--cwc-red-background) 10px,
62-
var(--cwc-bg-tertiary) 40px
61+
var(--cwc-red-background) 40px,
62+
var(--cwc-bg-tertiary) 140px
6363
);
6464
--theme-description-color: var(--cwc-red-foreground-dimmed);
6565
}
@@ -68,8 +68,8 @@
6868
color: var(--cwc-blue-foreground);
6969
background: linear-gradient(
7070
45deg,
71-
var(--cwc-blue-background) 10px,
72-
var(--cwc-bg-tertiary) 40px
71+
var(--cwc-blue-background) 40px,
72+
var(--cwc-bg-tertiary) 140px
7373
);
7474
--theme-description-color: var(--cwc-blue-foreground-dimmed);
7575
}
@@ -78,8 +78,8 @@
7878
color: var(--cwc-purple-foreground);
7979
background: linear-gradient(
8080
45deg,
81-
var(--cwc-purple-background) 10px,
82-
var(--cwc-bg-tertiary) 40px
81+
var(--cwc-purple-background) 40px,
82+
var(--cwc-bg-tertiary) 140px
8383
);
8484
--theme-description-color: var(--cwc-purple-foreground-dimmed);
8585
}
@@ -134,9 +134,10 @@
134134
cursor: pointer;
135135
white-space: nowrap;
136136
padding: 0 7px 0 4px;
137-
color: var(--vscode-textLink-foreground);
137+
color: var(--cwc-text-color-dimmed);
138138

139139
&:hover {
140+
color: var(--cwc-text-color);
140141
background-color: var(--cwc-bg-tertiary);
141142
}
142143
}

0 commit comments

Comments
 (0)