@@ -45,46 +45,113 @@ export function PullRequestListGhost({
4545 < GhostBar className = "size-4 rounded-full" />
4646 < div className = "min-w-0 space-y-1.5" >
4747 < GhostBar className = { cn ( "h-3.5" , TITLE_WIDTHS [ index % TITLE_WIDTHS . length ] ) } />
48- < GhostBar
49- className = { cn ( "bg-muted-foreground/10" , META_WIDTHS [ index % META_WIDTHS . length ] ) }
50- />
48+ < GhostBar className = { META_WIDTHS [ index % META_WIDTHS . length ] } />
5149 </ div >
5250 < div className = "flex flex-col items-end gap-1.5" >
5351 < GhostBar className = "w-12" />
54- < GhostBar className = "w-16 bg-muted-foreground/10 " />
52+ < GhostBar className = "w-16" />
5553 </ div >
5654 </ div >
5755 ) ) }
5856 </ div >
5957 ) ;
6058}
6159
62- /** The summary's own shape: a title, a byline, the facts rows, the description. */
60+ /**
61+ * The detail panel's current expanded shape. Keeping the chrome, summary facts, and description
62+ * boundaries in the ghost prevents the loaded pull request from replacing one layout with
63+ * another a moment later.
64+ */
6365export function PullRequestDetailGhost ( ) {
6466 return (
6567 < div
6668 role = "status"
6769 aria-label = "Loading pull request"
68- className = "animate-ghost-pulse space-y-6 px-4 py-5 "
70+ className = "animate-ghost-pulse flex h-full min-h-0 flex-col overflow-hidden bg-background "
6971 >
70- < div className = "space-y-2" >
71- < GhostBar className = "h-5 w-4/5" />
72- < GhostBar className = "w-2/5 bg-muted-foreground/10" />
72+ < div className = "shrink-0 border-b border-border/60" >
73+ < div className = "flex h-7 items-center justify-between gap-3 px-4" >
74+ < div className = "flex min-w-0 flex-1 items-center gap-1.5" >
75+ < GhostBar className = "w-24" />
76+ < GhostBar className = "w-9" />
77+ </ div >
78+ < div className = "flex shrink-0 items-center gap-1" >
79+ < GhostBar className = "h-5 w-16 rounded-md" />
80+ < GhostBar className = "size-5 rounded-md" />
81+ </ div >
82+ </ div >
83+
84+ < div className = "px-4 pb-4 pt-1" >
85+ < GhostBar className = "h-5 w-4/5 max-w-md" />
86+ < div className = "mt-2 flex items-center gap-1.5" >
87+ < GhostBar className = "size-4 rounded-full" />
88+ < GhostBar className = "w-24" />
89+ </ div >
90+ < div className = "mt-4 flex min-w-0 items-center gap-2" >
91+ < GhostBar className = "h-6 w-24 rounded-md" />
92+ < GhostBar className = "size-3 rounded-full" />
93+ < GhostBar className = "h-6 w-32 rounded-md" />
94+ < div className = "ml-auto flex shrink-0 items-center gap-2" >
95+ < GhostBar className = "w-10" />
96+ < GhostBar className = "w-20" />
97+ </ div >
98+ </ div >
99+ </ div >
100+
101+ < div className = "flex min-h-10 items-center justify-between gap-3 border-t border-border/60 px-4 py-2" >
102+ < div className = "flex items-center gap-1 p-0.5" >
103+ < GhostBar className = "h-6 w-16 rounded-md" />
104+ < GhostBar className = "h-6 w-16 rounded-md" />
105+ < GhostBar className = "h-6 w-12 rounded-md" />
106+ </ div >
107+ < GhostBar className = "w-20" />
108+ </ div >
73109 </ div >
74- < div className = "space-y-3" >
75- { Array . from ( { length : 4 } , ( _ , index ) => (
76- < div key = { index } className = "flex items-center gap-3" >
110+
111+ < div className = "min-h-0 flex-1 overflow-hidden" >
112+ < section className = "px-4 py-3" >
113+ < div className = "grid min-h-8 grid-cols-[6rem_minmax(0,1fr)] items-center gap-2" >
114+ < div className = "flex items-center gap-1.5" >
115+ < GhostBar className = "size-3.5 rounded-full" />
116+ < GhostBar className = "w-14" />
117+ </ div >
118+ < div className = "flex items-center gap-1" >
119+ < GhostBar className = "size-4 rounded-full" />
120+ < GhostBar className = "size-4 rounded-full" />
121+ < GhostBar className = "ml-1 size-5 rounded-md" />
122+ </ div >
123+ </ div >
124+ < div className = "grid min-h-8 grid-cols-[6rem_minmax(0,1fr)] items-center gap-2" >
125+ < div className = "flex items-center gap-1.5" >
126+ < GhostBar className = "size-3.5 rounded-full" />
127+ < GhostBar className = "w-10" />
128+ </ div >
129+ < div className = "flex items-center gap-1" >
130+ < GhostBar className = "h-5 w-24 rounded-full" />
131+ < GhostBar className = "h-5 w-20 rounded-full" />
132+ </ div >
133+ </ div >
134+ < div className = "grid min-h-8 grid-cols-[6rem_minmax(0,1fr)] items-center gap-2" >
135+ < div className = "flex items-center gap-1.5" >
136+ < GhostBar className = "size-3.5 rounded-full" />
137+ < GhostBar className = "w-14" />
138+ </ div >
139+ < GhostBar className = "w-20" />
140+ </ div >
141+ </ section >
142+
143+ < section className = "border-t border-border/60" >
144+ < div className = "flex min-h-11 items-center gap-1.5 px-4 py-3" >
145+ < GhostBar className = "h-4 w-24" />
77146 < GhostBar className = "size-3.5 rounded-full" />
78- < GhostBar className = "w-20 bg-muted-foreground/10" />
79- < GhostBar className = { TITLE_WIDTHS [ ( index + 1 ) % TITLE_WIDTHS . length ] } />
80147 </ div >
81- ) ) }
82- </ div >
83- < div className = "space-y-2 pt-1" >
84- < GhostBar className = "w-full bg-muted-foreground/10 " />
85- < GhostBar className = "w-11/12 bg-muted-foreground/10 " />
86- < GhostBar className = "w-4/5 bg-muted-foreground/10" / >
87- < GhostBar className = "w-2/3 bg-muted-foreground/10" / >
148+ < div className = "space-y-2 px-4 pb-4" >
149+ < GhostBar className = "w-full" / >
150+ < GhostBar className = "w-11/12" / >
151+ < GhostBar className = "w-4/5 " />
152+ < GhostBar className = "w-2/3 " />
153+ </ div >
154+ </ section >
88155 </ div >
89156 </ div >
90157 ) ;
@@ -113,7 +180,7 @@ export function PullRequestTimelineGhost({ rows = 6 }: { rows?: number }) {
113180 < div key = { index } className = "relative pb-5" >
114181 < GhostBar className = "absolute -left-[1.55rem] top-1 size-2 rounded-full" />
115182 < GhostBar className = { cn ( "h-3.5" , TITLE_WIDTHS [ index % TITLE_WIDTHS . length ] ) } />
116- < GhostBar className = "mt-1.5 w-16 bg-muted-foreground/10 " />
183+ < GhostBar className = "mt-1.5 w-16" />
117184 </ div >
118185 ) ) }
119186 </ div >
@@ -134,8 +201,8 @@ export function PullRequestConversationGhost({ rows = 3 }: { rows?: number }) {
134201 < GhostBar className = "size-5 shrink-0 rounded-full" />
135202 < div className = "flex-1 space-y-1.5" >
136203 < GhostBar className = { META_WIDTHS [ index % META_WIDTHS . length ] } />
137- < GhostBar className = "w-full bg-muted-foreground/10 " />
138- < GhostBar className = "w-3/4 bg-muted-foreground/10 " />
204+ < GhostBar className = "w-full" />
205+ < GhostBar className = "w-3/4" />
139206 </ div >
140207 </ div >
141208 ) ) }
0 commit comments