@@ -17,12 +17,16 @@ import {
1717 getMarkerSchemaByName ,
1818} from 'firefox-profiler/selectors/profile' ;
1919import { selectedThreadSelectors } from 'firefox-profiler/selectors/per-thread' ;
20- import { getSelectedThreadsKey } from 'firefox-profiler/selectors/url-state' ;
20+ import {
21+ getSelectedThreadsKey ,
22+ getSelectedTab ,
23+ } from 'firefox-profiler/selectors/url-state' ;
2124import {
2225 updatePreviewSelection ,
2326 changeRightClickedMarker ,
2427 changeMouseTimePosition ,
2528 changeSelectedMarker ,
29+ updateBottomBoxContentsAndMaybeOpen ,
2630} from 'firefox-profiler/actions/profile-view' ;
2731import { ContextMenuTrigger } from 'firefox-profiler/components/shared/ContextMenuTrigger' ;
2832
@@ -35,7 +39,9 @@ import type {
3539 StartEndRange ,
3640 PreviewSelection ,
3741 ThreadsKey ,
42+ Thread ,
3843} from 'firefox-profiler/types' ;
44+ import type { TabSlug } from 'firefox-profiler/app-logic/tabs-handling' ;
3945
4046import type { ConnectedProps } from 'firefox-profiler/utils/connect' ;
4147
@@ -48,6 +54,7 @@ type DispatchProps = {
4854 readonly changeRightClickedMarker : typeof changeRightClickedMarker ;
4955 readonly changeMouseTimePosition : typeof changeMouseTimePosition ;
5056 readonly changeSelectedMarker : typeof changeSelectedMarker ;
57+ readonly updateBottomBoxContentsAndMaybeOpen : typeof updateBottomBoxContentsAndMaybeOpen ;
5158} ;
5259
5360type StateProps = {
@@ -62,6 +69,8 @@ type StateProps = {
6269 readonly previewSelection : PreviewSelection | null ;
6370 readonly rightClickedMarkerIndex : MarkerIndex | null ;
6471 readonly selectedMarkerIndex : MarkerIndex | null ;
72+ readonly thread : Thread ;
73+ readonly selectedTab : TabSlug ;
6574} ;
6675
6776type Props = ConnectedProps < { } , StateProps , DispatchProps > ;
@@ -171,6 +180,10 @@ class MarkerChartImpl extends React.PureComponent<Props> {
171180 selectedMarkerIndex,
172181 rightClickedMarkerIndex,
173182 shouldDisplayTooltips : this . _shouldDisplayTooltips ,
183+ thread : this . props . thread ,
184+ updateBottomBoxContentsAndMaybeOpen :
185+ this . props . updateBottomBoxContentsAndMaybeOpen ,
186+ selectedTab : this . props . selectedTab ,
174187 } }
175188 />
176189 </ ContextMenuTrigger >
@@ -206,13 +219,16 @@ export const MarkerChart = explicitConnect<{}, StateProps, DispatchProps>({
206219 selectedThreadSelectors . getRightClickedMarkerIndex ( state ) ,
207220 selectedMarkerIndex :
208221 selectedThreadSelectors . getSelectedMarkerIndex ( state ) ,
222+ thread : selectedThreadSelectors . getThread ( state ) ,
223+ selectedTab : getSelectedTab ( state ) ,
209224 } ;
210225 } ,
211226 mapDispatchToProps : {
212227 updatePreviewSelection,
213228 changeMouseTimePosition,
214229 changeRightClickedMarker,
215230 changeSelectedMarker,
231+ updateBottomBoxContentsAndMaybeOpen,
216232 } ,
217233 component : MarkerChartImpl ,
218234} ) ;
0 commit comments