[DevTools] Show fallback in inspected element pane when no element is selected#332
Closed
everettbu wants to merge 3 commits into
Conversation
Greptile SummaryAdded configurable fallback messages when no React element is selected in the inspected element pane. Previously showed blank pane, now displays context-appropriate messages: "Selected element wasn't rendered with React." for browser Elements panel, "No React element selected. Select an element in the tree to inspect." for Components tab, and "No React element selected. Select a Suspense boundary in the minimap to inspect." for Suspense tab.
Confidence Score: 5/5
Important Files Changed
|
everettbu
force-pushed
the
sebbie/01-13-_devtools_show_fallback_in_inspected_element_pane_when_no_element_is_selected
branch
from
January 13, 2026 18:19
51d62c9 to
2bc6bf4
Compare
| import {SettingsModalContextController} from 'react-devtools-shared/src/devtools/views/Settings/SettingsModalContext'; | ||
| import styles from './InspectedElementPane.css'; | ||
|
|
||
| export type Props = {}; |
There was a problem hiding this comment.
selectedSource prop is passed in DevTools.js line 387 but not defined in Props type or used in component
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/react-devtools-shared/src/devtools/views/InspectedElement/InspectedElementPane.js
Line: 21:21
Comment:
`selectedSource` prop is passed in `DevTools.js` line 387 but not defined in Props type or used in component
How can I resolve this? If you propose a fix, please make it concise.
everettbu
force-pushed
the
sebbie/01-13-_devtools_show_fallback_in_inspected_element_pane_when_no_element_is_selected
branch
from
January 15, 2026 13:23
2bc6bf4 to
f261518
Compare
Author
|
Upstream PR was closed or merged. Code is synced via branch mirror. |
everettbu
deleted the
sebbie/01-13-_devtools_show_fallback_in_inspected_element_pane_when_no_element_is_selected
branch
January 15, 2026 14:13
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.
Mirror of facebook/react#35503
Original author: eps1lon
Stacked on react/react#35240
We used to only show a blank pane when no element is selected. This was ok when we only showed the inspected element pane in the Components and Suspense tab since you couldn't escape inspection.
However, when showing the inspected element pane in the browsers Elements panel, you can select elements that aren't owned by React and therefore won't inspect an element. Now we show a configurable fallback.
For the inspected element pane in the browser's Elements panel, we display "No element rendered by React selected.".
Otherwise "No React element selected."
Styling and layout is similar to the loading fallback but not dimmed since the fallback for no selection may be visible indefinitely.