From f4cca17c797c2da83b9676efe43d516809b7ac12 Mon Sep 17 00:00:00 2001 From: Pavel Laptev Date: Mon, 28 Oct 2024 16:50:30 +0100 Subject: [PATCH 1/8] try the first design --- .../lib/branch/StackingSeriesHeader.svelte | 8 +++-- .../src/lib/branch/StackingStatusIcon.svelte | 31 ++++++++++++++++--- apps/desktop/src/lib/stack/StackSeries.svelte | 7 ++++- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/apps/desktop/src/lib/branch/StackingSeriesHeader.svelte b/apps/desktop/src/lib/branch/StackingSeriesHeader.svelte index b8c83d8a7a..e5a67447ca 100644 --- a/apps/desktop/src/lib/branch/StackingSeriesHeader.svelte +++ b/apps/desktop/src/lib/branch/StackingSeriesHeader.svelte @@ -30,9 +30,11 @@ interface Props { currentSeries: PatchSeries; isTopSeries: boolean; + sequanceId: number; + seqenceAmount: number; } - const { currentSeries, isTopSeries }: Props = $props(); + const { currentSeries, isTopSeries, sequanceId, seqenceAmount }: Props = $props(); let descriptionVisible = $state(false); @@ -183,7 +185,9 @@ icon={branchType === 'integrated' ? 'tick-small' : 'remote-branch-small'} iconColor="var(--clr-core-ntrl-100)" color={lineColor} - lineBottom={currentSeries.patches.length > 0} + {sequanceId} + {seqenceAmount} + lineBottom={currentSeries.patches.length > 0 || branch.series.length > 1} />
diff --git a/apps/desktop/src/lib/branch/StackingStatusIcon.svelte b/apps/desktop/src/lib/branch/StackingStatusIcon.svelte index 6e758bba64..06c149a5b6 100644 --- a/apps/desktop/src/lib/branch/StackingStatusIcon.svelte +++ b/apps/desktop/src/lib/branch/StackingStatusIcon.svelte @@ -9,6 +9,8 @@ color?: string; lineTop?: boolean; lineBottom?: boolean; + sequanceId: number; + seqenceAmount: number; } const { @@ -16,7 +18,9 @@ iconColor, color = FALLBACK_COLOR, lineTop = true, - lineBottom = true + lineBottom = true, + sequanceId, + seqenceAmount }: Props = $props(); @@ -25,8 +29,16 @@ class="stack__status--bar" style:--bg-color={lineTop ? color : 'var(--clr-transparent)'} >
+
- + {#if seqenceAmount > 1} + = 10}>{sequanceId}/{seqenceAmount} + {:else} + + {/if}
diff --git a/apps/desktop/src/lib/stack/StackSeries.svelte b/apps/desktop/src/lib/stack/StackSeries.svelte index cfbc9afd6c..e4af50d912 100644 --- a/apps/desktop/src/lib/stack/StackSeries.svelte +++ b/apps/desktop/src/lib/stack/StackSeries.svelte @@ -30,7 +30,12 @@ {/if} - + {#if currentSeries.upstreamPatches.length === 0 && currentSeries.patches.length === 0}
From a823f905609a03ea1dec88c0ea67068531db8100 Mon Sep 17 00:00:00 2001 From: Pavel Laptev Date: Mon, 28 Oct 2024 17:18:20 +0100 Subject: [PATCH 2/8] Update StackingStatusIcon.svelte --- .../src/lib/branch/StackingStatusIcon.svelte | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/apps/desktop/src/lib/branch/StackingStatusIcon.svelte b/apps/desktop/src/lib/branch/StackingStatusIcon.svelte index 06c149a5b6..f91318b5d9 100644 --- a/apps/desktop/src/lib/branch/StackingStatusIcon.svelte +++ b/apps/desktop/src/lib/branch/StackingStatusIcon.svelte @@ -1,5 +1,6 @@
@@ -31,11 +45,15 @@ style:--bg-color={lineTop ? color : 'var(--clr-transparent)'} >
- 1 ? 'Sequence number' : ''}> + 1 + ? `${branchNameType()} ${sequanceId} of ${seqenceAmount}` + : branchNameType()} + >
{#if seqenceAmount > 1} = 10}>{sequanceId}/{seqenceAmount} {:else} @@ -62,7 +80,8 @@ display: flex; align-items: center; justify-content: center; - /* width: 20px; */ + min-width: 20px; + max-width: 24px; /* height: 22px; */ padding: 4px 2px; border-radius: var(--radius-m); @@ -72,19 +91,19 @@ & .stack__status--bar { width: 2px; - height: 10px; + height: 9px; margin: 0 20px; background: var(--bg-color); } & .stack__status--sequence-label { - padding: 1px 3px 2px; + padding: 2px 3px 3px; text-align: center; line-height: 1; } & .small-sequance-label { - font-size: 9px; + font-size: 8px; } } From b1b81a84db1ee310176a6fb78b436f6b700d6b21 Mon Sep 17 00:00:00 2001 From: Pavel Laptev Date: Mon, 28 Oct 2024 22:41:51 +0100 Subject: [PATCH 4/8] added sharable CSS variable for branch line margins --- apps/desktop/src/lib/branch/StackingSeriesHeader.svelte | 2 +- apps/desktop/src/lib/branch/StackingStatusIcon.svelte | 2 +- .../src/lib/commit/StackingUpstreamCommitsAccordion.svelte | 2 +- apps/desktop/src/lib/stack/StackCurrentSeries.svelte | 1 + packages/ui/src/lib/commitLinesStacking/Cell.svelte | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/lib/branch/StackingSeriesHeader.svelte b/apps/desktop/src/lib/branch/StackingSeriesHeader.svelte index 6669400145..76e0475f33 100644 --- a/apps/desktop/src/lib/branch/StackingSeriesHeader.svelte +++ b/apps/desktop/src/lib/branch/StackingSeriesHeader.svelte @@ -311,7 +311,7 @@ .branch-action__line { min-width: 2px; - margin: 0 20px; + margin: var(--lines-inner-margin); background-color: var(--bg-color, var(--clr-border-3)); } diff --git a/apps/desktop/src/lib/branch/StackingStatusIcon.svelte b/apps/desktop/src/lib/branch/StackingStatusIcon.svelte index 9dc3930c57..014cd15338 100644 --- a/apps/desktop/src/lib/branch/StackingStatusIcon.svelte +++ b/apps/desktop/src/lib/branch/StackingStatusIcon.svelte @@ -92,7 +92,7 @@ & .stack__status--bar { width: 2px; height: 9px; - margin: 0 20px; + margin: var(--lines-inner-margin); background: var(--bg-color); } diff --git a/apps/desktop/src/lib/commit/StackingUpstreamCommitsAccordion.svelte b/apps/desktop/src/lib/commit/StackingUpstreamCommitsAccordion.svelte index 84530e1305..da1a54500c 100644 --- a/apps/desktop/src/lib/commit/StackingUpstreamCommitsAccordion.svelte +++ b/apps/desktop/src/lib/commit/StackingUpstreamCommitsAccordion.svelte @@ -95,7 +95,7 @@ & .accordion-row__line { position: relative; width: 2px; - margin: 0 20px; + margin: var(--lines-inner-margin); background-color: var(--clr-commit-upstream); --dots-y-shift: -8px; diff --git a/apps/desktop/src/lib/stack/StackCurrentSeries.svelte b/apps/desktop/src/lib/stack/StackCurrentSeries.svelte index f6f3983f49..fa43af77ba 100644 --- a/apps/desktop/src/lib/stack/StackCurrentSeries.svelte +++ b/apps/desktop/src/lib/stack/StackCurrentSeries.svelte @@ -47,6 +47,7 @@ From 541da7171ed312d0083e2d3794a5d43f3a22da44 Mon Sep 17 00:00:00 2001 From: Pavel Laptev Date: Mon, 28 Oct 2024 23:34:11 +0100 Subject: [PATCH 5/8] Update StackingStatusIcon.svelte --- .../src/lib/branch/StackingStatusIcon.svelte | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/apps/desktop/src/lib/branch/StackingStatusIcon.svelte b/apps/desktop/src/lib/branch/StackingStatusIcon.svelte index 014cd15338..12bbbccf3c 100644 --- a/apps/desktop/src/lib/branch/StackingStatusIcon.svelte +++ b/apps/desktop/src/lib/branch/StackingStatusIcon.svelte @@ -39,7 +39,7 @@ } -
+
= 10}>
{#if seqenceAmount > 1} - = 10}>{sequanceId}/{seqenceAmount}{sequanceId}/{seqenceAmount} {:else} @@ -80,9 +79,8 @@ display: flex; align-items: center; justify-content: center; - min-width: 20px; + min-width: 22px; max-width: 24px; - /* height: 22px; */ padding: 4px 2px; border-radius: var(--radius-m); background-color: var(--bg-color); @@ -102,8 +100,19 @@ line-height: 1; } - & .small-sequance-label { - font-size: 8px; + /* MODIFIER */ + + &.small-sequance-label { + margin-right: 6px; + + & .stack__status--icon { + margin-left: 4px; + max-width: none; + } + + & .stack__status--sequence-label { + font-size: 9px; + } } } From 264842171a22da7a04a87577b99ffbbe68b96d4c Mon Sep 17 00:00:00 2001 From: Pavel Laptev Date: Tue, 29 Oct 2024 00:36:50 +0100 Subject: [PATCH 6/8] styles tweak --- .../desktop/src/lib/branch/StackingStatusIcon.svelte | 12 +++++++----- apps/desktop/src/lib/stack/StackCurrentSeries.svelte | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/desktop/src/lib/branch/StackingStatusIcon.svelte b/apps/desktop/src/lib/branch/StackingStatusIcon.svelte index 12bbbccf3c..b6e3186c6b 100644 --- a/apps/desktop/src/lib/branch/StackingStatusIcon.svelte +++ b/apps/desktop/src/lib/branch/StackingStatusIcon.svelte @@ -52,7 +52,7 @@ >
{#if seqenceAmount > 1} - {sequanceId}/{seqenceAmount} {:else} @@ -79,9 +79,10 @@ display: flex; align-items: center; justify-content: center; - min-width: 22px; + margin-left: -2px; + min-width: 20px; max-width: 24px; - padding: 4px 2px; + padding: 3px 2px; border-radius: var(--radius-m); background-color: var(--bg-color); color: var(--icon-color, var(--clr-text-1)); @@ -103,15 +104,16 @@ /* MODIFIER */ &.small-sequance-label { - margin-right: 6px; + margin-right: 4px; & .stack__status--icon { margin-left: 4px; max-width: none; + width: 30px; } & .stack__status--sequence-label { - font-size: 9px; + padding: 3px; } } } diff --git a/apps/desktop/src/lib/stack/StackCurrentSeries.svelte b/apps/desktop/src/lib/stack/StackCurrentSeries.svelte index fa43af77ba..386f057812 100644 --- a/apps/desktop/src/lib/stack/StackCurrentSeries.svelte +++ b/apps/desktop/src/lib/stack/StackCurrentSeries.svelte @@ -47,7 +47,7 @@