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

Add Scalar for API Docs #4805

Merged
merged 4 commits into from
Jan 8, 2025
Merged

Add Scalar for API Docs #4805

merged 4 commits into from
Jan 8, 2025

Conversation

emilwidlund
Copy link
Member

No description provided.

Copy link

vercel bot commented Jan 7, 2025

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

Name Status Preview Comments Updated (UTC)
polar ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2025 8:55am
polar-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2025 8:55am

Copy link
Contributor

github-actions bot commented Jan 8, 2025

📦 Next.js Bundle Analysis for web

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

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 155.27 KB (-1 B)
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!

New Page Added

The following page was added to the bundle from the code in this PR:

Page Size (compressed) First Load % of Budget (350 KB)
/(main)/docs/developers/sdk/authentication/page 228.24 KB 383.5 KB 109.57%

Ninety-five 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)
/_not-found/page 363 B 155.62 KB 44.46% (+/- <0.01%)
/layout 113.75 KB 269.01 KB 76.86% (🟢 -0.01%)
/checkout/[clientSecret]/page 273.99 KB 429.25 KB 122.64% (🟢 -0.01%)
/checkout/[clientSecret]/confirmation/page 279.59 KB 434.85 KB 124.24% (+/- <0.01%)
/(main)/login/magic-link/request/page 362 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/login/magic-link/authenticate/page 362 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/verify-email/page 358 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/(installation)/github/layout 363 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/[organization]/(header)/issues/page 124.54 KB 279.8 KB 79.94% (+/- <0.01%)
/(main)/[organization]/(header)/layout 277.34 KB 432.61 KB 123.60% (🟢 -0.02%)
/(main)/[organization]/(header)/products/[productId]/page 192.43 KB 347.7 KB 99.34% (🟢 -0.01%)
/(main)/[organization]/[repo]/issues/[number]/status/page 227.87 KB 383.13 KB 109.47% (🟢 -0.01%)
/(main)/[organization]/portal/page 220.93 KB 376.2 KB 107.48% (🟡 +0.01%)
/(main)/[organization]/[repo]/issues/[number]/(create)/page 201.3 KB 356.56 KB 101.88% (🟢 -0.02%)
/(main)/backoffice/layout 557.18 KB 712.45 KB 203.56% (🟢 -4.34%)
/(main)/[organization]/(header)/page 138.43 KB 293.69 KB 83.91% (🟢 -0.01%)
/(main)/dashboard/layout 363 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/(landing)/page 261.55 KB 416.82 KB 119.09% (🟢 -0.01%)
/(main)/(landing)/layout 216.07 KB 371.33 KB 106.10% (+/- <0.01%)
/(main)/(topbar)/(backer)/purchases/products/[id]/page 195.32 KB 350.58 KB 100.17% (+/- <0.01%)
/(main)/(topbar)/(backer)/purchases/license-keys/page 90.34 KB 245.6 KB 70.17% (+/- <0.01%)
/(main)/(topbar)/(backer)/purchases/subscriptions/[id]/page 216.31 KB 371.57 KB 106.16% (+/- <0.01%)
/(main)/(topbar)/(backer)/purchases/subscriptions/page 90.32 KB 245.59 KB 70.17% (+/- <0.01%)
/(main)/(topbar)/(backer)/purchases/page 363 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/(topbar)/(backer)/settings/page 263.69 KB 418.96 KB 119.70% (+/- <0.01%)
/(main)/[organization]/portal/(topbar)/orders/[id]/page 195.2 KB 350.47 KB 100.13% (+/- <0.01%)
/(main)/dashboard/[organization]/storefront/page 381.1 KB 536.37 KB 153.25% (🟢 -0.02%)
/(main)/(landing)/(mdx)/layout 363 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/(landing)/(mdx)/blog/(header)/better-pricing/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/(landing)/(mdx)/blog/(header)/mitchell-hashimoto-joins-polar-as-an-advisor/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/(landing)/(mdx)/legal/privacy/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/(landing)/(mdx)/careers/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/(landing)/(mdx)/legal/terms/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/(mdx)/layout 486.53 KB 641.79 KB 183.37% (🟢 -4.47%)
/(main)/docs/layout 361 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/docs/(mdx)/countries/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/(mdx)/customers/purchases/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/(mdx)/fees/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/(mdx)/github/funding-yaml/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/(mdx)/finance/payouts/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/(mdx)/merchant-of-record/compliance/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/(mdx)/payments-taxes/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/(mdx)/subscriptions/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/developers/(mdx)/layout 486.52 KB 641.79 KB 183.37% (🟢 -4.47%)
/(main)/docs/developers/guides/layout 486.52 KB 641.79 KB 183.37% (🟢 -4.47%)
/(main)/docs/developers/guides/page 361 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/docs/developers/sandbox/layout 486.53 KB 641.79 KB 183.37% (🟢 -4.47%)
/(main)/docs/developers/open-source/layout 486.53 KB 641.79 KB 183.37% (🟢 -4.47%)
/(main)/docs/developers/sdk/layout 486.52 KB 641.78 KB 183.37% (🟢 -4.48%)
/(main)/docs/developers/sdk/polar-for-framer/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/developers/sdk/polar-migrate/page 33.53 KB 188.79 KB 53.94% (+/- <0.01%)
/(main)/docs/developers/sdk/python/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/developers/sdk/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/developers/sdk/typescript/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/support/(mdx)/page 33.53 KB 188.8 KB 53.94% (+/- <0.01%)
/(main)/docs/support/layout 486.53 KB 641.79 KB 183.37% (🟢 -4.47%)
/(main)/docs/developers/webhooks/layout 486.79 KB 642.06 KB 183.45% (🟢 -4.48%)
/(main)/docs/developers/webhooks/events/page 361 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/(topbar)/(backer)/finance/layout 213.86 KB 369.13 KB 105.46% (🟢 -0.01%)
/(main)/(topbar)/(backer)/finance/account/page 201.79 KB 357.05 KB 102.02% (🟢 -0.01%)
/(main)/(topbar)/(backer)/(sidebar)/funding/page 251.19 KB 406.46 KB 116.13% (🟢 -0.01%)
/(main)/(topbar)/(backer)/finance/outgoing/page 188.22 KB 343.49 KB 98.14% (+/- <0.01%)
/(main)/(topbar)/(backer)/finance/incoming/page 236.11 KB 391.38 KB 111.82% (🟢 -0.01%)
/(main)/dashboard/[organization]/(header)/@breadcrumb/[...all]/page 38.07 KB 193.34 KB 55.24% (+/- <0.01%)
/(main)/dashboard/[organization]/(header)/benefits/license-keys/page 591.04 KB 746.3 KB 213.23% (🟢 -4.34%)
/(main)/dashboard/[organization]/(header)/layout 557.17 KB 712.44 KB 203.55% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/customers/page 594.53 KB 749.79 KB 214.23% (🟢 -4.34%)
/(main)/dashboard/[organization]/(header)/analytics/page 690.21 KB 845.47 KB 241.56% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/benefits/page 658.06 KB 813.33 KB 232.38% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/initialize/page 144.21 KB 299.48 KB 85.57% (+/- <0.01%)
/(main)/dashboard/[organization]/(header)/issues/embed/page 559.62 KB 714.89 KB 204.25% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/issues/organizations/page 559.55 KB 714.81 KB 204.23% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/issues/overview/page 599.3 KB 754.57 KB 215.59% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/members/page 558.04 KB 713.3 KB 203.80% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/products/discounts/page 621.55 KB 776.82 KB 221.95% (🟢 -4.34%)
/(main)/dashboard/[organization]/(header)/products/benefits/page 657.59 KB 812.85 KB 232.24% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/issues/badge/page 584.16 KB 739.43 KB 211.27% (🟢 -4.34%)
/(main)/dashboard/[organization]/(header)/@breadcrumb/products/page 363 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/dashboard/[organization]/(header)/@breadcrumb/products/layout 38.07 KB 193.34 KB 55.24% (+/- <0.01%)
/(main)/dashboard/[organization]/(header)/products/page 593.67 KB 748.94 KB 213.98% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/products/[id]/page 653.16 KB 808.43 KB 230.98% (🟢 -4.34%)
/(main)/dashboard/[organization]/(header)/(home)/page 656.63 KB 811.9 KB 231.97% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/@breadcrumb/page 362 B 155.62 KB 44.46% (+/- <0.01%)
/(main)/dashboard/[organization]/(header)/sales/[id]/page 570.22 KB 725.49 KB 207.28% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/sales/page 601.77 KB 757.04 KB 216.30% (🟢 -4.34%)
/(main)/dashboard/[organization]/(header)/settings/webhooks/endpoints/[id]/page 595.77 KB 751.04 KB 214.58% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/sales/subscriptions/page 595.56 KB 750.83 KB 214.52% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/settings/webhooks/page 577.79 KB 733.06 KB 209.44% (🟢 -4.33%)
/(main)/dashboard/[organization]/(header)/products/new/page 645.08 KB 800.34 KB 228.67% (🟢 -4.34%)
/(main)/dashboard/[organization]/(header)/settings/custom-fields/page 597.29 KB 752.55 KB 215.02% (🟢 -4.34%)
/(main)/dashboard/[organization]/(header)/settings/page 576.89 KB 732.16 KB 209.19% (🟢 -4.34%)
/(main)/dashboard/[organization]/(header)/finance/outgoing/page 136.16 KB 291.42 KB 83.26% (+/- <0.01%)
/(main)/dashboard/[organization]/(header)/finance/layout 557.18 KB 712.45 KB 203.56% (🟢 -4.34%)
/(main)/dashboard/[organization]/(header)/finance/incoming/page 184.11 KB 339.37 KB 96.96% (🟢 -0.01%)
/(main)/dashboard/[organization]/(header)/finance/issue-funding/layout 557.18 KB 712.45 KB 203.56% (🟢 -4.34%)
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.

@antlio
Copy link

antlio commented Jan 8, 2025

@emilwidlund love polar.sh! feel free to hmu if you need anything regarding using scalar!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants