From e1377ed24587e40f8593b7cfd48b9140406f194b Mon Sep 17 00:00:00 2001 From: Georgios Jason Efstathiou Date: Tue, 26 Sep 2023 14:03:26 +0200 Subject: [PATCH 01/10] feat: hide splitting % in claim flow if zero --- .../flows/collect-flow/collect-amounts.svelte | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/lib/flows/collect-flow/collect-amounts.svelte b/src/lib/flows/collect-flow/collect-amounts.svelte index f84fa6160..8091b9de0 100644 --- a/src/lib/flows/collect-flow/collect-amounts.svelte +++ b/src/lib/flows/collect-flow/collect-amounts.svelte @@ -293,19 +293,22 @@ disabled: balances.splittable === 0n, } : undefined, - { - title: `Splitting ${getSplitPercent(1000000n - ownSplitsWeight, 'pretty')}`, - value: - (squeezeEnabled ? '≈ ' : '') + - formatTokenAmount( - makeAmount(collectableAfterSplit - splittableAfterReceive), - selectedToken.decimals, - 1n, - ), - disabled: - ownSplitsWeight === 1000000n || collectableAfterSplit - splittableAfterReceive === 0n, - symbol: selectedToken.symbol, - }, + ownSplitsWeight < 1000000n + ? { + title: `Splitting ${getSplitPercent(1000000n - ownSplitsWeight, 'pretty')}`, + value: + (squeezeEnabled ? '≈ ' : '') + + formatTokenAmount( + makeAmount(collectableAfterSplit - splittableAfterReceive), + selectedToken.decimals, + 1n, + ), + disabled: + ownSplitsWeight === 1000000n || + collectableAfterSplit - splittableAfterReceive === 0n, + symbol: selectedToken.symbol, + } + : undefined, balances.collectable !== 0n ? { title: `Previously-split funds`, From 5c2c4be87a3ebe6a5289a5caee21e2dfa4117573 Mon Sep 17 00:00:00 2001 From: Georgios Jason Efstathiou Date: Tue, 26 Sep 2023 14:05:28 +0200 Subject: [PATCH 02/10] docs: clarifying comment --- src/lib/flows/collect-flow/collect-amounts.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/flows/collect-flow/collect-amounts.svelte b/src/lib/flows/collect-flow/collect-amounts.svelte index 8091b9de0..46e28896a 100644 --- a/src/lib/flows/collect-flow/collect-amounts.svelte +++ b/src/lib/flows/collect-flow/collect-amounts.svelte @@ -293,6 +293,12 @@ disabled: balances.splittable === 0n, } : undefined, + /* + It used to be possible to set splits for your own AddressDriver account in the Drips App. + Even though it's no longer possible to do so, maybe some old account still has splits set, + or maybe the user manually configured splits outside the app. For this reason, we display + the splitting percentage while collecting, but only if it's more than 0%. + */ ownSplitsWeight < 1000000n ? { title: `Splitting ${getSplitPercent(1000000n - ownSplitsWeight, 'pretty')}`, From 6d63f28c72463e937554ddbc5cdd1efad2f9a891 Mon Sep 17 00:00:00 2001 From: Georgios Jason Efstathiou Date: Tue, 26 Sep 2023 14:20:18 +0200 Subject: [PATCH 03/10] feat: simplified collect screen --- .../flows/collect-flow/collect-amounts.svelte | 76 ++++++++++--------- 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/src/lib/flows/collect-flow/collect-amounts.svelte b/src/lib/flows/collect-flow/collect-amounts.svelte index 46e28896a..ea5305fe2 100644 --- a/src/lib/flows/collect-flow/collect-amounts.svelte +++ b/src/lib/flows/collect-flow/collect-amounts.svelte @@ -224,9 +224,9 @@

- Tokens streamed to your account automatically become receivable on a weekly cycle. Your - receivable balance updates next on {formatDate(currentCycleEnd)}{formatDate(currentCycleEnd, 'onlyDay')}.

Learn more
-
- -

- Select which senders from the current cycle you would like to collect from. The network fee - for collecting increases with each selected sender. -

- - The amounts shown below are estimated based on your system time so the value you collect may - slightly differ. - -
- -
-
-
+ {#if incomingEstimatesBySender.length > 0} +
+ +

+ You may collect stream income from specific senders already before the current cycle + concludes, but the network fee for collecting increases with each selected sender. +

+ + The amounts shown below are estimated based on your system time so the value you collect + may slightly differ. + +
+ +
+
+
+ {/if} 0n + ? { + title: `${selectedToken.symbol} streamed in concluded cycles`, + subtitle: 'From incoming streams', + value: formatTokenAmount( + makeAmount(balances.receivable), + selectedToken.decimals, + 1n, + ), + symbol: selectedToken.symbol, + } + : undefined, balances.splittable > 0n ? { - title: `Splittable ${selectedToken.symbol}`, - subtitle: 'Earned from already-received streams or incoming splits & gives', + title: `Earned ${selectedToken.symbol}`, + subtitle: 'From Projects or Drip Lists', value: '+' + formatTokenAmount(makeAmount(balances.splittable), selectedToken.decimals, 1n), From b2e4e4ea52fdbf6aba43a265909804c2af40af82 Mon Sep 17 00:00:00 2001 From: Georgios Jason Efstathiou Date: Tue, 26 Sep 2023 14:22:32 +0200 Subject: [PATCH 04/10] test: fix expected copy in e2e test --- src/e2e-tests/top-up-create-stream.e2e.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/e2e-tests/top-up-create-stream.e2e.test.ts b/src/e2e-tests/top-up-create-stream.e2e.test.ts index 3bbf3eff4..67aa1b9b6 100644 --- a/src/e2e-tests/top-up-create-stream.e2e.test.ts +++ b/src/e2e-tests/top-up-create-stream.e2e.test.ts @@ -387,7 +387,7 @@ describe('app', async () => { }); it('expands the squeezing section', async () => { - await page.locator('label:has-text("Include funds from current cycle")').click(); + await page.locator('label:has-text("Include funds streamed in current cycle")').click(); await page .locator(`data-testid=item-383620263794848526656662033323214000554911775452`) From eece537c5d47101d56c443527d42aa4ee266b45e Mon Sep 17 00:00:00 2001 From: Georgios Jason Efstathiou Date: Tue, 26 Sep 2023 14:36:33 +0200 Subject: [PATCH 05/10] feat: remove unnecessary + in collect screen --- .../flows/collect-flow/collect-amounts.svelte | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/lib/flows/collect-flow/collect-amounts.svelte b/src/lib/flows/collect-flow/collect-amounts.svelte index ea5305fe2..6105ac3d9 100644 --- a/src/lib/flows/collect-flow/collect-amounts.svelte +++ b/src/lib/flows/collect-flow/collect-amounts.svelte @@ -294,9 +294,11 @@ ? { title: `Earned ${selectedToken.symbol}`, subtitle: 'From Projects or Drip Lists', - value: - '+' + - formatTokenAmount(makeAmount(balances.splittable), selectedToken.decimals, 1n), + value: formatTokenAmount( + makeAmount(balances.splittable), + selectedToken.decimals, + 1n, + ), symbol: selectedToken.symbol, disabled: balances.splittable === 0n, } @@ -326,9 +328,11 @@ balances.collectable !== 0n ? { title: `Previously-split funds`, - value: - '+' + - formatTokenAmount(makeAmount(balances.collectable), selectedToken.decimals, 1n), + value: formatTokenAmount( + makeAmount(balances.collectable), + selectedToken.decimals, + 1n, + ), symbol: selectedToken.symbol, } : undefined, From 960995c4162bc8963646a1bd359b6a31472b854a Mon Sep 17 00:00:00 2001 From: Georgios Jason Efstathiou Date: Wed, 27 Sep 2023 17:04:32 +0200 Subject: [PATCH 06/10] feat: improve copy --- src/lib/flows/collect-flow/collect-amounts.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/flows/collect-flow/collect-amounts.svelte b/src/lib/flows/collect-flow/collect-amounts.svelte index 6105ac3d9..76605008e 100644 --- a/src/lib/flows/collect-flow/collect-amounts.svelte +++ b/src/lib/flows/collect-flow/collect-amounts.svelte @@ -224,7 +224,7 @@

- Income from Projects, Drip Lists and streams can be collected on a weekly cycle. Your + Income from Drip Lists, projects, and streams becomes collectable on a weekly cycle. Your collectable balance updates next on {formatDate(currentCycleEnd, 'onlyDay')}. From c7724ebfd710946207768efc1b615dd96d7bfdf7 Mon Sep 17 00:00:00 2001 From: Georgios Jason Efstathiou Date: Mon, 2 Oct 2023 15:22:13 +0200 Subject: [PATCH 07/10] feat: even improved-er copy --- .../flows/collect-flow/collect-amounts.svelte | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/lib/flows/collect-flow/collect-amounts.svelte b/src/lib/flows/collect-flow/collect-amounts.svelte index 76605008e..52a1f3583 100644 --- a/src/lib/flows/collect-flow/collect-amounts.svelte +++ b/src/lib/flows/collect-flow/collect-amounts.svelte @@ -224,10 +224,8 @@

- Income from Drip Lists, projects, and streams becomes collectable on a weekly cycle. Your - collectable balance updates next on {formatDate(currentCycleEnd, 'onlyDay')}. + Income from Drip Lists, projects, and streams settles once per week. Your collectable balance + updates next on {formatDate(currentCycleEnd, 'onlyDay')}.

{#if incomingEstimatesBySender.length > 0}
- +

- You may collect stream income from specific senders already before the current cycle - concludes, but the network fee for collecting increases with each selected sender. + You may collect stream income from specific senders already before it settles, but the + network fee for collecting increases with each selected sender.

The amounts shown below are estimated based on your system time so the value you collect @@ -254,7 +252,7 @@ multiselect bind:selected={selectedSqueezeSenderItems} searchable={false} - emptyStateText="No funds were streamed to you during the current cycle." + emptyStateText="You don't have any unsettled income from streams." />
@@ -266,7 +264,7 @@ [ squeezeEnabled ? { - title: `${selectedToken.symbol} streamed in current cycle`, + title: `Unsettled ${selectedToken.symbol}`, subtitle: 'From incoming streams', value: '≈ ' + @@ -280,7 +278,7 @@ : undefined, balances.receivable > 0n ? { - title: `${selectedToken.symbol} streamed in concluded cycles`, + title: `Settled ${selectedToken.symbol}`, subtitle: 'From incoming streams', value: formatTokenAmount( makeAmount(balances.receivable), @@ -292,8 +290,8 @@ : undefined, balances.splittable > 0n ? { - title: `Earned ${selectedToken.symbol}`, - subtitle: 'From Projects or Drip Lists', + title: `Settled ${selectedToken.symbol}`, + subtitle: 'From Drip Lists and projects', value: formatTokenAmount( makeAmount(balances.splittable), selectedToken.decimals, From 2a8a2f524611da07cd5a00b35061d89225c81c16 Mon Sep 17 00:00:00 2001 From: Georgios Jason Efstathiou Date: Mon, 2 Oct 2023 17:11:46 +0200 Subject: [PATCH 08/10] fix: annotation box wonky layout if no actions --- src/lib/components/annotation-box/annotation-box.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/components/annotation-box/annotation-box.svelte b/src/lib/components/annotation-box/annotation-box.svelte index c453670ac..863d4d81a 100644 --- a/src/lib/components/annotation-box/annotation-box.svelte +++ b/src/lib/components/annotation-box/annotation-box.svelte @@ -18,9 +18,11 @@
-
- -
+ {#if $$slots.actions} +
+ +
+ {/if}