1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 04:20:53 +01:00
Commit Graph

133 Commits

Author SHA1 Message Date
Whymarrh Whitby
4d88e1cf86 Enable indent linting via ESLint (#6936)
* Enable indent linting via ESLint

* yarn run lint:fix
2019-07-31 10:17:11 -10:00
Mark Stacey
0f8a9a5d49
Serve CSS as an external file (#6894)
The CSS is now served as an external file instead of being injected.
This was done to improve performance. Ideally we would come to a middle
ground between this and the former behaviour by injecting only the CSS
that was required for the initial page load, then lazily loading the
rest. However that change would be more complex. The hope was that
making all CSS external would at least be a slight improvement.

Performance metrics were collected before and after this change to
determine whether this change actually helped. The metrics collected
were the timing events provided by Chrome DevTools:

* DOM Content Loaded (DCL) [1]
* Load (L) [2]
* First Paint (FP) [3]
* First Contentful Paint (FCP) [3]
* First Meaningful Paint (FMP) [3]

Here are the results (units in milliseconds):

Injected CSS:

| Run | DCL | L | FP | FCP | FMP |
| :--- | ---: | ---: | ---: | ---: | ---: |
| 1 | 1569.45 | 1570.97 | 1700.36 | 1700.36 | 1700.36 |
| 2 | 1517.37 | 1518.84 | 1630.98 | 1630.98 | 1630.98 |
| 3 | 1603.71 | 1605.31 | 1712.56 | 1712.56 | 1712.56 |
| 4 | 1522.15 | 1523.72 | 1629.3 | 1629.3 | 1629.3 |
| **Min** | 1517.37 | 1518.84 | 1629.3 | 1629.3 | 1629.3 |
| **Max** | 1603.71 | 1605.31 | 1712.56 | 1712.56 | 1712.56 |
| **Mean** | 1553.17 | 1554.71 | 1668.3 | 1668.3 | 1668.3 |
| **Std. dev.** | 33.41 | 33.43 | 38.16 | 38.16 | 38.16 |

External CSS:

| Run | DCL | L | FP | FCP | FMP |
| :--- | ---: | ---: | ---: | ---: | ---: |
| 1 | 1595.4 | 1598.91 | 284.97 | 1712.86 | 1712.86 |
| 2 | 1537.55 | 1538.99 | 199.38 | 1633.5 | 1633.5 |
| 3 | 1571.28 | 1572.74 | 268.65 | 1677.03 | 1677.03 |
| 4 | 1510.98 | 1512.33 | 206.72 | 1607.03 | 1607.03 |
| **Min** | 1510.98 | 1512.33 | 199.38 | 1607.03 | 1607.03 |
| **Max** | 1595.4 | 1598.91 | 284.97 | 1712.86 | 1712.86 |
| **Mean** | 1553.8025 | 1555.7425 | 239.93 | 1657.605 | 1657.605 |
| **Std. dev.** | 29.5375 | 30.0825 | 36.88 | 37.34 | 37.34 |

Unfortunately, using an external CSS file made no discernible improvement
to the overall page load time. DCM and L were practically identical, and
FCP and FMP were marginally better (well within error margins).

However, the first paint time was _dramatically_ improved. This change
seems worthwhile for the first paint time improvement alone. It also
allows us to delete some code and remove a dependency.

The old `css.js` module included two third-party CSS files as well, so
those have been imported into the main Sass file. This was easier than
bundling them in the gulpfile.

The resulting CSS bundle needs to be served from the root because we're
using a few `@include` rules that make this assumption. We could move
this under `/css/` if desired, but we'd need to update each of these
`@include` rules.

Relates to #6646

[1]: https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded
[2]: https://developer.mozilla.org/en-US/docs/Web/Events/load
[3]: https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics
2019-07-23 14:10:13 -03:00
Mark Stacey
7357f011c3
Set minimum browser version in manifest (#6877)
Set the minimum browser version supported in the extension manifest.
Currently we only ship the extension on Chrome and Firefox, so the
minimum version has been set for those two browsers.

Relates to #6805
2019-07-18 18:16:30 -03:00
Whymarrh Whitby
830c801ec3
Add React and Redux DevTools (#6793)
* Add React and Redux DevTools

* Conditionally load react-devtools

* Add start:dev npm script to run the app with devtools

Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
2019-07-11 12:27:06 -02:30
Mark Stacey
c7608e6fe9
Remove disc (#6801)
The `disc` gulp command no longer works. I wasn't able to fix this
easily, so instead it has been removed. We can probably find something
better to replace it with.
2019-07-04 11:54:10 -03:00
Mark Stacey
9fd8a3d46e
Move Browserify transforms to gulpfile (#6768)
The flat tests also rely upon these transformations, yet invoke
browserify from the command line rather than using the gulpfile. The
transformations have been specified on the command line for those
instead.

Of course it's not ideal to have the same transformations listed in two
different places, but the plan is to delete the flat tests soon anyway,
so this should suffice until then.

Closes #4538
2019-07-01 21:26:24 -03:00
Mark Stacey
3f8c9126fd
Use inline source maps in development (#6754)
There is currently a bug in chrome that prevents reading source maps
from a local file [0]. This was preventing Chrome DevTools from using
our JavaScript source maps, where were saved as `.map` files. To work
around this problem the source maps are now generated inline, which
seems to work fine.

The only other browser I tested this with was Firefox, which works both
before and after this change.

[0]: https://bugs.chromium.org/p/chromium/issues/detail?id=931675
2019-06-26 14:05:57 -03:00
Brian R. Bondy
7afe81a421 Add brave as a platform type for MetaMask 2019-06-19 12:53:38 -04:00
Whymarrh Whitby
094e4cf555 Check for unused function arguments (#6583)
* eslint: Check for unused function arguments

* eslint: Ignore unused '_' in argument list

Also allow any number of '_' e.g., '__' or '___' which is to be used sparingly

* Remove and rename unused arguments
2019-05-08 15:51:33 -04:00
Whymarrh Whitby
7fc84f3cc0 ci: Add build:test Gulp task for e2e build 2019-03-29 11:13:39 -02:30
Dan Miller
10097b6a11 Default to localhost network when running e2e tests 2019-03-28 16:20:11 -02:30
Dan Miller
a44f2bb6eb Use webRequest to cancel all requests to infura in e2e tests. 2019-03-28 16:20:11 -02:30
kumavis
48047f8194 mascara - remove from project (#6283) 2019-03-12 11:17:21 -02:30
Dan Finlay
f507f2a927 Feature Flag + Mobile Sync (#5955) 2019-02-25 15:40:13 -03:30
Dan Miller
a44596ec0d Add c3 and d3 to the separate dependencies bundle. 2018-12-04 00:06:22 -03:30
brunobar79
484aa6801e Merge branch 'develop' into trezor-v5 2018-11-13 17:21:15 -05:00
Dan Miller
da5f4a792c Bundle some ui dependencies separately to limit the build size of ui.js 2018-10-31 20:47:22 -02:30
brunobar79
9c1b2108f6 fix merge conflicts 2018-10-21 01:59:53 -04:00
William Chong
ea214945cf Set NODE_ENV when generating bundler (#4983) 2018-10-18 14:20:56 -02:30
brunobar79
13820b6cc1 fix conflicts 2018-10-16 14:01:54 -04:00
Thomas Huang
8c3091aa7a
Merge pull request #5053 from hahnmichaelf/esdb-support
Link to ESDB in local phishing.html
2018-09-27 10:19:06 -05:00
brunobar79
c13e5cbda3 remove css sourcemaps in prod builds 2018-09-25 20:40:55 -04:00
hahnmichaelf
4808ce25eb fix for lint-test 2018-08-13 13:16:37 -04:00
hahnmichaelf
e454a5e0e8 fixed names 2018-08-13 12:56:35 -04:00
hahnmichaelf
8fb2dfe3d7 Re-added GA script 2018-08-13 12:47:18 -04:00
hahnmichaelf
9666eaba66 base - working. fixes #4774 2018-08-12 18:57:58 -04:00
brunobar79
aaed44f1ec trezor v5 working on firefox 2018-08-05 02:43:02 -04:00
brunobar79
a8f745f9fe eslint --fix . 2018-07-02 18:49:33 -04:00
brunobar79
cc11a62397 remove gulp eslint and cleanup gulpfile 2018-07-02 18:35:53 -04:00
kumavis
5f3f8c85fc
Merge pull request #4059 from MetaMask/i-4033-seed-words
Use new design for Reveal Seed screen. Persist seed words only in the first time flow.
2018-04-30 12:04:53 -06:00
kumavis
5c9cb0b787 build - minify via gulp-uglify-es instead of uglifyify 2018-04-27 18:15:50 -07:00
Alexander Tseung
3082d2e4ef Use new design for reveal seed screen. Persist seed words only in first time flow 2018-04-22 09:24:21 -07:00
kumavis
00657e14a8 build - correctly set METAMASK_ENV via envify 2018-04-03 09:51:33 -07:00
kumavis
655593ea62 Merge branch 'master' of github.com:MetaMask/metamask-extension into build-perf 2018-04-02 16:28:33 -07:00
kumavis
fa66b78b8b
Merge branch 'master' into lint-sys-fix 2018-04-02 15:03:54 -07:00
kumavis
2b6557a024 lint - lint json files in app/ 2018-04-02 14:47:47 -07:00
kumavis
4dd2bfade1 lint - include old ui 2018-04-02 12:44:13 -07:00
kumavis
bd6f554766 build - use uglifyify and gulp-multi-process for better performance 2018-03-30 22:19:02 -07:00
kumavis
80839eebe4 build - properly set GULP_METAMASK_DEBUG on dev 2018-03-30 15:09:25 -07:00
kumavis
99e618d3f2 mascara - server - serve bundles from dist 2018-03-29 23:06:01 -07:00
kumavis
433bb0f01a build - split primary tasks into metamask + extension * dev + build 2018-03-29 22:34:59 -07:00
kumavis
edd70bd13e build - cleanup commented code 2018-03-29 22:20:24 -07:00
kumavis
7b9b890aa9 build - fix scss + js reload 2018-03-29 22:19:15 -07:00
kumavis
b2d0e9871c build - fix copy devMode 2018-03-29 21:53:38 -07:00
kumavis
4606a23c3f build - refactor scss compilation into single config 2018-03-29 21:28:35 -07:00
kumavis
77d4a9a2bb build - dev - fix js build order 2018-03-29 17:37:49 -07:00
kumavis
7067f63627 build - dev - run js tasks in parallel and set watch flag 2018-03-29 17:34:30 -07:00
kumavis
86c7c6746d build - refactor copy and copy:watch (renamed to copy:dev) 2018-03-28 23:11:07 -07:00
kumavis
253abd60fc build - extension - move js files to toplevel 2018-03-28 21:29:57 -07:00
kumavis
b88119c238 build - mascara - copy proxy html 2018-03-28 20:54:59 -07:00