@@ -11,7 +11,7 @@ import * as React from 'react';
1111import { useContext , useEffect } from 'react' ;
1212import { BridgeContext } from '../context' ;
1313import { TreeDispatcherContext } from '../Components/TreeContext' ;
14- import { useHighlightHostInstance , useScrollToHostInstance } from '../hooks' ;
14+ import { useScrollToHostInstance } from '../hooks' ;
1515import {
1616 SuspenseTreeDispatcherContext ,
1717 SuspenseTreeStateContext ,
@@ -25,8 +25,6 @@ function SuspenseTimelineInput() {
2525 const bridge = useContext ( BridgeContext ) ;
2626 const treeDispatch = useContext ( TreeDispatcherContext ) ;
2727 const suspenseTreeDispatch = useContext ( SuspenseTreeDispatcherContext ) ;
28- const { highlightHostInstance, clearHighlightHostInstance} =
29- useHighlightHostInstance ( ) ;
3028 const scrollToHostInstance = useScrollToHostInstance ( ) ;
3129
3230 const { timeline, timelineIndex, hoveredTimelineIndex, playing, autoScroll} =
@@ -37,7 +35,6 @@ function SuspenseTimelineInput() {
3735
3836 function switchSuspenseNode ( nextTimelineIndex : number ) {
3937 const nextSelectedSuspenseID = timeline [ nextTimelineIndex ] ;
40- highlightHostInstance ( nextSelectedSuspenseID ) ;
4138 treeDispatch ( {
4239 type : 'SELECT_ELEMENT_BY_ID' ,
4340 payload : nextSelectedSuspenseID ,
@@ -52,23 +49,14 @@ function SuspenseTimelineInput() {
5249 switchSuspenseNode ( pendingTimelineIndex ) ;
5350 }
5451
55- function handleBlur ( ) {
56- clearHighlightHostInstance ( ) ;
57- }
58-
5952 function handleFocus ( ) {
6053 switchSuspenseNode ( timelineIndex ) ;
6154 }
6255
6356 function handleHoverSegment ( hoveredValue : number ) {
64- const suspenseID = timeline [ hoveredValue ] ;
65- if ( suspenseID === undefined ) {
66- throw new Error (
67- `Suspense node not found for value ${ hoveredValue } in timeline.` ,
68- ) ;
69- }
70- highlightHostInstance ( suspenseID ) ;
57+ // TODO: Consider highlighting the rect instead.
7158 }
59+ function handleUnhoverSegment ( ) { }
7260
7361 function skipPrevious ( ) {
7462 const nextSelectedSuspenseID = timeline [ timelineIndex - 1 ] ;
@@ -180,11 +168,10 @@ function SuspenseTimelineInput() {
180168 max = { max }
181169 value = { timelineIndex }
182170 highlight = { hoveredTimelineIndex }
183- onBlur = { handleBlur }
184171 onChange = { handleChange }
185172 onFocus = { handleFocus }
186173 onHoverSegment = { handleHoverSegment }
187- onHoverLeave = { clearHighlightHostInstance }
174+ onHoverLeave = { handleUnhoverSegment }
188175 />
189176 </ div >
190177 </ >
0 commit comments