@@ -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 > > ;
@@ -83,6 +91,12 @@ class ProfileFilterNavigatorBarImpl extends React.PureComponent<Props> {
8391 pageDataByTabID,
8492 tabFilter,
8593 profileTimelineUnit,
94+ committedRange,
95+ previewSelection,
96+ updatePreviewSelection,
97+ commitRange,
98+ uncommittedInputFieldRef,
99+ zeroAt,
86100 } = this . props ;
87101
88102 let firstItem ;
@@ -180,6 +194,12 @@ class ProfileFilterNavigatorBarImpl extends React.PureComponent<Props> {
180194 onFirstItemClick = {
181195 isFirstItemClickable ? this . _onFirstItemClick : undefined
182196 }
197+ committedRange = { committedRange }
198+ previewSelection = { previewSelection }
199+ updatePreviewSelection = { updatePreviewSelection }
200+ commitRange = { commitRange }
201+ uncommittedInputFieldRef = { uncommittedInputFieldRef }
202+ zeroAt = { zeroAt }
183203 />
184204 { pageDataByTabID && pageDataByTabID . size > 0 ? (
185205 < TabSelectorMenu />
@@ -189,12 +209,17 @@ class ProfileFilterNavigatorBarImpl extends React.PureComponent<Props> {
189209 }
190210}
191211
212+ type OwnProps = {
213+ readonly uncommittedInputFieldRef ?: React . RefObject < HTMLInputElement > ;
214+ } ;
215+
192216export const ProfileFilterNavigator = explicitConnect <
193- { } ,
217+ OwnProps ,
194218 StateProps ,
195219 DispatchProps
196220> ( {
197221 mapStateToProps : ( state ) => {
222+ const committedRange = getCommittedRange ( state ) ;
198223 const items = getCommittedRangeLabels ( state ) ;
199224 const previewSelection = getPreviewSelection ( state ) ;
200225 const profileTimelineUnit = getProfileTimelineUnit ( state ) ;
@@ -204,6 +229,7 @@ export const ProfileFilterNavigator = explicitConnect<
204229 profileTimelineUnit
205230 )
206231 : undefined ;
232+ const zeroAt = getZeroAt ( state ) ;
207233
208234 const pageDataByTabID = getProfileFilterPageDataByTabID ( state ) ;
209235 const tabFilter = getTabFilter ( state ) ;
@@ -219,10 +245,15 @@ export const ProfileFilterNavigator = explicitConnect<
219245 tabFilter,
220246 rootRange,
221247 profileTimelineUnit,
248+ committedRange,
249+ previewSelection,
250+ zeroAt,
222251 } ;
223252 } ,
224253 mapDispatchToProps : {
225254 onPop : popCommittedRanges ,
255+ updatePreviewSelection,
256+ commitRange,
226257 } ,
227258 component : ProfileFilterNavigatorBarImpl ,
228259} ) ;
0 commit comments