Skip to content

bug: fix mobile hydration bug - #170

Open
LadyBluenotes wants to merge 1 commit into
kobaltedev:mainfrom
LadyBluenotes:fix-mobile-hydration
Open

bug: fix mobile hydration bug#170
LadyBluenotes wants to merge 1 commit into
kobaltedev:mainfrom
LadyBluenotes:fix-mobile-hydration

Conversation

@LadyBluenotes

Copy link
Copy Markdown
Collaborator

Summary

  • Move mobile layout detection into DefaultThemeStateProvider so the media-query listener has a Solid owner and is disposed with the theme tree.
  • Use createMediaQuery("(max-width: 1100px)", false) to keep SSR and initial hydration on the same desktop state before applying the real viewport.
  • Preserve the existing mobileLayout deep import as a context-backed compatibility shim.
  • Hide desktop navigation and table-of-contents sidebars during the mobile SSR frame to prevent the refresh flicker.

Closes #152.

@netlify

netlify Bot commented Aug 29, 2026

Copy link
Copy Markdown

Deploy Preview for solidbase ready!

Name Link
🔨 Latest commit 1b8fb54
🔍 Latest deploy log https://app.netlify.com/projects/solidbase/deploys/6a924e394d620500099b52df
😎 Deploy Preview https://deploy-preview-170--solidbase.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 87 (🔴 down 9 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Aug 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/kobaltedev/solidbase/@kobalte/solidbase@170

commit: 1b8fb54

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.

default-theme: module-scope mobileLayout watcher leaks a computation and breaks hydration on viewports ≤ 1100px

1 participant