fix(solid-router): respect wrapInSuspense - #7898
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughSolid Router’s ChangesSolid Router suspense handling
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…pense-7829 # Conflicts: # packages/solid-router/src/Match.tsx
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Merged latest Validation:
Current head: |
…pense-7829 # Conflicts: # packages/solid-router/src/Match.tsx
|
Synced this branch with latest origin/main and resolved the packages/solid-router/src/Match.tsx conflict by keeping the wrapInSuspense=false SafeFragment boundary behavior while preserving upstream’s development-only pendingComponent non-route-context wrapping. Validation:
Notes:
|
Fixes #7829.
Solid Router always rendered matches inside
Solid.Suspense, sowrapInSuspense: falsedid not prevent a route pending component from being used as the suspense fallback. This keeps the existing default behavior, but switches toSafeFragmentwhen a route explicitly opts out.I added a regression test for a pending child route with
wrapInSuspense: falseand an unresolved loader, while preserving the existing root pending component behavior.Tests run:
PATH=/opt/homebrew/bin:$PATH pnpm --dir packages/solid-router exec vitest run tests/Matches.test.tsx --reporter=dotPATH=/opt/homebrew/bin:$PATH pnpm --dir packages/solid-router test:types:ts70PATH=/opt/homebrew/bin:$PATH pnpm --dir packages/solid-router test:eslintPATH=/opt/homebrew/bin:$PATH pnpm exec prettier --check packages/solid-router/src/Match.tsx packages/solid-router/tests/Matches.test.tsxSummary by CodeRabbit
New Features
Bug Fixes