Skip to content

Commit efbbb7d

Browse files
committed
Refactor workspace dropdown styles in Home component and disable pointer events on prompt slot
1 parent a28da2b commit efbbb7d

3 files changed

Lines changed: 19 additions & 18 deletions

File tree

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

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -162,36 +162,34 @@
162162
position: relative;
163163
display: flex;
164164
align-items: center;
165-
height: 24px;
166165
min-width: 0;
167-
margin-right: 2px;
168166

169-
&-button {
167+
&__button {
170168
cursor: pointer;
171169
display: flex;
172170
align-items: center;
173-
gap: 4px;
171+
gap: 2px;
174172
color: var(--vscode-descriptionForeground);
175-
font-size: 11px;
176173
min-width: 0;
177-
padding: 2px 4px;
174+
padding: 2px 4px 2px 5px;
178175
border-radius: 5px;
179176

180177
&:hover {
181178
background-color: var(--vscode-toolbar-hoverBackground);
182179
color: var(--vscode-icon-foreground);
183180
}
184-
}
185181

186-
&-text {
187-
overflow: hidden;
188-
text-overflow: ellipsis;
189-
white-space: nowrap;
190-
}
182+
&__text {
183+
font-size: 12px;
184+
overflow: hidden;
185+
text-overflow: ellipsis;
186+
white-space: nowrap;
187+
}
191188

192-
&-icon {
193-
font-size: 12px;
194-
flex-shrink: 0;
189+
&__icon {
190+
font-size: 12px !important;
191+
flex-shrink: 0;
192+
}
195193
}
196194
}
197195

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export const Home: React.FC<Props> = (props) => {
253253
{roots.length > 1 && (
254254
<div className={styles['inner__workspace-dropdown']}>
255255
<div
256-
className={styles['inner__workspace-dropdown-button']}
256+
className={styles['inner__workspace-dropdown__button']}
257257
onClick={(e) => {
258258
e.stopPropagation()
259259
post_message(props.vscode, {
@@ -265,14 +265,16 @@ export const Home: React.FC<Props> = (props) => {
265265
title={t('home.folder')}
266266
>
267267
<span
268-
className={styles['inner__workspace-dropdown-text']}
268+
className={
269+
styles['inner__workspace-dropdown__button__text']
270+
}
269271
>
270272
{active_root?.split(/[\\/]/).pop() || active_root}
271273
</span>
272274
<span
273275
className={cn(
274276
'codicon codicon-unfold',
275-
styles['inner__workspace-dropdown-icon']
277+
styles['inner__workspace-dropdown__button__icon']
276278
)}
277279
/>
278280
</div>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
z-index: 1;
88
height: 100vh;
99
width: 100%;
10+
pointer-events: none;
1011
}
1112

1213
.content {

0 commit comments

Comments
 (0)