@@ -8,10 +8,10 @@ import { SetOverviewFilter } from '../../../../home/protocol';
88import  {  stateContext  }  from  '../../../home/context' ; 
99import  {  ipcContext  }  from  '../../../shared/context' ; 
1010import  type  {  HostIpc  }  from  '../../../shared/ipc' ; 
11+ import  {  headingLoaderStyles  }  from  './branch-section' ; 
1112import  type  {  OverviewState  }  from  './overviewState' ; 
1213import  {  overviewStateContext  }  from  './overviewState' ; 
1314import  '../../../shared/components/skeleton-loader' ; 
14- import  './branch-section' ; 
1515import  './branch-threshold-filter' ; 
1616
1717type  Overview  =  GetOverviewResponse ; 
@@ -21,6 +21,7 @@ export const overviewTagName = 'gl-overview';
2121@customElement ( overviewTagName ) 
2222export  class  GlOverview  extends  SignalWatcher ( LitElement )  { 
2323	static  override  styles  =  [ 
24+ 		headingLoaderStyles , 
2425		css ` 
2526			:host { 
2627				display: block; 
@@ -46,6 +47,10 @@ export class GlOverview extends SignalWatcher(LitElement) {
4647	} 
4748
4849	override  render ( )  { 
50+ 		if  ( this . _homeState . discovering )  { 
51+ 			return  this . renderLoader ( ) ; 
52+ 		} 
53+ 
4954		if  ( this . _homeState . repositories . openCount  ===  0 )  { 
5055			return  nothing ; 
5156		} 
@@ -57,14 +62,18 @@ export class GlOverview extends SignalWatcher(LitElement) {
5762		} ) ; 
5863	} 
5964
65+ 	private  renderLoader ( )  { 
66+ 		return  html ` 
67+ 			< gl-section >  
68+ 				< skeleton-loader  slot ="heading " class ="heading-loader " lines ="1 "> </ skeleton-loader >  
69+ 				< skeleton-loader  lines ="3 "> </ skeleton-loader >  
70+ 			</ gl-section >  
71+ 		` ; 
72+ 	} 
73+ 
6074	private  renderPending ( )  { 
6175		if  ( this . _overviewState . state  ==  null )  { 
62- 			return  html ` 
63- 				< gl-section >  
64- 					< skeleton-loader  slot ="heading " lines ="1 "> </ skeleton-loader >  
65- 					< skeleton-loader  lines ="3 "> </ skeleton-loader >  
66- 				</ gl-section >  
67- 			` ; 
76+ 			return  this . renderLoader ( ) ; 
6877		} 
6978		return  this . renderComplete ( this . _overviewState . state ,  true ) ; 
7079	} 
0 commit comments