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: Update charts to use best te unit for values #527

Merged
merged 16 commits into from
Sep 4, 2024

Conversation

luis-herasme
Copy link
Member

@luis-herasme luis-herasme commented Aug 29, 2024

Description

fix: Update DailyAvgBlobFeeChart and DailyAvgBlobGasPriceChart to use best unit for values

Related Issue

Closes #520
Closes #519

Copy link

changeset-bot bot commented Aug 29, 2024

🦋 Changeset detected

Latest commit: 628b8c2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@blobscan/web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Aug 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blobscan-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 3, 2024 4:18pm
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
blobscan-docs ⬜️ Ignored (Inspect) Visit Preview Sep 3, 2024 4:18pm
blobscan-gnosis ⬜️ Ignored (Inspect) Visit Preview Sep 3, 2024 4:18pm
blobscan-holesky ⬜️ Ignored (Inspect) Visit Preview Sep 3, 2024 4:18pm
blobscan-mainnet ⬜️ Ignored (Inspect) Visit Preview Sep 3, 2024 4:18pm
blobscan-sepolia ⬜️ Ignored (Inspect) Visit Preview Sep 3, 2024 4:18pm

Copy link
Contributor

github-actions bot commented Aug 29, 2024

📦 Next.js Bundle Analysis for @blobscan/web

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

⚠️ Global Bundle Size Increased

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

Eleven Pages Changed Size

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

Page Size (compressed) First Load % of Budget (350 KB)
/ 352.47 KB 627.76 KB 179.36% (🟢 -4.82%)
/address/[address] 27.31 KB 302.59 KB 86.46% (🟢 -4.70%)
/blob/[hash] 26.32 KB 301.61 KB 86.17% (🟢 -4.60%)
/blobs 75.54 KB 350.83 KB 100.24% (🟡 +12.20%)
/block/[id] 12.64 KB 287.93 KB 82.26% (🟢 -4.63%)
/blocks 73.26 KB 348.55 KB 99.58% (🟡 +12.20%)
/stats/blob 336.48 KB 611.77 KB 174.79% (🟢 -4.80%)
/stats/block 337.63 KB 612.91 KB 175.12% (🟢 -4.77%)
/stats/tx 336.74 KB 612.03 KB 174.87% (🟢 -4.77%)
/tx/[hash] 14.07 KB 289.36 KB 82.67% (🟡 +0.24%)
/txs 72.73 KB 348.02 KB 99.43% (🟡 +10.19%)
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

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your 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. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

Copy link
Member

@PJColombo PJColombo left a comment

Choose a reason for hiding this comment

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

Overall, great work! I believe we can do some refactoring to further improve the code.

apps/web/src/utils/charts.ts Outdated Show resolved Hide resolved
apps/web/src/utils/charts.ts Outdated Show resolved Hide resolved
packages/eth-format/index.ts Outdated Show resolved Hide resolved
packages/eth-format/index.ts Show resolved Hide resolved
Copy link
Member

@PJColombo PJColombo left a comment

Choose a reason for hiding this comment

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

LGTM

I’ve left a few nitpicks to help make the code more concise.

apps/web/src/hooks/useScaledWeiAmounts.ts Outdated Show resolved Hide resolved
apps/web/src/hooks/useScaledWeiAmounts.ts Outdated Show resolved Hide resolved
apps/web/src/hooks/useScaledWeiAmounts.ts Outdated Show resolved Hide resolved
Copy link
Member

@PabloCastellano PabloCastellano left a comment

Choose a reason for hiding this comment

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

Can you add some screenshots (before and after) to the PR description?

Works great!

@PabloCastellano PabloCastellano merged commit c9a6ada into main Sep 4, 2024
8 checks passed
@PabloCastellano PabloCastellano deleted the fix-chart-unit branch September 4, 2024 16:22
@PabloCastellano PabloCastellano mentioned this pull request Sep 4, 2024
3 tasks
@github-actions github-actions bot mentioned this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants