Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDW-675] Fix broken Storybook #1402

Merged
merged 4 commits into from
May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ Changelog
- Implemented the navigation for the Staking pages ([PR 1395](https://github.com/input-output-hk/daedalus/pull/1395), [PR 1400](https://github.com/input-output-hk/daedalus/pull/1400))
- Implemented timestamp on paper wallet PDF's ([PR 1385](https://github.com/input-output-hk/daedalus/pull/1385), [PR 1400](https://github.com/input-output-hk/daedalus/pull/1400))
- Implemented "Start of decentralisation notification" UI ([PR 1390](https://github.com/input-output-hk/daedalus/pull/1390))
- Implemented new Network Status dialog design ([PR 1370](https://github.com/input-output-hk/daedalus/pull/1370), [PR 1402](https://github.com/input-output-hk/daedalus/pull/1402))
- Implemented the wallet UTxO statistics screen ([PR 1353](https://github.com/input-output-hk/daedalus/pull/1353))
- Implemented scroll error message into view ([PR 1383](https://github.com/input-output-hk/daedalus/pull/1383))
- Implemented new Block-consolidation status design ([PR 1377](https://github.com/input-output-hk/daedalus/pull/1377))
- Implemented new About Us dialog design with a close button ([PR 1369](https://github.com/input-output-hk/daedalus/pull/1369))
- Implemented "In progress" download logs notification ([PR 1341](https://github.com/input-output-hk/daedalus/pull/1341))
- Implemented status icons on the "Loading" screens ([PR 1325](https://github.com/input-output-hk/daedalus/pull/1325), [PR 1365](https://github.com/input-output-hk/daedalus/pull/1365))
- Implemented detection for system locale on Daedalus start when user hasn't yet selected language preference so that locale defaults to Japanese if system locale is Japan/Japanese, otherwise defaults to English ([PR 1348](https://github.com/input-output-hk/daedalus/pull/1348))
Expand All @@ -26,14 +28,12 @@ Changelog

### Chores

- Removed legacy references to npm in favour of yarn ([PR 1399](https://github.com/input-output-hk/daedalus/pull/1399))
- Implemented new Network Status dialog design ([PR 1370](https://github.com/input-output-hk/daedalus/pull/1370))
- Removed legacy references to npm in favour of yarn ([PR 1399](https://github.com/input-output-hk/daedalus/pull/1399), [PR 1402](https://github.com/input-output-hk/daedalus/pull/1402))
- Setup storybook build script to deploy previews for the QA team to Netlify ([1391](https://github.com/input-output-hk/daedalus/pull/1391))
- Added unit tests for mnemonic generation and validation ([PR 1379](https://github.com/input-output-hk/daedalus/pull/1379))
- Simplified the test setup ([PR 1378](https://github.com/input-output-hk/daedalus/pull/1378))
- Updated PR template ([PR 1376](https://github.com/input-output-hk/daedalus/pull/1376))
- Implemented new About Us dialog design with a close button ([PR 1369](https://github.com/input-output-hk/daedalus/pull/1369)
- Refactored store async functions to use mobx runInAction calls ([PR 1367](https://github.com/input-output-hk/daedalus/pull/1367)
- Refactored store async functions to use mobx runInAction calls ([PR 1367](https://github.com/input-output-hk/daedalus/pull/1367))
- Refactored the consolidation status screen epoch calculation ([PR 1339](https://github.com/input-output-hk/daedalus/pull/1339))
- Removed the `REPORT_URL` env variable ([PR 1338](https://github.com/input-output-hk/daedalus/pull/1338))
- Improved acceptance test coverage for the Loading screen, Block Consolidation screen, and fixed a bug common to multiple other tests which use the mnemonic word selector to identify and click mnemonics ([PR 1318](https://github.com/input-output-hk/daedalus/pull/1318))
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
"@babel/preset-flow": "7.0.0",
"@babel/preset-react": "7.0.0",
"@babel/register": "7.0.0",
"@storybook/addon-actions": "4.0.12",
"@storybook/addon-knobs": "4.0.12",
"@storybook/addon-links": "4.0.12",
"@storybook/addon-notes": "4.0.12",
"@storybook/addons": "4.0.12",
"@storybook/react": "4.0.12",
"@storybook/addon-actions": "4.1.18",
"@storybook/addon-knobs": "4.1.18",
"@storybook/addon-links": "4.1.18",
"@storybook/addon-notes": "4.1.18",
"@storybook/addons": "4.1.18",
"@storybook/react": "4.1.18",
"asar": "0.14.6",
"autodll-webpack-plugin": "0.4.2",
"babel-eslint": "10.0.1",
Expand Down
4 changes: 2 additions & 2 deletions source/main/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os from 'os';
import { uniq, upperFirst, get, includes } from 'lodash';
import { version } from '../../package.json';
import { stateDirectoryPath } from './config';
// import { stateDirectoryPath } from './config';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DeeJayElly we can not use anything from ./config as this breaks the storybook.
The problem is that within ./config we use fs to load the LauncherConfig which contains all the paths we need (incl. the state path).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import should be removed and we should send the state path to the renderer process through the IPC channel. Similar to how we do for the system locale: https://github.com/input-output-hk/daedalus/blob/develop/source/main/index.js#L142
Network status store should receive this value on app start time and then propagate it to the Network status container and component.

import type { Environment } from '../common/types/environment.types';
import {
DEVELOPMENT,
Expand Down Expand Up @@ -82,7 +82,7 @@ export const environment: Environment = Object.assign(
isWindows,
isMacOS,
isLinux,
stateDirectoryPath,
stateDirectoryPath: '',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DeeJayElly I have on purpose used an empty string for the value of state directory. It should be fixed in the scope of this task: https://iohk.myjetbrains.com/youtrack/issue/DDW-676

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stateDirectoryPath property should be removed from the environment.js.

isInSafeMode,
},
process.env
Expand Down
3 changes: 1 addition & 2 deletions source/renderer/app/containers/status/NetworkStatusDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import ReactModal from 'react-modal';
import os from 'os';
import NetworkStatus from '../../components/status/NetworkStatus';
import styles from './NetworkStatusDialog.scss';
import type { InjectedProps } from '../../types/injectedPropsType';
Expand Down Expand Up @@ -51,7 +50,7 @@ export default class NetworkStatusDialog extends Component<Props> {

const systemInfo = {
platform: environment.os,
platformVersion: os.release(),
platformVersion: environment.platformVersion,
cpu: Array.isArray(environment.cpu) ? environment.cpu[0].model : '',
ram: this.convertBytesToSize(environment.ram),
availableDiskSpace: diskSpaceAvailable,
Expand Down
113 changes: 57 additions & 56 deletions source/renderer/app/i18n/locales/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,61 +193,6 @@
"static.about.copyright": "!!!Input Output HK Limited. Licensed under",
"static.about.license": "!!!MIT licence",
"static.about.title": "!!!Daedalus",
"status.network.dialog.system.info": "SYSTEM INFO",
"status.network.dialog.platform": "Platform",
"status.network.dialog.platform.version": "Platform Version",
"status.network.dialog.cpu": "CPU",
"status.network.dialog.ram": "RAM",
"status.network.dialog.availableDiskSpace": "Available disk space",
"status.network.dialog.coreInfo": "CORE INFO",
"status.network.dialog.daedalusVersion": "Daedalus Version",
"status.network.dialog.daedalusMainProcessID": "Daedalus Main Process ID",
"status.network.dialog.daedalusProcessID": "Daedalus Renderer Process ID",
"status.network.dialog.safeMode": "Daedalus is running in safe mode",
"status.network.dialog.cardanoVersion": "Cardano Version",
"status.network.dialog.cardanoProcessID": "Cardano Process ID",
"status.network.dialog.cardanoApiPort": "Cardano API Port",
"status.network.dialog.cardanoNetwork": "Cardano Network",
"status.network.dialog.stateDirectory": "Daedalus State Directory",
"status.network.dialog.connectionError": "CONNECTION ERROR",
"status.network.dialog.daedalusStatus": "DAEDALUS STATUS",
"status.network.dialog.synced": "Synced",
"status.network.dialog.syncPercentage": "Sync Percentage",
"status.network.dialog.networkBlockHeight": "Network Block Height",
"status.network.dialog.localBlockHeight": "Local Block Height",
"status.network.dialog.remainingUnsyncedBlocks": "Remaining Unsynced Blocks",
"status.network.dialog.latestLocalBlockAge": "Latest Local Block Age",
"status.network.dialog.latestNetworkBlockAge": "Latest Network Block Age",
"status.network.dialog.localTimeDifference": "Local Time Difference",
"status.network.dialog.systemTimeCorrect": "System Time Correct",
"status.network.dialog.systemTimeIgnored": "System Time Ignored",
"status.network.dialog.checkingNodeTime": "Checking Node Time",
"status.network.dialog.cardanoNodeStatus": "CARDANO NODE STATUS",
"status.network.dialog.cardanoNodeStatusRestarting": "Restarting Cardano Node...",
"status.network.dialog.cardanoNodeStatusRestart": "Restart Cardano Node",
"status.network.dialog.cardanoNodeDiagnostics": "Cardano Node Diagnostics",
"status.network.dialog.realtimeStatisticsMonitor": "Realtime statistics monitor",
"status.network.dialog.cardanoNodeState": "Cardano Node State",
"status.network.dialog.cardanoNodeResponding": "Node Responding",
"status.network.dialog.cardanoNodeSubscribed": "Node Subscribed",
"status.network.dialog.cardanoNodeTimeCorrect": "Node Time Correct",
"status.network.dialog.cardanoNodeSyncing": "Node Syncing",
"status.network.dialog.cardanoNodeInSync": "Node In Sync",
"status.network.dialog.statusOn": "YES",
"status.network.dialog.statusOff": "NO",
"status.network.dialog.serviceUnreachable": "NTP Service unreachable",
"status.network.dialog.localTimeDifferenceChecking": "Checking...",
"status.network.dialog.localTimeDifferenceCheckTime": "Check time",
"status.network.dialog.nodeHasBeenUpdated": "updated",
"status.network.dialog.nodeHasCrashed": "crashed",
"status.network.dialog.nodeHasErrored": "errored",
"status.network.dialog.nodeHasStopped": "stopped",
"status.network.dialog.nodeIsExiting": "exiting",
"status.network.dialog.nodeIsRunning": "running",
"status.network.dialog.nodeIsStarting": "starting",
"status.network.dialog.nodeIsStopping": "stopping",
"status.network.dialog.nodeIsUnrecoverable": "unrecoverable",
"status.network.dialog.nodeIsUpdating": "updating",
"status.icons.checkYourInternetConnection": "Check your Internet connection!",
"status.icons.isNodeRespondingLoading": "!!!Checking if Node is responding!",
"status.icons.isNodeRespondingOff": "!!!Node is not responding!",
Expand All @@ -271,6 +216,62 @@
"status.icons.nodeIsStopping": "Node is stopping!",
"status.icons.nodeIsUnrecoverable": "Node is unrecoverable!",
"status.icons.nodeIsUpdating": "Node is updating!",
"status.network.dialog.availableDiskSpace": "Available disk space",
"status.network.dialog.cardanoApiPort": "Cardano API Port",
"status.network.dialog.cardanoNetwork": "Cardano Network",
"status.network.dialog.cardanoNodeDiagnostics": "Cardano Node Diagnostics",
"status.network.dialog.cardanoNodeInSync": "Node In Sync",
"status.network.dialog.cardanoNodeResponding": "Node Responding",
"status.network.dialog.cardanoNodeState": "Cardano Node State",
"status.network.dialog.cardanoNodeStatus": "CARDANO NODE STATUS",
"status.network.dialog.cardanoNodeStatusRestart": "Restart Cardano Node",
"status.network.dialog.cardanoNodeStatusRestarting": "Restarting Cardano Node...",
"status.network.dialog.cardanoNodeSubscribed": "Node Subscribed",
"status.network.dialog.cardanoNodeSyncing": "Node Syncing",
"status.network.dialog.cardanoNodeTimeCorrect": "Node Time Correct",
"status.network.dialog.cardanoProcessID": "Cardano Process ID",
"status.network.dialog.cardanoVersion": "Cardano Version",
"status.network.dialog.checkingNodeTime": "Checking Node Time",
"status.network.dialog.connected": "!!!Connected",
"status.network.dialog.connectionError": "CONNECTION ERROR",
"status.network.dialog.coreInfo": "CORE INFO",
"status.network.dialog.cpu": "CPU",
"status.network.dialog.daedalusMainProcessID": "Daedalus Main Process ID",
"status.network.dialog.daedalusProcessID": "Daedalus Renderer Process ID",
"status.network.dialog.daedalusStatus": "DAEDALUS STATUS",
"status.network.dialog.daedalusVersion": "Daedalus Version",
"status.network.dialog.latestLocalBlockAge": "Latest Local Block Age",
"status.network.dialog.latestNetworkBlockAge": "Latest Network Block Age",
"status.network.dialog.localBlockHeight": "Local Block Height",
"status.network.dialog.localTimeDifference": "Local Time Difference",
"status.network.dialog.localTimeDifferenceCheckTime": "Check time",
"status.network.dialog.localTimeDifferenceChecking": "Checking...",
"status.network.dialog.networkBlockHeight": "Network Block Height",
"status.network.dialog.nodeHasBeenUpdated": "updated",
"status.network.dialog.nodeHasCrashed": "crashed",
"status.network.dialog.nodeHasErrored": "errored",
"status.network.dialog.nodeHasStopped": "stopped",
"status.network.dialog.nodeIsExiting": "exiting",
"status.network.dialog.nodeIsRunning": "running",
"status.network.dialog.nodeIsStarting": "starting",
"status.network.dialog.nodeIsStopping": "stopping",
"status.network.dialog.nodeIsUnrecoverable": "unrecoverable",
"status.network.dialog.nodeIsUpdating": "updating",
"status.network.dialog.platform": "Platform",
"status.network.dialog.platform.version": "Platform Version",
"status.network.dialog.ram": "RAM",
"status.network.dialog.realtimeStatisticsMonitor": "Realtime statistics monitor",
"status.network.dialog.remainingUnsyncedBlocks": "Remaining Unsynced Blocks",
"status.network.dialog.safeMode": "Daedalus is running in safe mode",
"status.network.dialog.serviceUnreachable": "NTP Service unreachable",
"status.network.dialog.stateDirectory": "Daedalus State Directory",
"status.network.dialog.statusOff": "NO",
"status.network.dialog.statusOn": "YES",
"status.network.dialog.syncPercentage": "Sync Percentage",
"status.network.dialog.synced": "Synced",
"status.network.dialog.system.info": "SYSTEM INFO",
"status.network.dialog.systemTimeCorrect": "System Time Correct",
"status.network.dialog.systemTimeIgnored": "System Time Ignored",
"systemTime.error.ntpUnreachableTextP1": "!!!Attention, Daedalus is unable to check if the clock on your computer is synchronized with global time because NTP (Network Time Protocol) servers are unreachable, possibly due to firewalls on your network.",
"systemTime.error.ntpUnreachableTextP2": "!!!If your computer clock is off by more than 15 seconds, Daedalus will be unable to connect to the network. If you have this issue, please read our Support Portal article to synchronize the time on your machine.",
"systemTime.error.onCheckTheTimeAgainLink": "!!!Check the time again",
Expand Down Expand Up @@ -488,4 +489,4 @@
"wallet.transaction.type.exchange": "Währungsumtausch",
"wallet.transactions.no.transactions": "Keine Transaktionen vorhanden",
"wallet.transactions.no.transactions.found": "Keine Transaktionen gefunden"
}
}