File tree Expand file tree Collapse file tree 2 files changed +30
-26
lines changed
packages/react-devtools-shared/src/devtools/views/SuspenseTab Expand file tree Collapse file tree 2 files changed +30
-26
lines changed Original file line number Diff line number Diff line change 77}
88
99.SuspenseRectsBoundary {
10- box-shadow : var (--elevation-4 );
11- outline-style : solid;
12- outline-width : 1px ;
10+ pointer-events : all;
11+ }
12+
13+ .SuspenseRectsBoundaryChildren {
14+ pointer-events : none;
1315 /**
1416 * So that the shadow of Boundaries within is clipped off.
15- * Otherwise it would look like this boundary is further elevated
17+ * Otherwise it would look like this boundary is further elevated.
1618 */
17- overflow : hidden;
19+ overflow : hidden;
1820}
1921
2022.SuspenseRectsRect {
21- outline-style : dashed;
22- outline-width : 0px ;
23+ box-shadow : var (--elevation-4 );
24+ pointer-events : all;
25+ outline-style : solid;
26+ outline-width : 1px ;
2327}
2428
2529.SuspenseRectsScaledRect {
2630 position : absolute;
2731 outline-color : var (--color-background-selected );
2832}
2933
30- .SuspenseRectsBoundary [data-highlighted = 'true' ] {
31- background-color : var (--color-selected-tree-highlight-active );
34+ /* highlight this boundary */
35+ .SuspenseRectsBoundary : hover: not (: has (.SuspenseRectsBoundary : hover)) > .SuspenseRectsRect , .SuspenseRectsBoundary [data-highlighted = 'true' ] > .SuspenseRectsRect {
36+ background-color : var (--color-background-hover );
3237}
3338
34- /* highlight individual rects of this boundary */
35- .SuspenseRectsBoundary : hover: not (: has (.SuspenseRectsBoundary : hover)) > .SuspenseRectsRect , .SuspenseRectsBoundary [data-highlighted = 'true' ] > .SuspenseRectsRect {
36- outline-width : 1px ;
39+ .SuspenseRectsRect [data-highlighted = 'true' ] {
40+ background-color : var (--color-selected-tree-highlight-active );
3741}
Original file line number Diff line number Diff line change @@ -118,17 +118,7 @@ function SuspenseRects({
118118
119119 return (
120120 < >
121- < ScaledRect
122- rect = { boundingBox }
123- className = { styles . SuspenseRectsBoundary }
124- data-highlighted = { selected }
125- onClick = { handleClick }
126- onPointerOver = { handlePointerOver }
127- onPointerLeave = { handlePointerLeave }
128- // Reach-UI tooltip will go out of bounds of parent scroll container.
129- // Native title will change position for each Client Rect.
130- // changing position is better than going oob.
131- title = { suspense . name } >
121+ < ScaledRect rect = { boundingBox } className = { styles . SuspenseRectsBoundary } >
132122 < ViewBox . Provider value = { boundingBox } >
133123 { suspense . rects !== null &&
134124 suspense . rects . map ( ( rect , index ) => {
@@ -137,12 +127,22 @@ function SuspenseRects({
137127 key = { index }
138128 className = { styles . SuspenseRectsRect }
139129 rect = { rect }
130+ data-highlighted = { selected }
131+ onClick = { handleClick }
132+ onPointerOver = { handlePointerOver }
133+ onPointerLeave = { handlePointerLeave }
134+ // Reach-UI tooltip will go out of bounds of parent scroll container.
135+ title = { suspense . name }
140136 />
141137 ) ;
142138 } ) }
143- { suspense . children . map ( childID => {
144- return < SuspenseRects key = { childID } suspenseID = { childID } /> ;
145- } ) }
139+ < ScaledRect
140+ className = { styles . SuspenseRectsBoundaryChildren }
141+ rect = { boundingBox } >
142+ { suspense . children . map ( childID => {
143+ return < SuspenseRects key = { childID } suspenseID = { childID } /> ;
144+ } ) }
145+ </ ScaledRect >
146146 </ ViewBox . Provider >
147147 </ ScaledRect >
148148 </ >
You can’t perform that action at this time.
0 commit comments