Skip to content

Conversation

@lukebennett88
Copy link
Contributor

This fixes the mobile menu for the docs, which was not allowing for scrolling.

@changeset-bot
Copy link

changeset-bot bot commented Nov 28, 2025

⚠️ No Changeset found

Latest commit: 2bb0924

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

{nextRootScript}
<style
dangerouslySetInnerHTML={{
__html: /* css */ `html, body { height: 100%; }`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is so the main content takes up available space so we can push the footer to the bottom of the page without having to rely on viewport units

Before After
before after

const pathname = usePathname();

useEffect(() => {
addEventListener('popstate', closeSidebar);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },
serverExternalPackages: ['esbuild'],
experimental: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated, but Next.js was complaining about this experimental flag being deprecated and to use serverExternalPackages instead.

Copilot AI review requested due to automatic review settings December 15, 2025 22:44
@lukebennett88 lukebennett88 force-pushed the keystar-docs-fix-mobile-menu branch from 84c5574 to 2bb0924 Compare December 15, 2025 22:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the mobile menu scrolling issue in the KeystarUI documentation by implementing a proper flexbox-based layout with percentage-based heights instead of viewport units.

Key changes:

  • Updated Next.js configuration to use the stable serverExternalPackages API (migrated from experimental)
  • Implemented proper flexbox hierarchy with minHeight={0} to enable scrolling in the mobile sidebar
  • Changed from viewport-based heights (100vh, 100vw) to percentage-based (100%) with explicit html/body height styling

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
design-system/docs/next.config.mjs Migrated serverComponentsExternalPackages from experimental to stable serverExternalPackages API for Next.js 15 compatibility; removed commented-out configuration
design-system/docs/components/sidebar/sidebar.tsx Restructured sidebar layout with proper flexbox container, fixed CSS selector for open state, changed navigation close behavior to trigger on pathname changes, and added minHeight={0} for scrollable content
design-system/docs/components/layout.tsx Changed outer container height from 100vh to 100% to support percentage-based height chain
design-system/docs/components/content/index.tsx Converted content wrapper from Box to Flex with column direction and added flex property to enable proper flex layout
design-system/docs/app/(site)/layout.tsx Added global styles to set html and body height to 100% to establish proper height inheritance chain

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@emmatown emmatown merged commit 644e928 into main Dec 15, 2025
16 checks passed
@emmatown emmatown deleted the keystar-docs-fix-mobile-menu branch December 15, 2025 23:39
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.

3 participants