@@ -9,13 +9,19 @@ import { showMenu } from '@firefox-devtools/react-contextmenu';
99import classNames from 'classnames' ;
1010
1111import explicitConnect from 'firefox-profiler/utils/connect' ;
12- import { popCommittedRanges } from 'firefox-profiler/actions/profile-view' ;
12+ import {
13+ popCommittedRanges ,
14+ updatePreviewSelection ,
15+ commitRange ,
16+ } from 'firefox-profiler/actions/profile-view' ;
1317import {
1418 getPreviewSelection ,
1519 getProfileFilterPageDataByTabID ,
1620 getProfileRootRange ,
1721 getProfileTimelineUnit ,
22+ getCommittedRange ,
1823 getCommittedRangeLabels ,
24+ getZeroAt ,
1925} from 'firefox-profiler/selectors/profile' ;
2026import { getTabFilter } from 'firefox-profiler/selectors/url-state' ;
2127import { getFormattedTimelineValue } from 'firefox-profiler/profile-logic/committed-ranges' ;
@@ -40,6 +46,8 @@ type Props = {
4046
4147type DispatchProps = {
4248 readonly onPop : Props [ 'onPop' ] ;
49+ readonly updatePreviewSelection ?: Props [ 'updatePreviewSelection' ] ;
50+ readonly commitRange ?: Props [ 'commitRange' ] ;
4351} ;
4452
4553type StateProps = Readonly < Omit < Props , keyof DispatchProps > > ;
@@ -79,6 +87,12 @@ class ProfileFilterNavigatorBarImpl extends React.PureComponent<Props> {
7987 pageDataByTabID,
8088 tabFilter,
8189 profileTimelineUnit,
90+ committedRange,
91+ previewSelection,
92+ updatePreviewSelection,
93+ commitRange,
94+ uncommittedInputFieldRef,
95+ zeroAt,
8296 } = this . props ;
8397
8498 let firstItem ;
@@ -169,6 +183,12 @@ class ProfileFilterNavigatorBarImpl extends React.PureComponent<Props> {
169183 selectedItem = { selectedItem }
170184 uncommittedItem = { uncommittedItem }
171185 onPop = { onPop }
186+ committedRange = { committedRange }
187+ previewSelection = { previewSelection }
188+ updatePreviewSelection = { updatePreviewSelection }
189+ commitRange = { commitRange }
190+ uncommittedInputFieldRef = { uncommittedInputFieldRef }
191+ zeroAt = { zeroAt }
172192 />
173193 { pageDataByTabID && pageDataByTabID . size > 0 ? (
174194 < TabSelectorMenu />
@@ -178,12 +198,17 @@ class ProfileFilterNavigatorBarImpl extends React.PureComponent<Props> {
178198 }
179199}
180200
201+ type OwnProps = {
202+ readonly uncommittedInputFieldRef ?: React . RefObject < HTMLInputElement > ;
203+ } ;
204+
181205export const ProfileFilterNavigator = explicitConnect <
182- { } ,
206+ OwnProps ,
183207 StateProps ,
184208 DispatchProps
185209> ( {
186210 mapStateToProps : ( state ) => {
211+ const committedRange = getCommittedRange ( state ) ;
187212 const items = getCommittedRangeLabels ( state ) ;
188213 const previewSelection = getPreviewSelection ( state ) ;
189214 const profileTimelineUnit = getProfileTimelineUnit ( state ) ;
@@ -193,6 +218,7 @@ export const ProfileFilterNavigator = explicitConnect<
193218 profileTimelineUnit
194219 )
195220 : undefined ;
221+ const zeroAt = getZeroAt ( state ) ;
196222
197223 const pageDataByTabID = getProfileFilterPageDataByTabID ( state ) ;
198224 const tabFilter = getTabFilter ( state ) ;
@@ -208,10 +234,15 @@ export const ProfileFilterNavigator = explicitConnect<
208234 tabFilter,
209235 rootRange,
210236 profileTimelineUnit,
237+ committedRange,
238+ previewSelection,
239+ zeroAt,
211240 } ;
212241 } ,
213242 mapDispatchToProps : {
214243 onPop : popCommittedRanges ,
244+ updatePreviewSelection,
245+ commitRange,
215246 } ,
216247 component : ProfileFilterNavigatorBarImpl ,
217248} ) ;
0 commit comments