@@ -206,7 +206,11 @@ function Table({ details }) {
206
206
const rows = ORDERED . reduce ( ( rows , [ status ] ) => (
207
207
filters [ status ] ? rows :
208
208
rows . concat ( ( details [ status ] ) . map ( name => ( [ name , status ] ) ) )
209
- ) , [ ] ) ;
209
+ ) , [ ] ) . sort ( ( a , b ) => (
210
+ feedstock [ b [ 0 ] ] [ "num_descendants" ] - feedstock [ a [ 0 ] ] [ "num_descendants" ]
211
+ || ORDERED . findIndex ( x => x [ 0 ] == a [ 1 ] ) - ORDERED . findIndex ( x => x [ 0 ] == b [ 1 ] )
212
+ || a [ 0 ] . localeCompare ( b [ 0 ] ) )
213
+ ) ;
210
214
return (
211
215
< >
212
216
< Filters
@@ -218,8 +222,9 @@ function Table({ details }) {
218
222
< thead >
219
223
< tr >
220
224
< th style = { { width : 200 } } > Name</ th >
221
- < th style = { { width : 115 } } > PRs made</ th >
222
- < th style = { { flex : 1 } } > Immediate Children</ th >
225
+ < th style = { { width : 115 } } > Status</ th >
226
+ < th style = { { width : 115 } } > Total number of children</ th >
227
+ < th style = { { flex : 1 } } > Immediate children</ th >
223
228
</ tr >
224
229
</ thead >
225
230
< tbody >
@@ -235,7 +240,8 @@ function Table({ details }) {
235
240
function Row ( { children } ) {
236
241
const [ collapsed , setState ] = useState ( true ) ;
237
242
const { feedstock, name, status } = children ;
238
- const immediate = feedstock [ "immediate_children" ] || [ ] ;
243
+ const immediate_children = feedstock [ "immediate_children" ] || [ ] ;
244
+ const total_children = feedstock [ "num_descendants" ] ;
239
245
const href = feedstock [ "pr_url" ] ;
240
246
const details = feedstock [ "pre_pr_migrator_status" ] ;
241
247
return ( < >
@@ -252,13 +258,14 @@ function Row({ children }) {
252
258
< span > { name } </ span > )
253
259
) }
254
260
</ td >
255
- < td > { TITLES [ status ] } </ td >
261
+ < td style = { { textAlign : "center" } } > { TITLES [ status ] } </ td >
262
+ < td style = { { textAlign : "center" } } > { total_children || null } </ td >
256
263
< td >
257
- { immediate . map ( ( name , index ) => ( < React . Fragment key = { index } >
264
+ { immediate_children . map ( ( name , index ) => ( < React . Fragment key = { index } >
258
265
< span
259
266
style = { { marginBottom : 1 } }
260
267
className = "badge badge--secondary" > { name } </ span >
261
- { immediate . length - 1 === index ? "" : " " }
268
+ { immediate_children . length - 1 === index ? "" : " " }
262
269
</ React . Fragment > ) ) }
263
270
</ td >
264
271
</ tr >
0 commit comments