Skip to content

Commit 52b657a

Browse files
authored
ui-fixes-122 (#9829)
* fix(ui): make details preview pop in dark mode add right margin and stronger dark shadow for details view on the dark mode * fix: remove extra resizers * fix(ui): show drawer only when changes exist and normalize title casing
1 parent c296368 commit 52b657a

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

apps/desktop/src/components/ChangedFiles.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
});
7474
</script>
7575

76-
<Drawer {grow} {ontoggle} {resizer} {noshrink} bottomBorder>
76+
<Drawer {grow} {ontoggle} {resizer} {noshrink} bottomBorder={changes.length > 0}>
7777
{#snippet header()}
7878
<h4 class="text-14 text-semibold truncate">{title}</h4>
7979
<div class="text-11 header-stats">

apps/desktop/src/components/StackView.svelte

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309
{@const ancestorMostConflictedCommitId = getAncestorMostConflicted(commits)?.id}
310310

311311
<ChangedFiles
312-
title="Changed Files"
312+
title="Changed files"
313313
{projectId}
314314
{stackId}
315315
draggableFiles
@@ -501,27 +501,16 @@
501501
maxWidth={RESIZER_CONFIG.panel1.maxWidth}
502502
defaultValue={RESIZER_CONFIG.panel1.defaultValue}
503503
syncName="panel1"
504+
onWidth={(newWidth) => {
505+
// Update the persisted stack width when panel1 resizer changes
506+
persistedStackWidth.set(newWidth);
507+
}}
504508
/>
505509
{/snippet}
506510
</ReduxResult>
507511
</div>
508512
</ConfigurableScrollableContainer>
509513

510-
<!-- STACK WIDTH RESIZER -->
511-
<Resizer
512-
persistId="ui-stack-width-${stackId}"
513-
viewport={stackViewEl!}
514-
zIndex="var(--z-lifted)"
515-
direction="right"
516-
minWidth={18}
517-
maxWidth={64}
518-
defaultValue={defaultStackWidth}
519-
onWidth={(newWidth) => {
520-
// Update the persisted stack width when resizer changes
521-
persistedStackWidth.set(newWidth);
522-
}}
523-
/>
524-
525514
<!-- PREVIEW -->
526515
{#if isDetailsViewOpen}
527516
<div
@@ -582,7 +571,7 @@
582571
{/if}
583572
</div>
584573

585-
<!-- DETAILS VIEW WIDTH RESIZER -->
574+
<!-- DETAILS VIEW WIDTH RESIZER - Only show when details view is open -->
586575
<Resizer
587576
viewport={compactDiv!}
588577
persistId="resizer-panel2-${stackId}"
@@ -681,13 +670,18 @@
681670
flex-shrink: 0;
682671
flex-direction: column;
683672
max-height: calc(100% - 24px);
673+
margin-right: 2px;
684674
overflow: hidden;
685675
border: 1px solid var(--clr-border-2);
686676
border-radius: var(--radius-ml);
687677
background-color: var(--clr-bg-1);
688678
box-shadow: 0 10px 30px 0 color(srgb 0 0 0 / 0.16);
689679
}
690680
681+
:global(.dark) .details-view {
682+
box-shadow: 0 10px 50px 5px color(srgb 0 0 0 / 0.5);
683+
}
684+
691685
.file-preview-section {
692686
display: flex;
693687
flex: 1;

0 commit comments

Comments
 (0)