Repository navigation
fix(web): keep pricing layout still while the catalog loads - #536
Merged
Merged
Conversation
The pricing page rendered "No plans available" on the server and then grew to a 220px skeleton and finally to the real plan grid, controls and sticky bar. The promo eyebrow was also inserted above the headline after load. Every step pushed the sections below, which is the layout shift behind the pricing CLS report. - Render the loading state whenever no catalog is in yet, including on the server, and size it like the loaded monthly cards. - Render the segmented controls and the sticky bar as placeholders while pending, with the hidden savings note, so they wrap and size like the loaded state. - Reserve a fixed-height slot for the promo eyebrow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The pricing page moved while the billing catalog loaded:
This PR changes only
PricingView.svelteandPurchasePanel.svelte:Font loading is unchanged. An earlier round of this PR changed global font loading (
font-display, a preload, a metric-matched fallback face); those commits are reverted here (b274194c,89634fc1) to keep the change scoped to the pricing components.Evidence
Mobile 390, 4× CPU, throttled network, local production build. Before =
main, after = this PR's placeholder changes (measured ond1c857d4+2e5f868b, the code in this head).The remaining ~0.0006 EN / 0.0003 ZH is the Geist font swap (text reflow when the webfont replaces the fallback); Lighthouse displays it as 0.001. It is site-wide and not addressed here.
Full-page screenshots at 390 and 1440, EN and ZH, before vs after: pixel-identical once loaded.
Checks
biome checkon both touched files: clean.apps/webtypecheck (svelte-check): 0 errors.apps/webtests passed on the earlier head with the same component code (485 + 3 + 3).apps/apiand other workspaces' tests, production build.Known gaps
BillingConversionCenter) uses the same placeholder; not measured.Merge Danger
Door: two-way
Blast Radius: the pricing page, plus the billing settings and conversion sheet that render
PurchasePanel's loading state. No global CSS or font change.