File tree Expand file tree Collapse file tree 4 files changed +28
-2
lines changed
Expand file tree Collapse file tree 4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ import {provideMockTbStore} from '../../testing/utils';
2323import { MouseEventButtons } from '../../util/dom' ;
2424import { sideBarWidthChanged } from '../actions' ;
2525import { State } from '../state' ;
26- import { getSideBarWidthInPercent } from '../store/core_selectors' ;
26+ import {
27+ getRunsTableFullScreen ,
28+ getSideBarWidthInPercent ,
29+ } from '../store/core_selectors' ;
2730import { LayoutContainer } from './layout_container' ;
2831
2932@Component ( {
@@ -137,6 +140,15 @@ describe('layout test', () => {
137140 expect ( navEl . styles [ 'width' ] ) . toBe ( '70%' ) ;
138141 } ) ;
139142
143+ it ( 'overrides max width when the runs table full screen is true' , ( ) => {
144+ store . overrideSelector ( getRunsTableFullScreen , true ) ;
145+ const fixture = TestBed . createComponent ( TestableComponent ) ;
146+ fixture . detectChanges ( ) ;
147+
148+ const navEl = fixture . debugElement . query ( byCss . SIDEBAR_CONTAINER ) ;
149+ expect ( navEl . styles [ 'width' ] ) . toBe ( '100%' ) ;
150+ } ) ;
151+
140152 describe ( 'interactions' , ( ) => {
141153 function triggerMouseMove (
142154 fixture : ComponentFixture < TestableComponent > ,
Original file line number Diff line number Diff line change @@ -81,9 +81,11 @@ tf_ts_library(
8181 "//tensorboard/webapp/angular:expect_angular_core_testing" ,
8282 "//tensorboard/webapp/angular:expect_angular_platform_browser_animations" ,
8383 "//tensorboard/webapp/angular:expect_ngrx_store_testing" ,
84+ "//tensorboard/webapp/core/store" ,
8485 "//tensorboard/webapp/feature_flag/store" ,
8586 "//tensorboard/webapp/metrics/actions" ,
8687 "//tensorboard/webapp/metrics/data_source" ,
88+ "//tensorboard/webapp/metrics/views/main_view" ,
8789 "//tensorboard/webapp/runs/views/runs_selector" ,
8890 "//tensorboard/webapp/testing:utils" ,
8991 "@npm//@angular/core" ,
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ import {getEnableHparamsInTimeSeries} from '../../feature_flag/store/feature_fla
2222import { RunsSelectorContainer } from '../../runs/views/runs_selector/runs_selector_container' ;
2323import { provideMockTbStore } from '../../testing/utils' ;
2424import { MetricsDashboardContainer } from './metrics_container' ;
25+ import { getRunsTableFullScreen } from '../../core/store/core_selectors' ;
26+ import { MainViewContainer } from './main_view/main_view_container' ;
2527
2628describe ( 'metrics view' , ( ) => {
2729 let store : MockStore < State > ;
@@ -64,4 +66,14 @@ describe('metrics view', () => {
6466 . showHparamsAndMetrics
6567 ) . toBeFalse ( ) ;
6668 } ) ;
69+
70+ it ( 'hides main view when the runs table is full screen is true' , ( ) => {
71+ store . overrideSelector ( getRunsTableFullScreen , true ) ;
72+ const fixture = TestBed . createComponent ( MetricsDashboardContainer ) ;
73+ fixture . detectChanges ( ) ;
74+
75+ expect (
76+ fixture . debugElement . query ( By . directive ( MainViewContainer ) )
77+ ) . toBeNull ( ) ;
78+ } ) ;
6779} ) ;
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ tb-data-table-header-cell {
6161 // Ensure the button is on the right side then add 2px for the drag target.
6262 left : calc (100% + 2px );
6363 top : 0 ;
64- z-index : 10 ;
64+ z-index : 1 ;
6565 display : flex ;
6666 align-items : center ;
6767
You can’t perform that action at this time.
0 commit comments