Skip to content

Commit

Permalink
Merge branch 'fix/ddw-745-staking-screen-improvements' of github.com:…
Browse files Browse the repository at this point in the history
…input-output-hk/daedalus into fix/ddw-745-staking-screen-improvements
  • Loading branch information
Tomislav Horaček committed Jul 11, 2019
2 parents 9f1f167 + 9ef151d commit 9fd3bfd
Show file tree
Hide file tree
Showing 72 changed files with 15,845 additions and 2,159 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Expand Up @@ -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))
Expand All @@ -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))
Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion features/tests/e2e/steps/app-steps.js
Expand Up @@ -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 changes: 3 additions & 3 deletions features/tests/e2e/steps/app-version-difference.js
Expand Up @@ -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;
Expand All @@ -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(
Expand All @@ -40,7 +40,7 @@ Then(
);

let expectedText = await i18n.formatMessage(this.client, {
id: 'manualUpdateOverlay.description2',
id: 'manualUpdate.description2',
values: {
currentAppVersion,
availableAppVersion: nextAppVersion,
Expand Down
2 changes: 1 addition & 1 deletion features/tests/e2e/steps/local-time-difference-steps.js
Expand Up @@ -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');
});
2 changes: 1 addition & 1 deletion features/tests/e2e/steps/no-disk-space.js
Expand Up @@ -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;
Expand Down
Expand Up @@ -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(
Expand Down
Expand Up @@ -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,
});
});
30 changes: 30 additions & 0 deletions gulpfile.js
Expand Up @@ -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');

Expand Down Expand Up @@ -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(
Expand All @@ -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(
Expand Down
5 changes: 5 additions & 0 deletions package.json
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions source/main/menus/osx.js
Expand Up @@ -18,6 +18,7 @@ export const osxMenu = (
actions: MenuActions,
translations: {},
supportRequestData: SupportRequests,
isNodeInSync: boolean,
translation: Function = getTranslation(translations, id)
) => [
{
Expand All @@ -31,6 +32,7 @@ export const osxMenu = (
},
{
label: translation('daedalus.adaRedemption'),
enabled: isNodeInSync,
click() {
actions.openAdaRedemptionScreen();
},
Expand Down
2 changes: 2 additions & 0 deletions source/main/menus/win-linux.js
Expand Up @@ -18,6 +18,7 @@ export const winLinuxMenu = (
actions: MenuActions,
translations: {},
supportRequestData: SupportRequests,
isNodeInSync: boolean,
translation: Function = getTranslation(translations, id)
) => [
{
Expand All @@ -31,6 +32,7 @@ export const winLinuxMenu = (
},
{
label: translation('daedalus.adaRedemption'),
enabled: isNodeInSync,
click() {
actions.openAdaRedemptionScreen();
},
Expand Down
14 changes: 12 additions & 2 deletions source/main/utils/buildAppMenus.js
@@ -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';
Expand Down Expand Up @@ -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 {
Expand All @@ -104,7 +113,8 @@ export const buildAppMenus = async (
mainWindow,
menuActions,
translations,
supportRequestData
supportRequestData,
isNodeInSync
)
);
mainWindow.setMenu(menu);
Expand Down

0 comments on commit 9fd3bfd

Please sign in to comment.