Skip to content

Commit a83bfdc

Browse files
authored
Fix layout for direct/indirect change, fix dark theme colors for environment dropdown (#600)
1 parent 66fda53 commit a83bfdc

5 files changed

Lines changed: 38 additions & 36 deletions

File tree

web/client/src/index.css

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22
@tailwind components;
33
@tailwind utilities;
44

5+
@layer base {
6+
.scrollbar--horizontal::-webkit-scrollbar {
7+
height: 0.2rem;
8+
}
9+
10+
.scrollbar--vertical::-webkit-scrollbar {
11+
width: 0.2rem;
12+
}
13+
14+
.scrollbar::-webkit-scrollbar-track {
15+
background-color: transparent;
16+
}
17+
18+
.scrollbar::-webkit-scrollbar-thumb {
19+
background: var(--color-brand);
20+
border-radius: 1rem;
21+
}
22+
}
23+
524
@layer components {
625
.input-ring {
726
@apply ring-accent-200 ring-offset-accent-500;
@@ -259,19 +278,3 @@ html {
259278
font-weight: 900;
260279
}
261280

262-
.scrollbar--horizontal::-webkit-scrollbar {
263-
height: 0.2rem;
264-
}
265-
266-
.scrollbar--vertical::-webkit-scrollbar {
267-
width: 0.2rem;
268-
}
269-
270-
.scrollbar::-webkit-scrollbar-track {
271-
background-color: transparent;
272-
}
273-
274-
.scrollbar::-webkit-scrollbar-thumb {
275-
background: var(--color-brand);
276-
border-radius: 1rem;
277-
}

web/client/src/library/components/button/Button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ const VARIANT = new Map<ButtonVariant, string>([
7070
],
7171
[
7272
'success',
73-
'bg-success-500 hover:bg-success-600 active:bg-success-400 text-neutral-100',
73+
'border-success-500 bg-success-500 hover:bg-success-600 active:bg-success-400 text-neutral-100',
7474
],
7575
[
7676
'danger',
77-
'bg-danger-500 hover:bg-danger-600 active:bg-danger-400 text-neutral-100',
77+
'border-danger-500 bg-danger-500 hover:bg-danger-600 active:bg-danger-400 text-neutral-100',
7878
],
7979
[
8080
'warning',
81-
'bg-warning-500 hover:bg-warning-600 active:bg-warning-400 text-neutral-100',
81+
'border-warning-500 bg-warning-500 hover:bg-warning-600 active:bg-warning-400 text-neutral-100',
8282
],
8383
[
8484
'neutral',

web/client/src/library/components/ide/RunPlan.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,12 @@ function SelectEnvironemnt({
442442
>
443443
<div
444444
className={clsx(
445-
'absolute top-8 overflow-hidden shadow-lg bg-light rounded-md flex flex-col z-10',
445+
'absolute top-9 overflow-hidden shadow-xl bg-theme border-2 border-primary-20 rounded-md flex flex-col z-10',
446446
side === 'left' && 'left-0',
447447
side === 'right' && 'right-0',
448448
)}
449449
>
450-
<Menu.Items className="overflow-auto max-h-80 py-2 scrollbar scrollbar--vertical">
450+
<Menu.Items className="overflow-auto max-h-80 py-2 scrollbar scrollbar--vertical">
451451
{Array.from(environments).map(env => (
452452
<Menu.Item key={env.name}>
453453
{({ active }) => (
@@ -460,16 +460,16 @@ function SelectEnvironemnt({
460460
onSelect?.()
461461
}}
462462
className={clsx(
463-
'flex justify-between items-center px-4 py-1 text-neutral-900 cursor-pointer overflow-auto',
464-
active && 'bg-secondary-100',
463+
'flex justify-between items-center px-4 py-1 cursor-pointer overflow-auto',
464+
active && 'bg-primary-10',
465465
env === environment &&
466-
'pointer-events-none cursor-default bg-secondary-100',
466+
'pointer-events-none cursor-default bg-secondary-10',
467467
)}
468468
>
469469
<div className="flex items-start">
470470
<CheckCircleIcon
471471
className={clsx(
472-
'w-4 h-4 text-secondary-500 mt-1',
472+
'w-4 h-4 text-primary-500 mt-1',
473473
active && 'opacity-10',
474474
env !== environment && 'opacity-0',
475475
)}
@@ -479,20 +479,18 @@ function SelectEnvironemnt({
479479
<span
480480
className={clsx(
481481
'block truncate ml-2',
482-
env.isSyncronized
483-
? 'text-secondary-500'
484-
: 'text-neutral-700',
482+
env.isSyncronized && 'text-primary-500'
485483
)}
486484
>
487485
{env.name}
488486
</span>
489-
<small className="block ml-2 text-neutral-400">
487+
<small className="block ml-2">
490488
({env.type})
491489
</small>
492490
</span>
493491
{env.isDefault && (
494492
<span className="flex ml-2">
495-
<small className="text-xs text-neutral-700">
493+
<small className="text-xs text-neutral-500">
496494
Default Environment
497495
</small>
498496
</span>
@@ -503,7 +501,7 @@ function SelectEnvironemnt({
503501
<Button
504502
className="my-0 mx-0"
505503
size={EnumSize.xs}
506-
variant="alternative"
504+
variant={EnumVariant.Neutral}
507505
onClick={(e: MouseEvent) => {
508506
e.stopPropagation()
509507

web/client/src/library/components/plan/PlanChangePreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function PlanChangePreview({
3333
return (
3434
<div
3535
className={clsx(
36-
'flex flex-col rounded-md p-4 w-full',
36+
'flex flex-col rounded-md p-4 w-full overflow-auto ',
3737
type === EnumPlanChangeType.Add && 'bg-success-10',
3838
type === EnumPlanChangeType.Remove && 'bg-danger-10',
3939
type === EnumPlanChangeType.Direct && 'bg-secondary-10',

web/client/src/library/components/plan/PlanWizard.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ export default function PlanWizard({
191191
</div>
192192
)}
193193
{isModified(modified) && (
194-
<div className="flex">
194+
<>
195195
{isArrayNotEmpty(modified?.direct) && (
196196
<PlanChangePreview
197-
className="w-full mx-2"
197+
className="w-full my-2"
198198
headline="Modified Directly"
199199
type={EnumPlanChangeType.Direct}
200200
>
@@ -205,7 +205,7 @@ export default function PlanWizard({
205205
)}
206206
{isArrayNotEmpty(modified.indirect) && (
207207
<PlanChangePreview
208-
className="w-full mx-2"
208+
className="w-full my-2"
209209
headline="Modified Indirectly"
210210
type={EnumPlanChangeType.Indirect}
211211
>
@@ -216,6 +216,7 @@ export default function PlanWizard({
216216
)}
217217
{isArrayNotEmpty(modified?.metadata) && (
218218
<PlanChangePreview
219+
className="w-full my-2"
219220
headline="Modified Metadata"
220221
type={EnumPlanChangeType.Metadata}
221222
>
@@ -225,7 +226,7 @@ export default function PlanWizard({
225226
/>
226227
</PlanChangePreview>
227228
)}
228-
</div>
229+
</>
229230
)}
230231
</>
231232
) : planAction === EnumPlanAction.Running ? (

0 commit comments

Comments
 (0)