From d62d1e07ae9a7e4e8ba3c2ba437993096785602d Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 18 Jul 2019 00:42:52 +0300 Subject: [PATCH 1/3] Remove unused css, remove moment.js localization files except EN --- CHANGELOG.md | 1 + .../block_scout_web/assets/css/components/_footer.scss | 4 ---- .../assets/css/components/_network-selector.scss | 10 ---------- apps/block_scout_web/assets/webpack.config.js | 4 +++- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c5933961e..fb5372ba77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - [#2294](https://github.com/poanetwork/blockscout/pull/2294) - add healthy block period checking endpoint ### Fixes +- [#2378](https://github.com/poanetwork/blockscout/pull/2378) - Page performance: exclude moment.js localization files except EN, remove unused css - [#2375](https://github.com/poanetwork/blockscout/pull/2375) - Update created_contract_code_indexed_at on transaction import conflict - [#2346](https://github.com/poanetwork/blockscout/pull/2346) - Avoid fetching internal transactions of blocks that still need refetching - [#2350](https://github.com/poanetwork/blockscout/pull/2350) - fix invalid User agent headers diff --git a/apps/block_scout_web/assets/css/components/_footer.scss b/apps/block_scout_web/assets/css/components/_footer.scss index be1c10d44a..f2eae03c3f 100644 --- a/apps/block_scout_web/assets/css/components/_footer.scss +++ b/apps/block_scout_web/assets/css/components/_footer.scss @@ -61,10 +61,6 @@ $footer-logo-width: auto !default; } } -.footer-info { - padding-top: 1em; -} - .footer-link { color: $footer-link-color; diff --git a/apps/block_scout_web/assets/css/components/_network-selector.scss b/apps/block_scout_web/assets/css/components/_network-selector.scss index 8c433f28c3..e8b5f72e78 100644 --- a/apps/block_scout_web/assets/css/components/_network-selector.scss +++ b/apps/block_scout_web/assets/css/components/_network-selector.scss @@ -287,16 +287,6 @@ $network-selector-item-icon-dimensions: 30px !default; } } -.network-selector-load-more-container { - flex-shrink: 1; - padding: 0 $network-selector-horizontal-padding; - - .btn-network-selector-load-more { - @include btn-line($btn-network-selector-load-more-background, $btn-network-selector-load-more-color); - width: 100%; - } -} - .network-selector-item-favorite { align-items: center; cursor: pointer; diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index 63c796d3f7..08a2f410e7 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -1,6 +1,7 @@ const path = require('path'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); +const { ContextReplacementPlugin } = require('webpack') const glob = require("glob"); function transpileViewScript(file) { @@ -74,7 +75,8 @@ const appJs = }, plugins: [ new ExtractTextPlugin('../css/app.css'), - new CopyWebpackPlugin([{ from: 'static/', to: '../' }]) + new CopyWebpackPlugin([{ from: 'static/', to: '../' }]), + new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/) ] } From 345d0247af3cd095462aef9459cc2db28b86763e Mon Sep 17 00:00:00 2001 From: saneery Date: Thu, 18 Jul 2019 11:50:19 +0300 Subject: [PATCH 2/3] Disable network selector when is empty --- .../lib/block_scout_web/templates/layout/_topnav.html.eex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index f152ec6bf9..f965f20e0c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -82,7 +82,7 @@