Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Reduce js bundle size #15721

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Jul 15, 2021

SUMMARY

This PR:

  • replaces react-icons with @react-icons/all-files in superset-ui packages to enable treeshaking of the unused icons
  • removes react-icons from Superset proper

As an example, spa.js goes from 7.62MB to 6.42MB

Note that this pulls in some other changes from superset-ui, @kgabryje could you verify that these are fine to merge too? Thanks!

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before bundle size and existence of react-icons:
Screen Shot 2021-07-15 at 5 13 57 PM
Screen Shot 2021-07-15 at 7 29 15 PM

after:
Screen Shot 2021-07-15 at 10 46 57 PM
Screen Shot 2021-07-15 at 10 44 19 PM

TESTING INSTRUCTIONS

CI, load a dashboard with a table and ensure the icons render

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

to: @ktmud @graceguo-supercat @kgabryje

@codecov
Copy link

codecov bot commented Jul 15, 2021

Codecov Report

Merging #15721 (28a9093) into master (b489cff) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #15721   +/-   ##
=======================================
  Coverage   76.82%   76.83%           
=======================================
  Files         983      983           
  Lines       51585    51581    -4     
  Branches     6974     6979    +5     
=======================================
  Hits        39632    39632           
+ Misses      11729    11727    -2     
+ Partials      224      222    -2     
Flag Coverage Δ
javascript 71.35% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/SqlLab/actions/sqlLab.js 58.97% <0.00%> (ø)
superset-frontend/src/setup/setupErrorMessages.ts 0.00% <0.00%> (ø)
superset-frontend/src/dashboard/actions/hydrate.js 1.70% <0.00%> (ø)
...set-frontend/src/dashboard/containers/Dashboard.ts 0.00% <0.00%> (ø)
...rontend/src/dashboard/containers/DashboardPage.tsx 0.00% <0.00%> (ø)
...ontend/src/common/hooks/apiResources/dashboards.ts 40.00% <0.00%> (ø)
...set-frontend/src/dashboard/reducers/datasources.js
...rset-frontend/src/dashboard/actions/datasources.js
...rset-frontend/src/dashboard/actions/datasources.ts 25.00% <0.00%> (ø)
...set-frontend/src/dashboard/reducers/datasources.ts 75.00% <0.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b489cff...28a9093. Read the comment docs.

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change pulls in conditional formatting for Table chart, which is fine 👍

@etr2460 etr2460 merged commit fe68e45 into apache:master Jul 16, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants