Skip to content

[devtools] Restore "double-click to view owners tree" functionality #33039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2025

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Apr 28, 2025

Summary

Double clicking an element to view the Owner tree is currently broken. We change the Owner in a Transition and suspend while we fetch the new Owners list. However, we only resolve that Promise in an Effect and Effects don't commit anywhere until the Transition is finished.

We'd have to refactor OwnersListContextController to trigger the I/O when we actually change the Owner (e.g. using useActionState or moving the I/O down to the dispatch calls.

For now we just pass down the basic dispatch and let each call opt-in. We'd have to audit each future call we add until we refactor.

How did you test this change?

  • Run shell and double click "Dehydrateable props"


return (
<TreeStateContext.Provider value={state}>
<TreeDispatcherContext.Provider value={dispatchWrapper}>
<TreeDispatcherContext.Provider value={dispatch}>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the double click is no longer in a Transition, we do actually commit the Owners list.

@eps1lon eps1lon merged commit fbf29cc into facebook:main Apr 30, 2025
238 of 239 checks passed
@eps1lon eps1lon deleted the sebbie/rdt-owners-list-fix branch April 30, 2025 09:34
hoxyq added a commit that referenced this pull request May 8, 2025
Patch release to mitigate #32659

Essentially just 6.1.1 with:
* Restore all Transitions for Tree updates
([eps1lon](https://github.com/eps1lon) in
[#33042](#33042))
* Restore "double-click to view owners tree" functionality
([eps1lon](https://github.com/eps1lon) in
[#33039](#33039))
github-actions bot pushed a commit that referenced this pull request May 8, 2025
Patch release to mitigate #32659

Essentially just 6.1.1 with:
* Restore all Transitions for Tree updates
([eps1lon](https://github.com/eps1lon) in
[#33042](#33042))
* Restore "double-click to view owners tree" functionality
([eps1lon](https://github.com/eps1lon) in
[#33039](#33039))

DiffTrain build for [557a647](557a647)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants