fix(router-devtools): apply React toggle button props#7820
Open
whizzkid1452 wants to merge 1 commit into
Open
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughReact router devtools now apply accessor-based toggle button props reactively, including React ChangesReactive toggle button props
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant ReactApp
participant TanStackRouterDevtoolsCore
participant FloatingTanStackRouterDevtools
participant ToggleButton
ReactApp->>TanStackRouterDevtoolsCore: update toggleButtonProps
TanStackRouterDevtoolsCore->>FloatingTanStackRouterDevtools: publish reactive props
FloatingTanStackRouterDevtools->>ToggleButton: render className and aria-label
ToggleButton->>FloatingTanStackRouterDevtools: invoke onClick
FloatingTanStackRouterDevtools->>FloatingTanStackRouterDevtools: set devtools open state
Suggested labels: 🚥 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
The React wrapper passed
className, but the Solid-rendered core only consumedclass. The core also storedtoggleButtonPropsas a non-reactive value, and its defaultaria-labeloverrode the user-provided value.classNamealongside Solid'sclasson the devtools toggle buttonaria-labeloverride defaultstoggleButtonPropsupdates without reloading the pageThe core now stores these props in a Solid signal and recreates only the toggle button when the prop object changes, so arbitrary HTML props update together.
Fixes #4658.
Checklist
pnpm test:eslint -- --outputStyle=stream --skipRemoteCachepnpm test:types -- --outputStyle=stream --skipRemoteCachepnpm test:unit -- --outputStyle=stream --skipRemoteCache(no affected unit-test targets)pnpm build -- --outputStyle=stream --skipRemoteCacheSummary by CodeRabbit
New Features
Bug Fixes
Tests