Skip to content

perf(community): optimize community content route payloads #1374

Description

@jderochervlk

Context

Community pages are a compact MDX route family with their own persistent sidebar layout and independently assembled table of contents. They share content rendering primitives with documentation, but they should retain a route-local budget and browser journeys because their navigation, media, and loader data are different.

Build on the content highlighting and CSS ownership introduced by #1365 and #1367. Do not fold community-only resources back into the root or docs layout just because the pages resemble documentation.

Representative profiles

  • /community/overview
  • /community/content
  • /community/roadmap

Use #1371 to establish the post-homepage production baseline.

Suggested PR stack

  • Add community direct-load and client-navigation coverage, including desktop/mobile sidebar behavior, table-of-contents navigation, edit links, search activation, and a transition to and from the docs family.
  • Profile loader serialization, sidebar-category construction, table-of-contents data, and rendered MDX. Centralize or precompute data only when it removes repeated route payload/markup without weakening deep-link behavior.
  • Prerender static code presentation where it eliminates client work, while preserving content-boundary syntax registration and interactive Markdown components.
  • Give community media accurate intrinsic dimensions and use responsive candidates only for meaningful raster placements; retain native elements and avoid a responsive-image runtime effect.
  • Defer community-only interaction code until it is needed and consider React Compiler annotations solely for stable, measured leaf components.

Acceptance criteria

  • A community direct load has no homepage, playground, package-index, or unrelated documentation payload beyond the intentional shared foundation/content boundary.
  • Sidebar, table of contents, anchors, edit links, Markdown components, syntax highlighting, and search activation work through direct loads and client transitions without hydration or console errors.
  • Every rendered image/video has accurate numeric dimensions and below-the-fold media is not promoted to an initial preload.
  • Every completed layer reports the asset, request, DOM/media, and serialized-data delta against its immediate target.
  • ReScript compilation, production build, focused Vitest/Cypress coverage, and the test(perf): establish post-homepage route-family performance baselines #1371 report pass. Visual snapshots remain unchanged unless explicitly approved.

Relates to #1354 and depends on #1371 for the common measurement contract.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions