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: dynamically load modals #1802

Merged
merged 9 commits into from
Oct 16, 2023
Merged

fix: dynamically load modals #1802

merged 9 commits into from
Oct 16, 2023

Conversation

grothem
Copy link
Collaborator

@grothem grothem commented Oct 3, 2023

General Changes

  • Reduce first load size by dynamically importing modals as they are needed
  • Deleted a couple of unused dependencies

Author Checklist

Please ensure you, the author, have gone through this checklist to ensure there is an efficient workflow for the reviewers.

  • The base branch is set to main
  • The title is using Conventional Commit formatting
  • The Github issue has been linked to the PR in the Development section
  • The General Changes section has been filled out
  • Developer Notes have been added (optional)

If the PR is ready for review:

  • The PR is in Open state and not in Draft mode
  • The Ready for Dev Review label has been added

Reviewer Checklist

Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.

  • End-to-end tests are passing without any errors
  • Code style generally follows existing patterns
  • Code changes do not significantly increase the application bundle size
  • If there are new 3rd-party packages, they do not introduce potential security threats
  • If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • There are no CI changes, or they have been approved by the DevOps and Engineering team(s)
  • Code changes have been quality checked in the ephemeral URL
  • QA verification has been completed
  • There are two or more approvals from the core team
  • Squash and merge has been checked

@height
Copy link

height bot commented Oct 3, 2023

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 482.12 KB (🟢 -91.43 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Thirteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 93.46 KB (🔴 +49.75 KB) 575.58 KB
/404 19.86 KB (🔴 +13.26 KB) 501.98 KB
/500 20.28 KB (🔴 +13.24 KB) 502.4 KB
/faucet 44.88 KB (🔴 +21.92 KB) 527 KB
/governance 94.27 KB (🟡 +14.53 KB) 576.39 KB
/governance/ipfs-preview 126.55 KB (🟡 +18.23 KB) 608.68 KB
/governance/proposal 126.71 KB (🟡 +18.23 KB) 608.84 KB
/governance/proposal/[proposalId] 81.33 KB (🔴 +18.13 KB) 563.45 KB
/history 54.31 KB (🔴 +22.6 KB) 536.43 KB
/markets 41.41 KB (🔴 +22.7 KB) 523.54 KB
/reserve-overview 43.2 KB (🔴 +27.8 KB) 525.32 KB
/staking 40.66 KB (🔴 +18.97 KB) 522.78 KB
/v3-migration 52.56 KB (🔴 +23.24 KB) 534.68 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 482.12 KB (🟢 -91.44 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Thirteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 93.46 KB (🔴 +49.75 KB) 575.57 KB
/404 19.86 KB (🔴 +13.26 KB) 501.97 KB
/500 20.28 KB (🔴 +13.24 KB) 502.4 KB
/faucet 44.88 KB (🔴 +21.92 KB) 526.99 KB
/governance 94.27 KB (🟡 +14.53 KB) 576.39 KB
/governance/ipfs-preview 126.55 KB (🟡 +18.23 KB) 608.67 KB
/governance/proposal 126.71 KB (🟡 +18.23 KB) 608.83 KB
/governance/proposal/[proposalId] 81.33 KB (🔴 +18.13 KB) 563.44 KB
/history 54.31 KB (🔴 +22.6 KB) 536.42 KB
/markets 41.41 KB (🔴 +22.7 KB) 523.53 KB
/reserve-overview 43.2 KB (🔴 +27.8 KB) 525.31 KB
/staking 40.66 KB (🔴 +18.97 KB) 522.78 KB
/v3-migration 52.56 KB (🔴 +23.24 KB) 534.68 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 482.96 KB (🟢 -91.51 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Thirteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 93.46 KB (🔴 +49.75 KB) 576.42 KB
/404 19.86 KB (🔴 +13.26 KB) 502.82 KB
/500 20.28 KB (🔴 +13.24 KB) 503.24 KB
/faucet 44.88 KB (🔴 +21.92 KB) 527.83 KB
/governance 94.27 KB (🟡 +14.53 KB) 577.23 KB
/governance/ipfs-preview 126.55 KB (🟡 +18.23 KB) 609.51 KB
/governance/proposal 126.71 KB (🟡 +18.23 KB) 609.67 KB
/governance/proposal/[proposalId] 81.33 KB (🔴 +18.13 KB) 564.28 KB
/history 54.31 KB (🔴 +22.6 KB) 537.26 KB
/markets 41.41 KB (🔴 +22.7 KB) 524.37 KB
/reserve-overview 43.2 KB (🔴 +27.8 KB) 526.16 KB
/staking 40.66 KB (🔴 +18.97 KB) 523.62 KB
/v3-migration 52.56 KB (🔴 +23.24 KB) 535.52 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 482.96 KB (🟢 -91.51 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Thirteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 93.46 KB (🔴 +49.75 KB) 576.42 KB
/404 19.86 KB (🔴 +13.26 KB) 502.82 KB
/500 20.28 KB (🔴 +13.24 KB) 503.24 KB
/faucet 44.88 KB (🔴 +21.92 KB) 527.83 KB
/governance 94.27 KB (🟡 +14.53 KB) 577.23 KB
/governance/ipfs-preview 126.55 KB (🟡 +18.23 KB) 609.51 KB
/governance/proposal 126.71 KB (🟡 +18.23 KB) 609.67 KB
/governance/proposal/[proposalId] 81.33 KB (🔴 +18.13 KB) 564.28 KB
/history 54.31 KB (🔴 +22.6 KB) 537.26 KB
/markets 41.41 KB (🔴 +22.7 KB) 524.37 KB
/reserve-overview 43.2 KB (🔴 +27.8 KB) 526.16 KB
/staking 40.66 KB (🔴 +18.97 KB) 523.62 KB
/v3-migration 52.56 KB (🔴 +23.24 KB) 535.52 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@grothem
Copy link
Collaborator Author

grothem commented Oct 5, 2023

Page size increases are misleading, see this issue: hashicorp/nextjs-bundle-analysis#82

@grothem grothem added Ready for QA Review Ready for QA engineer reviews Ready for Dev Review Read for frontend engineer reviews labels Oct 5, 2023
# Conflicts:
#	src/layouts/WalletWidget.tsx
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 488.7 KB (🟢 -85.66 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Thirteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 89.17 KB (🔴 +45.32 KB) 577.87 KB
/404 16.04 KB (🔴 +9.44 KB) 504.73 KB
/500 16.46 KB (🔴 +9.42 KB) 505.15 KB
/faucet 41.06 KB (🔴 +18.11 KB) 529.76 KB
/governance 90.03 KB (🟡 +10.28 KB) 578.72 KB
/governance/ipfs-preview 122.73 KB (🟡 +14.41 KB) 611.43 KB
/governance/proposal 122.9 KB (🟡 +14.42 KB) 611.59 KB
/governance/proposal/[proposalId] 77.51 KB (🟡 +14.32 KB) 566.21 KB
/history 50.49 KB (🔴 +18.79 KB) 539.19 KB
/markets 36.97 KB (🔴 +18.26 KB) 525.66 KB
/reserve-overview 38.84 KB (🔴 +23.44 KB) 527.54 KB
/staking 36.41 KB (🔴 +14.73 KB) 525.11 KB
/v3-migration 48.29 KB (🔴 +18.96 KB) 536.99 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

@MareskoY MareskoY added QC Passed and removed Ready for QA Review Ready for QA engineer reviews labels Oct 6, 2023
MareskoY
MareskoY previously approved these changes Oct 6, 2023
@grothem grothem dismissed stale reviews from JoaquinBattilana and MareskoY via b53e8b0 October 16, 2023 16:30
@github-actions
Copy link

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 487.28 KB (🟢 -87.08 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Thirteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 89.16 KB (🔴 +45.32 KB) 576.44 KB
/404 16.04 KB (🔴 +9.44 KB) 503.31 KB
/500 16.46 KB (🔴 +9.42 KB) 503.74 KB
/faucet 41.06 KB (🔴 +18.11 KB) 528.34 KB
/governance 90.03 KB (🟡 +10.28 KB) 577.3 KB
/governance/ipfs-preview 122.73 KB (🟡 +14.4 KB) 610.01 KB
/governance/proposal 122.89 KB (🟡 +14.41 KB) 610.17 KB
/governance/proposal/[proposalId] 77.5 KB (🟡 +14.31 KB) 564.78 KB
/history 50.49 KB (🔴 +18.79 KB) 537.77 KB
/markets 36.97 KB (🔴 +18.26 KB) 524.25 KB
/reserve-overview 38.84 KB (🔴 +23.44 KB) 526.12 KB
/staking 36.41 KB (🔴 +14.73 KB) 523.69 KB
/v3-migration 48.29 KB (🔴 +18.96 KB) 535.57 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@github-actions
Copy link

@grothem grothem merged commit 2b8638c into main Oct 16, 2023
26 checks passed
@grothem grothem deleted the fix/dynamic-modals branch October 16, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QC Passed Ready for Dev Review Read for frontend engineer reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants