Skip to content
Permalink
Browse files

Merge branch 'fix/ddw-745-staking-screen-improvements' of github.com:…

…input-output-hk/daedalus into fix/ddw-745-staking-screen-improvements
  • Loading branch information...
tomothespian committed Jul 11, 2019
2 parents 9f1f167 + 9ef151d commit 9fd3bfd5b28094feacb24a985281a4376349478a
Showing with 15,845 additions and 2,159 deletions.
  1. +6 −1 CHANGELOG.md
  2. +1 −1 features/tests/e2e/steps/app-steps.js
  3. +3 −3 features/tests/e2e/steps/app-version-difference.js
  4. +1 −1 features/tests/e2e/steps/local-time-difference-steps.js
  5. +1 −1 features/tests/e2e/steps/no-disk-space.js
  6. +8 −4 features/tests/e2e/steps/trouble-connecting-notification-steps.js
  7. +1 −1 features/tests/e2e/steps/trouble-syncing-notification-steps.js
  8. +30 −0 gulpfile.js
  9. +5 −0 package.json
  10. +2 −0 source/main/menus/osx.js
  11. +2 −0 source/main/menus/win-linux.js
  12. +12 −2 source/main/utils/buildAppMenus.js
  13. +0 −572 source/renderer/app/components/loading/Loading.js
  14. +0 −174 source/renderer/app/components/loading/Loading.scss
  15. +9 −9 source/renderer/app/components/loading/{ManualUpdateOverlay.js → manual-update/ManualUpdate.js}
  16. +5 −4 source/renderer/app/components/loading/{ManualUpdateOverlay.scss → manual-update/ManualUpdate.scss}
  17. +3 −3 ...renderer/app/components/loading/{NoDiskSpaceOverlay.js → no-disk-space-error/NoDiskSpaceError.js}
  18. +1 −1 ...app/components/loading/{NoDiskSpaceErrorOverlay.scss → no-disk-space-error/NoDiskSpaceError.scss}
  19. +58 −0 source/renderer/app/components/loading/syncing-connecting/LogosDisplay.js
  20. +47 −0 source/renderer/app/components/loading/syncing-connecting/LogosDisplay.scss
  21. +155 −0 source/renderer/app/components/loading/syncing-connecting/ReportIssue.js
  22. +83 −0 source/renderer/app/components/loading/syncing-connecting/ReportIssue.scss
  23. 0 source/renderer/app/components/loading/{ → syncing-connecting}/StatusIcons-tooltip.scss
  24. +7 −7 source/renderer/app/components/loading/{ → syncing-connecting}/StatusIcons.js
  25. +1 −1 source/renderer/app/components/loading/{ → syncing-connecting}/StatusIcons.scss
  26. +259 −0 source/renderer/app/components/loading/syncing-connecting/SyncingConnecting.js
  27. +20 −0 source/renderer/app/components/loading/syncing-connecting/SyncingConnecting.scss
  28. +188 −0 source/renderer/app/components/loading/syncing-connecting/SyncingConnectingTitle.js
  29. +32 −0 source/renderer/app/components/loading/syncing-connecting/SyncingConnectingTitle.scss
  30. +12,112 −0 source/renderer/app/components/loading/syncing-connecting/logo-animation-data.json
  31. +5 −5 ...enderer/app/components/loading/{SystemTimeErrorOverlay.js → system-time-error/SystemTimeError.js}
  32. +2 −2 ...rer/app/components/loading/{SystemTimeErrorOverlay.scss → system-time-error/SystemTimeError.scss}
  33. +1 −1 source/renderer/app/components/staking/countdown/StakingCountdown.js
  34. +2 −1 source/renderer/app/components/staking/countdown/StakingCountdown.scss
  35. +1 −1 source/renderer/app/components/staking/info/StakingInfo.js
  36. +2 −1 source/renderer/app/components/staking/info/StakingInfo.scss
  37. +1 −1 source/renderer/app/components/status/BlockConsolidationStatus.js
  38. +2 −1 source/renderer/app/components/status/BlockConsolidationStatus.scss
  39. +22 −10 source/renderer/app/components/status/DaedalusDiagnostics.js
  40. +10 −4 source/renderer/app/components/status/DaedalusDiagnostics.scss
  41. +0 −188 source/renderer/app/containers/LoadingPage.js
  42. +1 −1 source/renderer/app/containers/Root.js
  43. +54 −0 source/renderer/app/containers/loading/LoadingPage.js
  44. +27 −0 source/renderer/app/containers/loading/ManualUpdatePage.js
  45. +30 −0 source/renderer/app/containers/loading/NoDiskSpaceErrorPage.js
  46. +95 −0 source/renderer/app/containers/loading/SyncingConnectingPage.js
  47. +38 −0 source/renderer/app/containers/loading/SystemTimeErrorPage.js
  48. +5 −5 source/renderer/app/i18n/locales/de-DE.json
  49. +304 −304 source/renderer/app/i18n/locales/defaultMessages.json
  50. +5 −5 source/renderer/app/i18n/locales/en-US.json
  51. +5 −5 source/renderer/app/i18n/locales/hr-HR.json
  52. +5 −5 source/renderer/app/i18n/locales/ja-JP.json
  53. +5 −5 source/renderer/app/i18n/locales/ko-KR.json
  54. +5 −5 source/renderer/app/i18n/locales/zh-CN.json
  55. +6 −0 source/renderer/app/stores/NetworkStatusStore.js
  56. +138 −182 source/renderer/app/themes/daedalus/cardano.js
  57. +137 −182 source/renderer/app/themes/daedalus/dark-blue.js
  58. +137 −182 source/renderer/app/themes/daedalus/light-blue.js
  59. +12 −0 source/renderer/app/themes/types.js
  60. +109 −0 source/renderer/app/themes/utils/checkCreateTheme.js
  61. +32 −0 source/renderer/app/themes/utils/constants.js
  62. +32 −16 source/renderer/app/themes/utils/createTheme.js
  63. +13 −0 source/renderer/app/themes/utils/index.js
  64. +4 −0 source/renderer/app/types/injectedPropsType.js
  65. +13 −0 storybook/stories/Loading-ManualUpdate.stories.js
  66. +13 −0 storybook/stories/Loading-NoDiskSpaceError.stories.js
  67. +104 −0 storybook/stories/Loading-SyncingConnecting.stories.js
  68. +17 −0 storybook/stories/Loading-SystemTimeError.stories.js
  69. +18 −175 storybook/stories/Loading.stories.js
  70. +0 −19 storybook/stories/ManualUpdateOverlay.stories.js
  71. +0 −1 storybook/stories/index.js
  72. +1,381 −67 yarn.lock
@@ -5,11 +5,12 @@ Changelog

### Features

- Implemented the animated Daedalus logo on the "Loading" screens ([PR 1457](https://github.com/input-output-hk/daedalus/pull/1457))
- Implemented "Delegation Setup wizard" steps 3 & 4 UI ([PR 1439](https://github.com/input-output-hk/daedalus/pull/1439))
- Improved "Connectivity/Sync trouble notification" ([PR 1453](https://github.com/input-output-hk/daedalus/pull/1453))
- Implemented "Delegation Setup wizard" step 2 UI ([PR 1430](https://github.com/input-output-hk/daedalus/pull/1430))
- Improved loading screen status icons UX ([PR 1452](https://github.com/input-output-hk/daedalus/pull/1452))
- Implemented external links icon UI ([PR 1447](https://github.com/input-output-hk/daedalus/pull/1447))
- Implemented external links icon UI ([PR 1447](https://github.com/input-output-hk/daedalus/pull/1447), [PR 1455](https://github.com/input-output-hk/daedalus/pull/1455))
- Implemented "Delegation center screen" UI ([PR 1440](https://github.com/input-output-hk/daedalus/pull/1440))
- Implemented "Delegation Setup wizard" steps 0 & 1 UI ([PR 1416](https://github.com/input-output-hk/daedalus/pull/1416)), [PR 1442](https://github.com/input-output-hk/daedalus/pull/1442))
- Implemented "Current and Previous Epochs screen" UI ([PR 1418](https://github.com/input-output-hk/daedalus/pull/1418))
@@ -33,6 +34,7 @@ Changelog

### Fixes

- Fixed shutting down screen top priority ([PR 1428](https://github.com/input-output-hk/daedalus/pull/1428))
- Fixed screen flashes during Daedalus loading ([PR 1444](https://github.com/input-output-hk/daedalus/pull/1444))
- Removes files pushed without running Prettier ([PR 1445](https://github.com/input-output-hk/daedalus/pull/1445))
- Improved Stake pool tooltip positioning ([PR 1429](https://github.com/input-output-hk/daedalus/pull/1429))
@@ -51,6 +53,9 @@ Changelog

### Chores

- Improved the "Ada redemption" menu item UX by disabling the option while Daedalus is out of sync ([PR 1458](https://github.com/input-output-hk/daedalus/pull/1458))
- Added `themes:check` script for checking missing definitions on createTheme object ([PR 1424](https://github.com/input-output-hk/daedalus/pull/1424))
- Refactored the Loading screen, adding containers for each overlay ([PR 1446](https://github.com/input-output-hk/daedalus/pull/1446))
- Added button to open local state directory on Daedalus Diagnostics Screen ([PR 1438](https://github.com/input-output-hk/daedalus/pull/1438))
- Updated the list of contributors on the "About" screen ([PR 1450](https://github.com/input-output-hk/daedalus/pull/1450))
- Improved switching of the application menu screens ([PR 1419](https://github.com/input-output-hk/daedalus/pull/1419))
@@ -33,7 +33,7 @@ Then(/^I should see the loading screen with "([^"]*)"$/, async function(
message
) {
await waitUntilTextInSelector(this.client, {
selector: '.Loading_connecting h1',
selector: '.SyncingConnectingTitle_connecting h1',
text: message,
});
});
@@ -6,7 +6,7 @@ import i18n from '../helpers/i18n-helpers';

const SELECTORS = {
MANUAL_UPDATE_VERSION_INFO:
'.ManualUpdateOverlay_content .ManualUpdateOverlay_description p:nth-child(2)',
'.ManualUpdate_content .ManualUpdate_description p:nth-child(2)',
};

const currentAppVersion = environment.version;
@@ -28,7 +28,7 @@ When(/^Daedalus is stuck in connecting state$/, async function() {
});

Then(/^I should see the "Manual Update" overlay$/, function() {
return this.client.waitForVisible('.ManualUpdateOverlay_content');
return this.client.waitForVisible('.ManualUpdate_content');
});

Then(
@@ -40,7 +40,7 @@ Then(
);

let expectedText = await i18n.formatMessage(this.client, {
id: 'manualUpdateOverlay.description2',
id: 'manualUpdate.description2',
values: {
currentAppVersion,
availableAppVersion: nextAppVersion,
@@ -11,5 +11,5 @@ Given(/^I set wrong local time difference$/, async function() {
});

Then(/^I should see system time error overlay$/, function() {
return this.client.waitForVisible('.SystemTimeErrorOverlay_component');
return this.client.waitForVisible('.SystemTimeError_component');
});
@@ -3,7 +3,7 @@ import { Given, When, Then } from 'cucumber';
let diskSpaceRequired;
const HUNDRED_TB = 100 * 1e12; // 100 TB | unit: bytes
const ONE_KB = 1 * 1000; // 1 KB | unit: bytes
const NO_DISK_SPACE_COMPONENT = '.NoDiskSpaceErrorOverlay_component';
const NO_DISK_SPACE_COMPONENT = '.NoDiskSpaceError_component';

Given(/^I set the required space to 100 TB$/, () => {
diskSpaceRequired = HUNDRED_TB;
@@ -2,13 +2,17 @@ import { Then, When } from 'cucumber';
import { waitUntilTextInSelector } from '../helpers/shared-helpers';

const SELECTORS = {
LOADING_COMPONENT: '.Loading_component',
REPORT_ISSUE_TEXT_H1: '.Loading_reportIssueText',
REPORT_ISSUE_BUTTON: '.Loading_reportIssueButton',
SYNCING_CONNECTING_COMPONENT: '.SyncingConnecting_component',
REPORT_ISSUE_TEXT_H1: '.ReportIssue_reportIssueText',
REPORT_ISSUE_BUTTON: '.ReportIssue_actionButton.reportIssueButton',
};

Then(/^I should not see the loading screen$/, async function() {
await this.client.waitForVisible(SELECTORS.LOADING_COMPONENT, null, true);
await this.client.waitForVisible(
SELECTORS.SYNCING_CONNECTING_COMPONENT,
null,
true
);
});

Then(
@@ -16,7 +16,7 @@ When(

Then(/^I should see the syncing status with "([^"]*)"$/, async function(text) {
await waitUntilTextInSelector(this.client, {
selector: '.Loading_syncing h1',
selector: '.SyncingConnectingTitle_syncing h1',
text,
});
});
@@ -3,6 +3,7 @@ const webpack = require('webpack');
const webpackStream = require('webpack-stream');
const shell = require('gulp-shell');
const electronConnect = require('electron-connect');
const flowRemoveTypes = require('gulp-flow-remove-types');
const mainWebpackConfig = require('./source/main/webpack.config');
const rendererWebpackConfig = require('./source/renderer/webpack.config');

@@ -113,6 +114,30 @@ gulp.task('build:renderer:watch', buildRendererWatch());

gulp.task('build', gulp.series('clean:dist', 'build:main', 'build:renderer'));

gulp.task('prepare:themes:utils', () =>
gulp
.src([
'source/renderer/app/themes/utils/checkCreateTheme.js',
'source/renderer/app/themes/utils/constants.js',
'source/renderer/app/themes/utils/createTheme.js',
'source/renderer/app/themes/utils/createShades.js',
'source/renderer/app/themes/utils/index.js',
])
.pipe(flowRemoveTypes())
.pipe(gulp.dest('dist/utils'))
);

gulp.task('prepare:themes:daedalus', () =>
gulp
.src([
'source/renderer/app/themes/daedalus/cardano.js',
'source/renderer/app/themes/daedalus/dark-blue.js',
'source/renderer/app/themes/daedalus/light-blue.js',
])
.pipe(flowRemoveTypes())
.pipe(gulp.dest('dist/daedalus'))
);

gulp.task(
'build:watch',
gulp.series(
@@ -124,6 +149,11 @@ gulp.task(
)
);

gulp.task(
'build:themes',
gulp.series('clean:dist', 'prepare:themes:utils', 'prepare:themes:daedalus')
);

gulp.task(
'test:e2e:nodemon',
shell.task(
@@ -28,6 +28,7 @@
"manage:translations": "gulp purge:translations && gulp clear:cache && gulp build && node ./translations/translation-runner.js",
"storybook": "start-storybook -p 6006 -c storybook",
"storybook:build": "build-storybook -c storybook -o dist/storybook",
"themes:check": "gulp build:themes && node -r esm ./dist/utils/index.js",
"clear:cache": "gulp clear:cache",
"nix:dev": "nix-shell --arg autoStartBackend true --arg allowFaultInjection true --arg systemStart",
"nix:staging": "nix-shell --arg autoStartBackend true --argstr cluster staging"
@@ -61,6 +62,7 @@
"bufferutil": "4.0.0",
"cache-loader": "2.0.1",
"chai": "4.2.0",
"chalk": "2.4.2",
"concurrently": "4.1.0",
"cross-env": "5.2.0",
"css-loader": "2.0.1",
@@ -85,9 +87,11 @@
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-promise": "4.0.1",
"eslint-plugin-react": "7.11.1",
"esm": "3.2.25",
"faker": "4.1.0",
"file-loader": "2.0.0",
"flow-bin": "0.98.1",
"gulp-flow-remove-types": "1.0.0",
"gulp-shell": "0.6.5",
"hash.js": "1.1.7",
"html-loader": "0.5.5",
@@ -162,6 +166,7 @@
"react-dom": "16.6.3",
"react-dropzone": "4.2.3",
"react-intl": "2.7.2",
"react-lottie": "1.2.3",
"react-markdown": "3.1.0",
"react-number-format": "3.0.3",
"react-polymorph": "0.8.7",
@@ -18,6 +18,7 @@ export const osxMenu = (
actions: MenuActions,
translations: {},
supportRequestData: SupportRequests,
isNodeInSync: boolean,
translation: Function = getTranslation(translations, id)
) => [
{
@@ -31,6 +32,7 @@ export const osxMenu = (
},
{
label: translation('daedalus.adaRedemption'),
enabled: isNodeInSync,
click() {
actions.openAdaRedemptionScreen();
},
@@ -18,6 +18,7 @@ export const winLinuxMenu = (
actions: MenuActions,
translations: {},
supportRequestData: SupportRequests,
isNodeInSync: boolean,
translation: Function = getTranslation(translations, id)
) => [
{
@@ -31,6 +32,7 @@ export const winLinuxMenu = (
},
{
label: translation('daedalus.adaRedemption'),
enabled: isNodeInSync,
click() {
actions.openAdaRedemptionScreen();
},
@@ -1,5 +1,6 @@
// @flow
import { app, globalShortcut, Menu, BrowserWindow } from 'electron';
import { get } from 'lodash';
import { environment } from '../environment';
import { winLinuxMenu } from '../menus/win-linux';
import { osxMenu } from '../menus/osx';
@@ -92,9 +93,17 @@ export const buildAppMenus = async (

// Build app menus
let menu;
const isNodeInSync = get(cardanoNode, 'status.isNodeInSync', false);
if (isMacOS) {
menu = Menu.buildFromTemplate(
osxMenu(app, mainWindow, menuActions, translations, supportRequestData)
osxMenu(
app,
mainWindow,
menuActions,
translations,
supportRequestData,
isNodeInSync
)
);
Menu.setApplicationMenu(menu);
} else {
@@ -104,7 +113,8 @@ export const buildAppMenus = async (
mainWindow,
menuActions,
translations,
supportRequestData
supportRequestData,
isNodeInSync
)
);
mainWindow.setMenu(menu);

0 comments on commit 9fd3bfd

Please sign in to comment.
You can’t perform that action at this time.