Skip to content

[codex] Split sidebar layout modules#1279

Open
jderochervlk wants to merge 6 commits intomasterfrom
codex/split-sidebar-layout
Open

[codex] Split sidebar layout modules#1279
jderochervlk wants to merge 6 commits intomasterfrom
codex/split-sidebar-layout

Conversation

@jderochervlk
Copy link
Copy Markdown
Collaborator

@jderochervlk jderochervlk commented Apr 28, 2026

Context

SidebarLayout had grown into a mixed module that contained the page shell, reusable sidebar navigation, TOC rendering, and breadcrumbs. This splits those concerns into clearer module names while preserving the existing rendered behavior.

Summary

  • Move the page shell and pagination into SidebarPageLayout.
  • Move sidebar navigation, categories, nav item types, and TOC rendering into src/components/SidebarNav.
  • Move breadcrumbs into src/components/Breadcrumbs.
  • Update routes, layouts, markdown helpers, tests, and screenshot baseline paths to use the new module names.
  • Update the trusted-by landing page desktop snapshot for the new logo baseline.

Validation

  • yarn build:res
  • yarn vitest --browser.headless --run __tests__/SidebarNav_.test.jsx __tests__/Breadcrumbs_.test.jsx __tests__/DocsLayout_.test.jsx __tests__/CommunityLayout_.test.jsx __tests__/ApiOverviewLayout_.test.jsx
  • yarn vitest --browser.headless --run __tests__/LandingPage_.test.jsx -t "landing trusted by snapshots"
  • git diff --check

Move the sidebar navigation, breadcrumbs, and page shell into separate ReScript modules and update routes/tests to use the new names.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This was updated because of the new logo.

Comment thread apps/docs/src/components/Breadcrumbs.res
Comment thread apps/docs/src/components/SidebarNav.res
Comment thread AGENTS.md Outdated
…-layout

# Conflicts:
#	__tests__/SidebarLayout_.test.res
#	__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-breadcrumbs-chromium-linux.png
#	__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-breadcrumbs-deep-chromium-linux.png
#	__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-category-active-item-chromium-linux.png
#	__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-category-chromium-linux.png
#	__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-category-many-items-chromium-linux.png
#	__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-category-with-toc-chromium-linux.png
#	apps/docs/__tests__/Breadcrumbs_.test.res
#	apps/docs/__tests__/SidebarLayout_.test.res
#	apps/docs/__tests__/SidebarNav_.test.res
#	apps/docs/__tests__/__screenshots__/Breadcrumbs_.test.jsx/sidebar-breadcrumbs-chromium-linux.png
#	apps/docs/__tests__/__screenshots__/Breadcrumbs_.test.jsx/sidebar-breadcrumbs-deep-chromium-linux.png
#	apps/docs/__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-breadcrumbs-chromium-linux.png
#	apps/docs/__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-breadcrumbs-deep-chromium-linux.png
#	apps/docs/__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-category-active-item-chromium-linux.png
#	apps/docs/__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-category-chromium-linux.png
#	apps/docs/__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-category-many-items-chromium-linux.png
#	apps/docs/__tests__/__screenshots__/SidebarLayout_.test.jsx/sidebar-category-with-toc-chromium-linux.png
#	apps/docs/__tests__/__screenshots__/SidebarNav_.test.jsx/sidebar-category-active-item-chromium-linux.png
#	apps/docs/__tests__/__screenshots__/SidebarNav_.test.jsx/sidebar-category-chromium-linux.png
#	apps/docs/__tests__/__screenshots__/SidebarNav_.test.jsx/sidebar-category-many-items-chromium-linux.png
#	apps/docs/__tests__/__screenshots__/SidebarNav_.test.jsx/sidebar-category-with-toc-chromium-linux.png
#	apps/docs/src/components/Breadcrumbs.res
#	apps/docs/src/components/Breadcrumbs.resi
#	apps/docs/src/components/SidebarNav.res
#	apps/docs/src/components/SidebarNav.resi
#	apps/docs/src/layouts/SidebarLayout.res
#	apps/docs/src/layouts/SidebarLayout.resi
#	apps/docs/src/layouts/SidebarPageLayout.res
#	apps/docs/src/layouts/SidebarPageLayout.resi
Copy link
Copy Markdown
Member

@tsnobip tsnobip left a comment

Choose a reason for hiding this comment

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

this is a welcome cleanup!

Comment thread apps/docs/src/components/SidebarNav.res Outdated
Comment on lines +4 to +11
type raw = Dict.t<{
"title": string,
"category": Nullable.t<string>,
"headers": array<{
"name": string,
"href": Path.t,
}>,
}>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can't see that being used anywhere

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed.

Carry current master into PR #1279 and preserve the DocSearch crawl markers on the renamed SidebarPageLayout shell.
@github-actions
Copy link
Copy Markdown

Cloudflare deployment

Deployement ID: 4e334ba4-2fc6-4138-ad1d-7ba590ad93bf
Deployment Environment: preview

⛅️ wrangler 4.85.0
───────────────────
✨ Compiled Worker successfully
Uploading... (7563/8044)
Uploading... (7723/8044)
Uploading... (7883/8044)
Uploading... (8044/8044)
✨ Success! Uploaded 481 files (7563 already uploaded) (4.89 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://4e334ba4.rescript-lang.pages.dev
✨ Deployment alias URL: https://codex-split-sidebar-layout.rescript-lang.pages.dev

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