Skip to content

Commit 9921d64

Browse files
authored
Linked Time: Render card fob controller when prospective fob feature is enabled (#6006)
~Blocked by #6005~ * Motivation for features / changes We would like to be able to enable step selection using a prospective fob. Now that #6005 is merged, the fob controller can safely be rendered with an undefined `timeSelection` * Screenshots of UI changes None * Alternate designs / implementations considered
1 parent 2599057 commit 9921d64

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

tensorboard/webapp/metrics/views/card_renderer/scalar_card_component.ng.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
let-domDim="domDimension"
188188
let-xScale="xScale"
189189
>
190-
<ng-container *ngIf="inTimeSelectionMode()">
190+
<ng-container *ngIf="inTimeSelectionMode() || isProspectiveFobFeatureEnabled">
191191
<scalar-card-fob-controller
192192
[timeSelection]="stepOrLinkedTimeSelection"
193193
[scale]="xScale"

tensorboard/webapp/metrics/views/card_renderer/scalar_card_test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2377,17 +2377,16 @@ describe('scalar card', () => {
23772377
]);
23782378
}));
23792379

2380-
// TODO(rileyajones) refactor this test with #6006
23812380
it('does not render fobs when no timeSelection is provided', fakeAsync(() => {
23822381
store.overrideSelector(getMetricsLinkedTimeSelection, {
23832382
start: {step: 20},
23842383
end: null,
23852384
});
2385+
store.overrideSelector(
2386+
selectors.getIsLinkedTimeProspectiveFobEnabled,
2387+
true
2388+
);
23862389
const fixture = createComponent('card1');
2387-
const scalarCardFobController = fixture.debugElement.query(
2388-
By.directive(ScalarCardFobController)
2389-
).componentInstance;
2390-
delete scalarCardFobController.timeSelection;
23912390
fixture.detectChanges();
23922391
const fobController = fixture.debugElement.query(
23932392
By.directive(CardFobComponent)

0 commit comments

Comments
 (0)