Skip to content

Commit 3673cd6

Browse files
committed
Also name the side bar panel Initial Paint.
1 parent 9e19887 commit 3673cd6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/react-devtools-shared/src/devtools/views/Components/InspectedElement.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ import Button from '../Button';
1717
import ButtonIcon from '../ButtonIcon';
1818
import Icon from '../Icon';
1919
import Toggle from '../Toggle';
20-
import {ElementTypeSuspense} from 'react-devtools-shared/src/frontend/types';
20+
import {
21+
ElementTypeSuspense,
22+
ElementTypeRoot,
23+
} from 'react-devtools-shared/src/frontend/types';
2124
import InspectedElementView from './InspectedElementView';
2225
import {InspectedElementContext} from './InspectedElementContext';
2326
import {getAlwaysOpenInEditor} from '../../../utils';
@@ -209,6 +212,11 @@ export default function InspectedElementWrapper(_: Props): React.Node {
209212
if (element.nameProp !== null) {
210213
fullName += ' "' + element.nameProp + '"';
211214
}
215+
if (element.type === ElementTypeRoot) {
216+
// The root only has "suspended by" and it represents the things that block
217+
// Initial Paint.
218+
fullName = 'Initial Paint';
219+
}
212220

213221
return (
214222
<div

0 commit comments

Comments
 (0)