fix: preserve theme toggle icon after hydration - #270
puneetnith28 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe package configuration adds Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The patch preserves server-rendered theme markup and applies the saved preference after hydration; supported installation workflows and the lockfile are consistent. 🚥 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 |
There was a problem hiding this comment.
The large changes in package-lock.json (+284, -63) are simply the automatic result of running npm install patch-package. NPM locked in the exact versions of patch-package and its necessary sub-dependencies, while simultaneously performing its standard auto-cleanup of older deduplicated packages.
|
Please review this PR and let me know if any further changes are needed. |
|
it has to be resolved at doc-kit |
|
Yes,It should be fixed upstream maybe we start at |
|
@TusharThakur04 @ryzrr |
avivkeller
left a comment
There was a problem hiding this comment.
Fix this upstream rather than adding a patch package feature
|
The work is continued here --> nodejs/doc-kit#1103 |
Summary
Fixes an issue where the theme toggle icon changes back to the System icon after refreshing the page, even though the selected Light/Dark theme is applied correctly.
Problem
After refreshing the page:
Fix
This PR uses a two-step rendering approach:
useEffectto update the state.Result
Demo.mp4
Files Added
patches/@doc-kit+generator-react+0.2.0.patch@doc-kit/generator-reactwrapper component.Closes #269
Summary by CodeRabbit
Bug Fixes
Chores