Skip to content

Commit

Permalink
[DDW-696] Update createTheme Definitions (#1424)
Browse files Browse the repository at this point in the history
* [DDW-696] Fixes name of button key in createTheme

* [DDW-696] Cleans up react-polymorph theme definitions in cardano theme

* [DDW-696] Cleans up react-polymorph theme definitions in dark-blue theme

* [DDW-696] Cleans up react-polymorph theme definitions in light-blue theme

* [DDW-696] Fixes key names in createTheme react-polymorph components, and adds coverage for manualUpdate

* [DDW-696] Exports theme config objects

* [DDW-696] Adds check for write property in createTheme params

* [DDW-696] Creates writeCSSVariables.css

* [DDW-696] Adds checkCreateTheme.js and splits update logic into new file named updateThemes.js

* [DDW-696] Fixes flow error

* [DDW-696] Adds script for chekcing createTheme missing definitions

* [DDW-696] Refactors checkCreateTheme to produce intended behavior

* [DDW-696] Adds chalk.js as a dev dependency

* [DDW-696] Adds gulp pipeline which allows themes to be tested in a Node environment

* [DDW-696] Adds esm and gulp-flow-remove-types packages for running theme checks and updates in a Node environment

* [DDW-696] Removes update functionality from createTheme.js (see DDW-697)

* Sets up the correct implementation of checkCreateTheme and connects it to the themes:check script

* Fixes error in createTheme.js after merging develop

* Automatic update for defaultMessages.json

* Fixes ESlint error

* [DDW-696] Fixes ESlint comment

* [DDW-696] Adds missing 'staking' CSS vars to createTheme.js

* [DDW-696] Adds console message to checkCreateTheme.js for no missing defs case

* [DDW-696] Updates CHANGELOG

* [DDW-696] Mutes unnecessary flow error

* [DDW-696] Freeze package.json packages, Fix yarn.lock

* [DDW-696] Improve CHANGELOG
  • Loading branch information
MarcusHurney authored and nikolaglumac committed Jul 11, 2019
1 parent 5921385 commit d617f54
Show file tree
Hide file tree
Showing 12 changed files with 1,995 additions and 612 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Changelog

### Chores

- 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))
Expand Down
30 changes: 30 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
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
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
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

0 comments on commit d617f54

Please sign in to comment.