Skip to content

Commit 4f95220

Browse files
authored
Merge pull request #2770 from input-output-hk/feature/ddw-854-improve-startup-and-shutdown-messages
[DDW-854] Improve startup and shutdown messages
2 parents f7c80d3 + b12409f commit 4f95220

File tree

16 files changed

+118
-49
lines changed

16 files changed

+118
-49
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
### Chores
66

7+
- Improve startup and shutdown messages ([PR 2770](https://github.com/input-output-hk/daedalus/pull/2770))
78
- Updated `cardano-wallet` to version `2021-11-11` ([PR 2765](https://github.com/input-output-hk/daedalus/pull/2765))
89
- Added jest library for unit testing ([PR 2633](https://github.com/input-output-hk/daedalus/pull/2633))
910
- Updated `cardano-launcher` to version `0.20211105.1` and added Cardano Node RTS flags which improve resource usage ([PR 2735](https://github.com/input-output-hk/daedalus/pull/2735), [PR 2741](https://github.com/input-output-hk/daedalus/pull/2741))
1011

1112
### Features
1213

14+
- Implement catalyst state snapshot phase ([PR 2771](https://github.com/input-output-hk/daedalus/pull/2771))
1315
- Implemented "discreet mode" ([PR 2723](https://github.com/input-output-hk/daedalus/pull/2723), [PR 2724](https://github.com/input-output-hk/daedalus/pull/2724), [PR 2725](https://github.com/input-output-hk/daedalus/pull/2725), [PR 2742](https://github.com/input-output-hk/daedalus/pull/2742), [PR 2740](https://github.com/input-output-hk/daedalus/pull/2740), [PR 2756](https://github.com/input-output-hk/daedalus/pull/2756))
1416
- Updated slider component to only execute onAfterChange if slider had moved ([PR 2766](https://github.com/input-output-hk/daedalus/pull/2766))
1517

source/renderer/app/components/loading/syncing-connecting/StatusIcons.scss

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,12 @@
99
z-index: 2500;
1010

1111
.icon {
12+
display: block;
1213
height: 24px;
13-
padding: 2px;
1414
width: 24px;
1515
svg {
16-
height: 20px;
17-
width: 20px;
18-
}
19-
&.icon-nodeState {
20-
padding-right: 4px;
21-
padding-top: 0;
22-
svg {
23-
height: 22px;
24-
width: 22px;
25-
}
26-
}
27-
&.icon-isNodeResponding {
28-
padding: 3.2px 0 0;
29-
svg {
30-
height: 17.6px;
31-
width: 24px;
32-
}
16+
height: 24px;
17+
width: 24px;
3318
}
3419
}
3520

source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22
import React, { Component } from 'react';
3-
import { defineMessages, intlShape } from 'react-intl';
3+
import { defineMessages, intlShape, FormattedHTMLMessage } from 'react-intl';
44
import classNames from 'classnames';
55
import styles from './SyncingConnectingStatus.scss';
66
import { CardanoNodeStates } from '../../../../../common/types/cardano-node.types';
@@ -12,11 +12,23 @@ const messages = defineMessages({
1212
defaultMessage: '!!!Starting Cardano node',
1313
description: 'Message "Starting Cardano node" on the loading screen.',
1414
},
15+
startingDescription: {
16+
id: 'loading.screen.startingCardanoDescription',
17+
defaultMessage:
18+
'!!!This process validates the integrity of local blockchain data and could take several minutes.',
19+
description: 'Message "Starting Cardano node" on the loading screen.',
20+
},
1521
stopping: {
1622
id: 'loading.screen.stoppingCardanoMessage',
1723
defaultMessage: '!!!Stopping Cardano node',
1824
description: 'Message "Stopping Cardano node" on the loading screen.',
1925
},
26+
stoppingDescription: {
27+
id: 'loading.screen.stoppingCardanoDescription',
28+
defaultMessage:
29+
'!!!This process updates the databases and could take several minutes.<br />To preserve data integrity, please wait until this process is complete.',
30+
description: 'Message "Stopping Cardano node" on the loading screen.',
31+
},
2032
stopped: {
2133
id: 'loading.screen.stoppedCardanoMessage',
2234
defaultMessage: '!!!Cardano node stopped',
@@ -91,24 +103,33 @@ export default class SyncingConnectingStatus extends Component<Props> {
91103
intl: intlShape.isRequired,
92104
};
93105

94-
_getConnectingMessage = () => {
106+
_getConnectingMessage = (): {
107+
connectingMessage: string,
108+
connectingDescription?: string,
109+
} => {
95110
const {
96111
cardanoNodeState,
97112
hasBeenConnected,
98113
isVerifyingBlockchain,
99114
isTlsCertInvalid,
100115
isConnected,
101116
} = this.props;
102-
if (isConnected) return messages.loadingWalletData;
103117
let connectingMessage;
118+
if (isConnected) {
119+
connectingMessage = messages.loadingWalletData;
120+
return { connectingMessage };
121+
}
122+
let connectingDescription;
104123
switch (cardanoNodeState) {
105124
case null:
106125
case CardanoNodeStates.STARTING:
107126
connectingMessage = messages.starting;
127+
connectingDescription = messages.startingDescription;
108128
break;
109129
case CardanoNodeStates.STOPPING:
110130
case CardanoNodeStates.EXITING:
111131
connectingMessage = messages.stopping;
132+
connectingDescription = messages.stoppingDescription;
112133
break;
113134
case CardanoNodeStates.STOPPED:
114135
connectingMessage = messages.stopped;
@@ -136,12 +157,12 @@ export default class SyncingConnectingStatus extends Component<Props> {
136157
connectingMessage === messages.connecting ||
137158
connectingMessage === messages.reconnecting;
138159
if (isTlsCertInvalid && isConnectingMessage) {
139-
return messages.tlsCertificateNotValidError;
140-
}
141-
if (isVerifyingBlockchain && isConnectingMessage) {
142-
return messages.verifyingBlockchain;
160+
connectingMessage = messages.tlsCertificateNotValidError;
161+
} else if (isVerifyingBlockchain && isConnectingMessage) {
162+
connectingMessage = messages.verifyingBlockchain;
163+
connectingDescription = messages.startingDescription;
143164
}
144-
return connectingMessage;
165+
return { connectingMessage, connectingDescription };
145166
};
146167

147168
render() {
@@ -170,13 +191,23 @@ export default class SyncingConnectingStatus extends Component<Props> {
170191
showEllipsis ? styles.withoutAnimation : null,
171192
]);
172193

194+
const {
195+
connectingMessage,
196+
connectingDescription,
197+
} = this._getConnectingMessage();
198+
173199
return (
174200
<div className={componentStyles}>
175201
<h1 className={headlineStyles}>
176-
{intl.formatMessage(this._getConnectingMessage(), {
202+
{intl.formatMessage(connectingMessage, {
177203
verificationProgress,
178204
})}
179205
</h1>
206+
<div className={styles.description}>
207+
{connectingDescription && (
208+
<FormattedHTMLMessage {...connectingDescription} />
209+
)}
210+
</div>
180211
</div>
181212
);
182213
}

source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
.headline {
1616
font-family: var(--font-regular);
1717
font-size: 18px;
18+
margin-bottom: 14px;
19+
}
20+
21+
.description {
22+
color: var(--theme-connecting-description-color);
23+
font-family: var(--font-regular);
24+
font-size: 16px;
25+
line-height: 22px;
26+
margin: 0 auto;
27+
max-width: 580px;
1828
}
1929

2030
.connecting {

source/renderer/app/i18n/locales/defaultMessages.json

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,158 +2054,186 @@
20542054
"line": 10
20552055
}
20562056
},
2057+
{
2058+
"defaultMessage": "!!!This process validates the integrity of local blockchain data and could take several minutes.",
2059+
"description": "Message \"Starting Cardano node\" on the loading screen.",
2060+
"end": {
2061+
"column": 3,
2062+
"line": 20
2063+
},
2064+
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
2065+
"id": "loading.screen.startingCardanoDescription",
2066+
"start": {
2067+
"column": 23,
2068+
"line": 15
2069+
}
2070+
},
20572071
{
20582072
"defaultMessage": "!!!Stopping Cardano node",
20592073
"description": "Message \"Stopping Cardano node\" on the loading screen.",
20602074
"end": {
20612075
"column": 3,
2062-
"line": 19
2076+
"line": 25
20632077
},
20642078
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
20652079
"id": "loading.screen.stoppingCardanoMessage",
20662080
"start": {
20672081
"column": 12,
2068-
"line": 15
2082+
"line": 21
2083+
}
2084+
},
2085+
{
2086+
"defaultMessage": "!!!This process updates the databases and could take several minutes.<br />To preserve data integrity, please wait until this process is complete.",
2087+
"description": "Message \"Stopping Cardano node\" on the loading screen.",
2088+
"end": {
2089+
"column": 3,
2090+
"line": 31
2091+
},
2092+
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
2093+
"id": "loading.screen.stoppingCardanoDescription",
2094+
"start": {
2095+
"column": 23,
2096+
"line": 26
20692097
}
20702098
},
20712099
{
20722100
"defaultMessage": "!!!Cardano node stopped",
20732101
"description": "Message \"Cardano node stopped\" on the loading screen.",
20742102
"end": {
20752103
"column": 3,
2076-
"line": 24
2104+
"line": 36
20772105
},
20782106
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
20792107
"id": "loading.screen.stoppedCardanoMessage",
20802108
"start": {
20812109
"column": 11,
2082-
"line": 20
2110+
"line": 32
20832111
}
20842112
},
20852113
{
20862114
"defaultMessage": "!!!Updating Cardano node",
20872115
"description": "Message \"Updating Cardano node\" on the loading screen.",
20882116
"end": {
20892117
"column": 3,
2090-
"line": 29
2118+
"line": 41
20912119
},
20922120
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
20932121
"id": "loading.screen.updatingCardanoMessage",
20942122
"start": {
20952123
"column": 12,
2096-
"line": 25
2124+
"line": 37
20972125
}
20982126
},
20992127
{
21002128
"defaultMessage": "!!!Cardano node updated",
21012129
"description": "Message \"Cardano node updated\" on the loading screen.",
21022130
"end": {
21032131
"column": 3,
2104-
"line": 34
2132+
"line": 46
21052133
},
21062134
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
21072135
"id": "loading.screen.updatedCardanoMessage",
21082136
"start": {
21092137
"column": 11,
2110-
"line": 30
2138+
"line": 42
21112139
}
21122140
},
21132141
{
21142142
"defaultMessage": "!!!Cardano node crashed",
21152143
"description": "Message \"Cardano node crashed\" on the loading screen.",
21162144
"end": {
21172145
"column": 3,
2118-
"line": 39
2146+
"line": 51
21192147
},
21202148
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
21212149
"id": "loading.screen.crashedCardanoMessage",
21222150
"start": {
21232151
"column": 11,
2124-
"line": 35
2152+
"line": 47
21252153
}
21262154
},
21272155
{
21282156
"defaultMessage": "!!!Unable to start Cardano node. Please submit a support request.",
21292157
"description": "Message \"Unable to start Cardano node. Please submit a support request.\" on the loading screen.",
21302158
"end": {
21312159
"column": 3,
2132-
"line": 46
2160+
"line": 58
21332161
},
21342162
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
21352163
"id": "loading.screen.unrecoverableCardanoMessage",
21362164
"start": {
21372165
"column": 17,
2138-
"line": 40
2166+
"line": 52
21392167
}
21402168
},
21412169
{
21422170
"defaultMessage": "!!!Connecting to network",
21432171
"description": "Message \"Connecting to network\" on the loading screen.",
21442172
"end": {
21452173
"column": 3,
2146-
"line": 51
2174+
"line": 63
21472175
},
21482176
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
21492177
"id": "loading.screen.connectingToNetworkMessage",
21502178
"start": {
21512179
"column": 14,
2152-
"line": 47
2180+
"line": 59
21532181
}
21542182
},
21552183
{
21562184
"defaultMessage": "!!!Network connection lost - reconnecting",
21572185
"description": "Message \"Network connection lost - reconnecting\" on the loading screen.",
21582186
"end": {
21592187
"column": 3,
2160-
"line": 57
2188+
"line": 69
21612189
},
21622190
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
21632191
"id": "loading.screen.reconnectingToNetworkMessage",
21642192
"start": {
21652193
"column": 16,
2166-
"line": 52
2194+
"line": 64
21672195
}
21682196
},
21692197
{
21702198
"defaultMessage": "!!!Loading wallet data",
21712199
"description": "Message \"Loading wallet data\" on the loading screen.",
21722200
"end": {
21732201
"column": 3,
2174-
"line": 62
2202+
"line": 74
21752203
},
21762204
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
21772205
"id": "loading.screen.loadingWalletData",
21782206
"start": {
21792207
"column": 21,
2180-
"line": 58
2208+
"line": 70
21812209
}
21822210
},
21832211
{
21842212
"defaultMessage": "!!!TLS certificate is not valid, please restart Daedalus.",
21852213
"description": "The TLS cert is not valid and Daedalus should be restarted",
21862214
"end": {
21872215
"column": 3,
2188-
"line": 67
2216+
"line": 79
21892217
},
21902218
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
21912219
"id": "loading.screen.errors.tlsCertificateNotValidPleaseRestartError",
21922220
"start": {
21932221
"column": 31,
2194-
"line": 63
2222+
"line": 75
21952223
}
21962224
},
21972225
{
21982226
"defaultMessage": "!!!Verifying the blockchain ({verificationProgress}% complete)",
21992227
"description": "Message \"Verifying the blockchain (65% complete) ...\" on the loading screen.",
22002228
"end": {
22012229
"column": 3,
2202-
"line": 74
2230+
"line": 86
22032231
},
22042232
"file": "source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js",
22052233
"id": "loading.screen.verifyingBlockchainMessage",
22062234
"start": {
22072235
"column": 23,
2208-
"line": 68
2236+
"line": 80
22092237
}
22102238
}
22112239
],

source/renderer/app/i18n/locales/en-US.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,10 @@
214214
"loading.screen.reportIssue.connecting.text": "Having trouble connecting to network?",
215215
"loading.screen.reportIssue.downloadLogsLinkLabel": "Download logs",
216216
"loading.screen.reportIssue.reportIssueButtonUrl": "https://iohk.zendesk.com/hc/en-us/requests/new/",
217+
"loading.screen.startingCardanoDescription": "This process validates the integrity of local blockchain data and could take several minutes.",
217218
"loading.screen.startingCardanoMessage": "Starting Cardano node",
218219
"loading.screen.stoppedCardanoMessage": "Cardano node stopped",
220+
"loading.screen.stoppingCardanoDescription": "This process updates the databases and could take several minutes.<br />To preserve data integrity, please wait until this process is complete.",
219221
"loading.screen.stoppingCardanoMessage": "Stopping Cardano node",
220222
"loading.screen.unrecoverableCardanoMessage": "Unable to start Cardano node. Please submit a support request.",
221223
"loading.screen.updatedCardanoMessage": "Cardano node updated",

0 commit comments

Comments
 (0)