Commit dd56bb0
Improve ReactDevToolsOverlay usability (#55387)
Summary:
Pull Request resolved: #55387
The components selector on desktop has a couple of issues:
- Closest public handle is very frequently null (no matching component in the React tree) meaning that nothing gets selected. Ideally we should select the closest parent.
- After any selection is made, the inspector is turned off. This combined with the above problem causes the inspector to look like it fails in the vast majority of cases.
For now, let's disable the behavior of toggling off the inspector when something is selected, and instead require the user to manually disable the component selector.
This also changes the behavior of the overlay for all other platforms. I do think this is better UX (I've had similar issues to this on mobile.) Ultimately we should improve the component selector to be as good as the one in Inspector.js, but this seems like a good stop-gap for now.
Changelog: [Internal]
Reviewed By: yannickl, shwanton
Differential Revision: D91913370
fbshipit-source-id: c676c4be78eebea54003a40d7cc23876f7a6b67e1 parent 7ff4c21 commit dd56bb0
1 file changed
Lines changed: 2 additions & 8 deletions
File tree
Lines changed: 2 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 98 | | |
103 | 99 | | |
104 | 100 | | |
| |||
133 | 129 | | |
134 | 130 | | |
135 | 131 | | |
136 | | - | |
137 | 132 | | |
138 | 133 | | |
139 | 134 | | |
140 | 135 | | |
141 | | - | |
142 | 136 | | |
143 | 137 | | |
144 | 138 | | |
| |||
0 commit comments