File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
webview/src/plots/components Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ describe('App', () => {
262262 ] ,
263263 width : DEFAULT_NB_ITEMS_PER_ROW
264264 } ,
265+ custom : null ,
265266 hasPlots : true ,
266267 hasUnselectedPlots : false ,
267268 sectionCollapsed : DEFAULT_SECTION_COLLAPSED ,
@@ -279,7 +280,7 @@ describe('App', () => {
279280 } )
280281 const loading = await screen . findAllByText ( 'Loading...' )
281282
282- expect ( loading ) . toHaveLength ( 2 )
283+ expect ( loading ) . toHaveLength ( 3 )
283284 } )
284285
285286 it ( 'should render the Add Plots and Add Experiments get started button when there are experiments which have plots that are all unselected' , async ( ) => {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { shouldUseVirtualizedGrid } from '../util'
1515import { PlotsState } from '../../store'
1616import { sendMessage } from '../../../shared/vscode'
1717import { changeOrderWithDraggedInfo } from '../../../util/array'
18+ import { LoadingSection , sectionIsLoading } from '../LoadingSection'
1819
1920interface CustomPlotsProps {
2021 plotsIds : string [ ]
@@ -29,6 +30,9 @@ export const CustomPlots: React.FC<CustomPlotsProps> = ({ plotsIds }) => {
2930 const draggedRef = useSelector (
3031 ( state : PlotsState ) => state . dragAndDrop . draggedRef
3132 )
33+ const selectedRevisions = useSelector (
34+ ( state : PlotsState ) => state . webview . selectedRevisions
35+ )
3236
3337 useEffect ( ( ) => {
3438 setOrder ( plotsIds )
@@ -42,6 +46,10 @@ export const CustomPlots: React.FC<CustomPlotsProps> = ({ plotsIds }) => {
4246 } )
4347 }
4448
49+ if ( sectionIsLoading ( selectedRevisions ) ) {
50+ return < LoadingSection />
51+ }
52+
4553 if ( ! hasData ) {
4654 return < EmptyState isFullScreen = { false } > No Plots to Display</ EmptyState >
4755 }
You can’t perform that action at this time.
0 commit comments