[DevTools] Show fallback in inspected element pane when no element is selected #35503
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.
Stacked on #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.