Repository navigation
fix(react-router): respect explicit undefined stylesheet precedence - #8823
benjavicente wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 0f043f4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Set and verify stylesheet precedence packages/react-router/src/Asset.tsx, packages/react-router/tests/Asset.test.tsx, .changeset/puny-chicken-clap.md |
Asset sets precedence based on the link relation. SSR tests cover omitted, undefined, and explicit precedence values, and check the opted-out stylesheet appears after an inline script. The changeset documents the behavior. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: schiller-manuel
Merge Risk: 
Minimal · up to 0f043
-
The stylesheet precedence change is ready to merge after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Description check
-
Explanation
The description explains the change, motivation, tests, AI assistance, checklist status, and release impact. The only incomplete item is the unchecked statement that the author fully understands the code, but the description is otherwise complete and directly related to the changes.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
|
View your CI Pipeline Execution ↗ for commit 0f043f4
☁️ Nx Cloud last updated this comment at |
Merging this PR will improve performance by 5.03%2 warnings, 1 note
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
🎯 Changes
Allow
precedence: undefinedin React Router head links to opt out of React stylesheet hoisting. Set the default before spreading link attributes, preserving explicit string precedence and the protected nonce/hydration-warning props.Adds regressions for absent, undefined, and string precedence, plus SSR ordering with a classic inline theme script before an opted-out stylesheet. Generated Start manifest CSS defaults are unchanged.
Validation: 38 focused unit tests, TypeScript matrix, ESLint, 3 Start SSR Chromium tests, and the SSR head workload pass. The full 18-scenario bundle comparison has no gzip growth.
AI-assisted implementation and tests using Codex.
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit
undefined. When precedence is omitted, the default behavior remains unchanged, and explicitly provided string values are preserved.