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

Feat/React query 5-2, gho hooks #1860

Merged
merged 27 commits into from
Feb 22, 2024
Merged

Feat/React query 5-2, gho hooks #1860

merged 27 commits into from
Feb 22, 2024

Conversation

JoaquinBattilana
Copy link
Member

@JoaquinBattilana JoaquinBattilana commented Nov 22, 2023

General Changes

  • Adds no refetch on focus for global react query config
  • Adds fix to gho test (execution of proposal that change gho rates broke the tests)
  • Change the order of global providers since AppDataProvider now needs SharedDependencies provider
  • Adds useGhoPoolFormatedReserve , useGhoPoolReserve, useUserGhoPoolFormattedReserve and useUserGhoPoolReserve hooks based on react query.
  • Adds combineQueries utility function that merge two or more react query results
  • Adds micro-memoize to memoize the result of the combination of queries, so if two components use the same hook with the same parameters this is executed only one time
  • No more timestamp rendering every 5 seconds on the new hooks, in the future we will refactor all to do that
  • Deleted gho refetch from background provider because now react query does that.
  • Changed from refetch to invalidate queries in a couple of components.
  • Deleted ghoSlice since it was only being used to fetch data and now react query do that

Developer Notes

Add any notes here that may be helpful for reviewers.


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

Copy link

height bot commented Nov 22, 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.

@JoaquinBattilana JoaquinBattilana changed the base branch from main to feat/react-query-5-1 November 22, 2023 13:48
Base automatically changed from feat/react-query-5-1 to main November 28, 2023 15:54
@JoaquinBattilana JoaquinBattilana changed the base branch from main to bug/empty-collector-state November 28, 2023 15:55
@JoaquinBattilana JoaquinBattilana changed the base branch from bug/empty-collector-state to main November 28, 2023 15:55
Copy link

📦 Next.js Bundle Analysis for aave-ui

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 503.48 KB (🟡 +5.41 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!

Ten Pages Changed Size

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

Page Size (compressed) First Load
/ 86.72 KB (🟢 -5.16 KB) 590.2 KB
/faucet 38.04 KB (🟢 -4.65 KB) 541.52 KB
/governance 86.9 KB (🟢 -3.45 KB) 590.38 KB
/governance/ipfs-preview 120.44 KB (🟢 -3.46 KB) 623.92 KB
/governance/proposal 120.6 KB (🟢 -3.46 KB) 624.08 KB
/governance/proposal/[proposalId] 75.22 KB (🟢 -3.45 KB) 578.7 KB
/history 47.35 KB (🟢 -3.44 KB) 550.83 KB
/reserve-overview 35.65 KB (🟢 -5.04 KB) 539.13 KB
/staking 33.54 KB (🟢 -3.46 KB) 537.02 KB
/v3-migration 48.52 KB (🟢 -11 B) 552 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.

Copy link

Copy link

📦 Next.js Bundle Analysis for aave-ui

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 503.48 KB (🟡 +5.41 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!

Ten Pages Changed Size

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

Page Size (compressed) First Load
/ 86.72 KB (🟢 -5.16 KB) 590.2 KB
/faucet 38.04 KB (🟢 -4.65 KB) 541.52 KB
/governance 86.9 KB (🟢 -3.45 KB) 590.38 KB
/governance/ipfs-preview 120.44 KB (🟢 -3.46 KB) 623.92 KB
/governance/proposal 120.6 KB (🟢 -3.46 KB) 624.08 KB
/governance/proposal/[proposalId] 75.22 KB (🟢 -3.45 KB) 578.7 KB
/history 47.35 KB (🟢 -3.44 KB) 550.83 KB
/reserve-overview 35.65 KB (🟢 -5.04 KB) 539.13 KB
/staking 33.54 KB (🟢 -3.46 KB) 537.02 KB
/v3-migration 48.52 KB (🟢 -11 B) 552 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.

Copy link

MareskoY
MareskoY previously approved these changes Nov 30, 2023
foodaka
foodaka previously approved these changes Dec 1, 2023
@JoaquinBattilana JoaquinBattilana dismissed stale reviews from foodaka and MareskoY via e0664bc December 6, 2023 01:00
Copy link

github-actions bot commented Dec 6, 2023

📦 Next.js Bundle Analysis for aave-ui

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 503.47 KB (🟡 +5.39 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!

Ten Pages Changed Size

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

Page Size (compressed) First Load
/ 86.74 KB (🟢 -5.14 KB) 590.21 KB
/faucet 38.04 KB (🟢 -4.65 KB) 541.51 KB
/governance 86.91 KB (🟢 -3.45 KB) 590.38 KB
/governance/ipfs-preview 120.45 KB (🟢 -3.46 KB) 623.92 KB
/governance/proposal 120.61 KB (🟢 -3.46 KB) 624.08 KB
/governance/proposal/[proposalId] 75.22 KB (🟢 -3.45 KB) 578.69 KB
/history 47.35 KB (🟢 -3.44 KB) 550.82 KB
/reserve-overview 35.65 KB (🟢 -5.04 KB) 539.12 KB
/staking 33.54 KB (🟢 -3.46 KB) 537.01 KB
/v3-migration 48.53 KB (🟢 -10 B) 551.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.

Copy link

github-actions bot commented Dec 6, 2023

Copy link

github-actions bot commented Jan 3, 2024

📦 Next.js Bundle Analysis for aave-ui

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 521.63 KB (🟡 +5.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!

Nine Pages Changed Size

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

Page Size (compressed) First Load
/ 86.8 KB (🟢 -5.21 KB) 608.43 KB
/faucet 37.94 KB (🟢 -4.7 KB) 559.58 KB
/governance 51.22 KB (🟢 -4.86 KB) 572.85 KB
/governance/proposal/[proposalId] 91.13 KB (🟢 -3.47 KB) 612.76 KB
/history 47.27 KB (🟢 -3.48 KB) 568.91 KB
/markets 37.92 KB (-1 B) 559.55 KB
/reserve-overview 35.75 KB (🟢 -5.11 KB) 557.39 KB
/staking 33.67 KB (🟢 -3.49 KB) 555.31 KB
/v3-migration 48.47 KB (🟢 -8 B) 570.11 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.

Copy link

github-actions bot commented Jan 3, 2024

Copy link

github-actions bot commented Jan 5, 2024

Copy link

github-actions bot commented Jan 5, 2024

📦 Next.js Bundle Analysis for aave-ui

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 524.22 KB (🟡 +5.47 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!

Nine Pages Changed Size

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

Page Size (compressed) First Load
/ 86.74 KB (🟢 -5.22 KB) 610.96 KB
/faucet 37.94 KB (🟢 -4.7 KB) 562.15 KB
/governance 50.84 KB (🟢 -3.47 KB) 575.06 KB
/governance/proposal/v3/[proposalId] 91.12 KB (🟢 -3.48 KB) 615.34 KB
/history 47.27 KB (🟢 -3.48 KB) 571.49 KB
/markets 37.92 KB (-1 B) 562.14 KB
/reserve-overview 35.75 KB (🟢 -5.11 KB) 559.97 KB
/staking 33.67 KB (🟢 -3.49 KB) 557.89 KB
/v3-migration 48.47 KB (🟢 -8 B) 572.69 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.

Copy link

Copy link

📦 Next.js Bundle Analysis for aave-ui

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 527.97 KB (🟡 +5.29 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!

Ten Pages Changed Size

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

Page Size (compressed) First Load
/ 87.53 KB (🟢 -5.25 KB) 615.51 KB
/faucet 38.77 KB (🟢 -4.72 KB) 566.74 KB
/governance 97.89 KB (🟢 -3.49 KB) 625.86 KB
/governance/ipfs-preview 111.34 KB (-1 B) 639.32 KB
/governance/v3/proposal 137.66 KB (🟢 -3.48 KB) 665.63 KB
/history 48.13 KB (🟢 -3.48 KB) 576.11 KB
/markets 38.8 KB (🟡 +1 B) 566.78 KB
/reserve-overview 35.44 KB (🟢 -4.75 KB) 563.42 KB
/staking 33.36 KB (🟢 -3.46 KB) 561.33 KB
/v3-migration 49.31 KB (🟢 -8 B) 577.29 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.

Copy link

Copy link

📦 Next.js Bundle Analysis for aave-ui

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 527.97 KB (🟡 +5.29 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!

Ten Pages Changed Size

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

Page Size (compressed) First Load
/ 87.53 KB (🟢 -5.25 KB) 615.51 KB
/faucet 38.77 KB (🟢 -4.72 KB) 566.74 KB
/governance 97.89 KB (🟢 -3.49 KB) 625.86 KB
/governance/ipfs-preview 111.34 KB (-1 B) 639.32 KB
/governance/v3/proposal 137.66 KB (🟢 -3.48 KB) 665.63 KB
/history 48.13 KB (🟢 -3.48 KB) 576.11 KB
/markets 38.8 KB (🟡 +1 B) 566.78 KB
/reserve-overview 35.44 KB (🟢 -4.75 KB) 563.42 KB
/staking 33.36 KB (🟢 -3.46 KB) 561.33 KB
/v3-migration 49.31 KB (🟢 -8 B) 577.29 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.

Copy link

📦 Next.js Bundle Analysis for aave-ui

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 526.88 KB (🟡 +4.19 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!

Ten Pages Changed Size

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

Page Size (compressed) First Load
/ 87.53 KB (🟢 -5.25 KB) 614.41 KB
/faucet 38.77 KB (🟢 -4.72 KB) 565.65 KB
/governance 97.89 KB (🟢 -3.49 KB) 624.77 KB
/governance/ipfs-preview 111.34 KB (-1 B) 638.22 KB
/governance/v3/proposal 137.66 KB (🟢 -3.48 KB) 664.53 KB
/history 48.13 KB (🟢 -3.48 KB) 575.01 KB
/markets 38.8 KB (🟡 +1 B) 565.68 KB
/reserve-overview 35.44 KB (🟢 -4.75 KB) 562.32 KB
/staking 33.36 KB (🟢 -3.46 KB) 560.24 KB
/v3-migration 49.31 KB (🟢 -8 B) 576.19 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.

Copy link

@JoaquinBattilana JoaquinBattilana merged commit f53c47c into main Feb 22, 2024
27 checks passed
@JoaquinBattilana JoaquinBattilana deleted the feat/react-query-5-2 branch February 22, 2024 15:56
@JoaquinBattilana JoaquinBattilana restored the feat/react-query-5-2 branch February 22, 2024 16:02
@JoaquinBattilana JoaquinBattilana deleted the feat/react-query-5-2 branch February 22, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants