Skip to content

Commit 90887ef

Browse files
committed
tour: update tour descriptions based on feedback
1 parent 75f7428 commit 90887ef

File tree

8 files changed

+28
-22
lines changed

8 files changed

+28
-22
lines changed

app/src/__tests__/components/loop/LoopPage.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ describe('LoopPage component', () => {
146146
fireEvent.click(getByText('Next'));
147147
expect(getByText('Step 2 of 2')).toBeInTheDocument();
148148
fireEvent.click(getByText('Confirm'));
149-
expect(getByText('Configuring Loops')).toBeInTheDocument();
149+
expect(getByText('Submitting Loop')).toBeInTheDocument();
150150
await waitFor(() => {
151151
expect(grpcMock.unary).toHaveBeenCalledWith(
152152
expect.objectContaining({ methodName: 'LoopOut' }),
@@ -167,7 +167,7 @@ describe('LoopPage component', () => {
167167
fireEvent.click(getByText('Next'));
168168
expect(getByText('Step 2 of 2')).toBeInTheDocument();
169169
fireEvent.click(getByText('Confirm'));
170-
expect(getByText('Configuring Loops')).toBeInTheDocument();
170+
expect(getByText('Submitting Loop')).toBeInTheDocument();
171171
expect(store.buildSwapStore.processingTimeout).toBeDefined();
172172
fireEvent.click(getByText('arrow-left.svg'));
173173
expect(getByText('Review Loop amount and fee')).toBeInTheDocument();

app/src/__tests__/components/loop/SwapWizard.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('SwapWizard component', () => {
3838
fireEvent.click(getByText('Next'));
3939
expect(getByText('Step 2 of 2')).toBeInTheDocument();
4040
fireEvent.click(getByText('Confirm'));
41-
expect(getByText('Configuring Loops')).toBeInTheDocument();
41+
expect(getByText('Submitting Loop')).toBeInTheDocument();
4242
fireEvent.click(getByText('arrow-left.svg'));
4343
expect(getByText('Step 2 of 2')).toBeInTheDocument();
4444
fireEvent.click(getByText('arrow-left.svg'));
@@ -106,7 +106,7 @@ describe('SwapWizard component', () => {
106106

107107
it('should display the description label', () => {
108108
const { getByText } = render();
109-
expect(getByText('Configuring Loops')).toBeInTheDocument();
109+
expect(getByText('Submitting Loop')).toBeInTheDocument();
110110
});
111111
});
112112
});

app/src/__tests__/components/tour/TourHost.spec.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ describe('TourHost component', () => {
9999
expect(getByText(l('export'))).toBeInTheDocument();
100100

101101
fireEvent.click(getByText('Next'));
102-
expect(getByText(firstLine(l('loop')))).toBeInTheDocument();
102+
expect(getByText('Lightning Loop')).toBeInTheDocument();
103103

104104
fireEvent.click(getByText('Loop', { selector: 'button' }));
105105
expect(getByText(l('loopActions'))).toBeInTheDocument();
@@ -126,9 +126,6 @@ describe('TourHost component', () => {
126126
fireEvent.click(getByText('Next'));
127127
expect(getByText(l('swapProgress'))).toBeInTheDocument();
128128

129-
fireEvent.click(getByText('Next'));
130-
expect(getByText(firstLine(l('swapClose')))).toBeInTheDocument();
131-
132129
fireEvent.click(getByText('close.svg'));
133130
expect(getByText('Congratulations!')).toBeInTheDocument();
134131

app/src/components/loop/swap/StepSummary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Styled = {
1010
display: flex;
1111
flex-direction: column;
1212
justify-content: space-between;
13-
max-width: 265px;
13+
max-width: 300px;
1414
`,
1515
Description: styled(Small)`
1616
opacity: 0.5;

app/src/components/loop/swap/SwapConfigStep.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import { observer } from 'mobx-react-lite';
3+
import { SwapDirection } from 'types/state';
34
import styled from '@emotion/styled';
45
import { usePrefixedTranslation } from 'hooks';
56
import { useStore } from 'store';
@@ -39,7 +40,11 @@ const SwapConfigStep: React.FC = () => {
3940
<StepSummary
4041
title={l('title')}
4142
heading={l('heading', { type: buildSwapStore.direction })}
42-
description={l('description')}
43+
description={
44+
buildSwapStore.direction === SwapDirection.IN
45+
? l('loopInDesc')
46+
: l('loopOutDesc')
47+
}
4348
/>
4449
</Summary>
4550
<Config>

app/src/components/tour/TourHost.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const tourSteps: ReactourStep[] = [
6666
{
6767
selector: '[data-tour="loop"]',
6868
content: createTextStep('loop', false),
69+
style: { maxWidth: 500 },
6970
},
7071
{
7172
selector: '[data-tour="loop-actions"]',
@@ -104,10 +105,6 @@ const tourSteps: ReactourStep[] = [
104105
selector: '[data-tour="swap-progress"]',
105106
content: createTextStep('swapProgress'),
106107
},
107-
{
108-
selector: '[data-tour="swap-close"]',
109-
content: createTextStep('swapClose', false),
110-
},
111108
{
112109
// eslint-disable-next-line react/display-name
113110
content: p => <SuccessStep {...p} />,

app/src/i18n/locales/en-US.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
"cmps.loop.swap.StepButtons.confirm": "Confirm",
5050
"cmps.loop.swap.SwapConfigStep.title": "Step 1 of 2",
5151
"cmps.loop.swap.SwapConfigStep.heading": "{{type}} Amount",
52-
"cmps.loop.swap.SwapConfigStep.description": "Loop moves funds in and out of the Lightning Network, simplifying the sending and receiving of payments via Lightning. Use the slider to select the amount to Loop In or Loop Out of the Lightning Network",
53-
"cmps.loop.swap.SwapProcessingStep.loadingMsg": "Configuring Loops",
52+
"cmps.loop.swap.SwapConfigStep.loopInDesc": "Loop In moves funds onto the Lightning Network from an on-chain wallet to provide outbound capacity to send funds over Lightning. Use the slider to select the amount to Loop In or Loop Out of the Lightning Network",
53+
"cmps.loop.swap.SwapConfigStep.loopOutDesc": "Loop Out moves funds off of the Lightning Network into an on-chain address while providing inbound capacity to receive funds on Lightning. Use the slider to select the amount to Loop In or Loop Out of the Lightning Network",
54+
"cmps.loop.swap.SwapProcessingStep.loadingMsg": "Submitting Loop",
5455
"cmps.loop.swap.SwapReviewStep.title": "Step 2 of 2",
5556
"cmps.loop.swap.SwapReviewStep.heading": "Review Loop amount and fee",
5657
"cmps.loop.swap.SwapReviewStep.description": "Confirm the fee for improving your channel liquidity. If you'd like to make adjustments, click the back arrow above.",
@@ -82,25 +83,24 @@
8283
"cmps.tour.TextStep.next": "Next",
8384
"cmps.tour.TextStep.nodeStatus": "Here are the confirmed balances on the Lightning Network and on-chain",
8485
"cmps.tour.TextStep.export": "Click here if you want to export your channels as a CSV file",
85-
"cmps.tour.TextStep.history": "This tile displays the two most recent swaps that have been initiated",
86+
"cmps.tour.TextStep.history": "This tile displays the two most recent loops that have been initiated. It is perfectly safe to perform multiple loops at one time.",
8687
"cmps.tour.TextStep.inbound": "This tile displays the amount of Bitcoin that this node can receive over your Lightning channels",
8788
"cmps.tour.TextStep.outbound": "This tile displays the amount of Bitcoin that this node can send over your Lightning channels",
8889
"cmps.tour.TextStep.channelList": "This is the list of open channels that this node has with other peers on the Lightning Network",
8990
"cmps.tour.TextStep.channelListReceive": "The amount that can be received over the channel",
9091
"cmps.tour.TextStep.channelListSend": "The amount that can be sent over this channel",
91-
"cmps.tour.TextStep.channelListFee": "The routing fee rate charged by the peer to receive payments over the channel. The percent is rounded to two decimal places. Hover over the value to see the exact rate expressed as parts-per-million",
92+
"cmps.tour.TextStep.channelListFee": "The routing fee rate charged by the peer to receive payments over the channel. The percent is rounded to two decimal places. Hover over the value to see the exact rate expressed as parts-per-million.",
9293
"cmps.tour.TextStep.channelListUptime": "The uptime percentage of the channel peer",
93-
"cmps.tour.TextStep.channelListPeer": "The alias of the channel peer. Hover over this field to see the peer's pubkey",
94+
"cmps.tour.TextStep.channelListPeer": "The alias of the channel peer. Hover over this field to see the peer's pubkey.",
9495
"cmps.tour.TextStep.channelListCapacity": "The total capacity of the channel",
95-
"cmps.tour.TextStep.loop": "Let's perform a Loop!\n Click on the <strong>Loop</strong> button to start.",
96+
"cmps.tour.TextStep.loop": "<strong>Lightning Loop</strong> can be used to transfer your Bitcoin balance between the Lightning Network and the on-chain Bitcoin network. This allows you to easily alter the balances of your channels without needing to close and reopen them, which extends the lifetime of your channels, and also enables operations to be batched as well.\n Let's perform a Loop!\n Click on the <strong>Loop</strong> button to start.",
9697
"cmps.tour.TextStep.channelListSelect": "Optionally, you can select one or more channels if you want the swap to only transfer funds over those chosen channels. This is helpful if you want to only adjust the balance of specific channels.\n If you choose more than one, there is no guarantee how much funds will be transferred over each channel. LND will use its knowledge of the network to determine how to best split up the payment, if necessary. It is possible that only one of the channels will be used if the payment can be successfully routed through it.\n If you do not care which channels to use, then do not select any. The Lightning payment will be routed through any channel(s) with enough balance to allow it to succeed.",
9798
"cmps.tour.TextStep.loopActions": "The action bar displays information about the selected channels and the buttons to Loop Out or Loop In.",
9899
"cmps.tour.TextStep.loopOut": "We will use Loop Out to transfer funds from your channel balances to your on-chain wallet.\n Click on the <strong>Loop Out</strong> button to continue.",
99100
"cmps.tour.TextStep.loopAmount": "You now need to specify the amount you would like to Loop Out. Drag the slider to adjust the amount.\n Click the <strong>Next</strong> button to continue.",
100101
"cmps.tour.TextStep.loopReview": "Review the Loop amount and the fee. Keep in mind that you will only be charged the fee. The Loop amount will remain on your node once the swap completes. The balance will just be shifted from your channel balance to your on-chain wallet balance.\n Click the <strong>Confirm</strong> button to continue.",
101102
"cmps.tour.TextStep.loopProgress": "Wait for the swap to be submitted to the server",
102103
"cmps.tour.TextStep.processingSwaps": "Your swap will now be displayed in the Processing Loops section. It shows you the swap id, amount, and current status as a progress bar.\n Swaps require on-chain transactions, so you will need to wait for confirmations before they will complete successfully.",
103-
"cmps.tour.TextStep.swapClose": "You can close the Processing Loops section any time by clicking on this close icon.\n It is perfectly safe to perform multiple swaps at one time.\n Click in the icon to continue.",
104104
"cmps.tour.TextStep.swapProgress": "Once the progress bar turns green, your swap has been completed successfully.",
105105
"cmps.tour.TextStep.congrats": "Congratulations!\n You have completed the tour.\n Happy Looping!",
106106
"cmps.tour.WelcomeStep.header": "Welcome to Lightning Terminal!",

app/src/store/stores/uiStore.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,18 @@ export default class UiStore {
131131
// #3 is the history step
132132
// change the most recent swap to be pending
133133
this._store.swapStore.sortedSwaps[0].state = SwapState.INITIATED;
134-
this._store.swapStore.sortedSwaps[0].lastUpdateTime = Date.now() * 1000 * 1000;
134+
// set the timestamp far in the future so it doesn't automatically disappear
135+
// from the Processing Loops list after 5 mins
136+
const tomorrow = Date.now() + 24 * 60 * 60 * 1000;
137+
this._store.swapStore.sortedSwaps[0].lastUpdateTime = tomorrow * 1000 * 1000;
135138
} else if (step === 21 /* swap-progress */) {
136139
// #21 is the swap-progress step
137140
// force the swap to be 100% complete
138141
this._store.swapStore.sortedSwaps[0].state = SwapState.SUCCESS;
142+
} else if (step === 22 /* congrats */) {
143+
// #22 is the congrats step
144+
// hide the processing swaps section
145+
this.processingSwapsVisible = false;
139146
}
140147
}
141148

0 commit comments

Comments
 (0)