Skip to content

Commit abc4219

Browse files
authored
Remove unused timeSelectionCleared() action. (#6389)
The timeSelectionCleared() action is unused except by the reducers.
1 parent 211ca75 commit abc4219

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

tensorboard/webapp/metrics/actions/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,6 @@ export const cardViewBoxChanged = createAction(
220220
props<{cardId: CardId; userViewBox: Extent | null}>()
221221
);
222222

223-
export const timeSelectionCleared = createAction(
224-
'[Metrics] Linked Time Selection Cleared'
225-
);
226-
227223
export const linkedTimeToggled = createAction(
228224
'[Metrics] Linked Time Enable Toggle',
229225
props<{

tensorboard/webapp/metrics/store/metrics_reducers.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,12 +1341,6 @@ const reducer = createReducer(
13411341
cardStateMap: nextCardStateMap,
13421342
};
13431343
}),
1344-
on(actions.timeSelectionCleared, (state) => {
1345-
return {
1346-
...state,
1347-
linkedTimeSelection: null,
1348-
};
1349-
}),
13501344
on(actions.tableEditorTabChanged, (state, {tab}) => {
13511345
return {
13521346
...state,

tensorboard/webapp/metrics/store/metrics_reducers_test.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3967,18 +3967,6 @@ describe('metrics reducers', () => {
39673967
});
39683968
});
39693969

3970-
describe('#timeSelectionCleared', () => {
3971-
it('clears linked time selection', () => {
3972-
const beforeState = buildMetricsState({
3973-
linkedTimeSelection: {start: {step: 4}, end: {step: 4}},
3974-
});
3975-
3976-
const nextState = reducers(beforeState, actions.timeSelectionCleared());
3977-
3978-
expect(nextState.linkedTimeSelection).toBeNull();
3979-
});
3980-
});
3981-
39823970
describe('#rangeSelectionToggled', () => {
39833971
it('toggles whether stepSelectorRange is enabled or not', () => {
39843972
const state1 = buildMetricsState({

0 commit comments

Comments
 (0)