Skip to content

Commit 25957a2

Browse files
committed
Add children count, sort alphabetically
1 parent 76d174d commit 25957a2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/MigrationDetails/index.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ function Table({ details }) {
206206
const rows = ORDERED.reduce((rows, [status]) => (
207207
filters[status] ? rows :
208208
rows.concat((details[status]).map(name => ([name, status])))
209-
), []);
209+
), []).sort((a, b) => (
210+
ORDERED.findIndex(x => x[0] == a[1]) - ORDERED.findIndex(x => x[0] == b[1])
211+
|| a[0].localeCompare(b[0]))
212+
);
210213
return (
211214
<>
212215
<Filters
@@ -219,6 +222,7 @@ function Table({ details }) {
219222
<tr>
220223
<th style={{ width: 200 }}>Name</th>
221224
<th style={{ width: 115 }}>PRs made</th>
225+
<th style={{ width: 90 }}># children</th>
222226
<th style={{ flex: 1 }}>Immediate Children</th>
223227
</tr>
224228
</thead>
@@ -253,6 +257,7 @@ function Row({ children }) {
253257
)}
254258
</td>
255259
<td>{TITLES[status]}</td>
260+
<td style={{ textAlign: "center" }}>{immediate.length || null}</td>
256261
<td>
257262
{immediate.map((name, index) => (<React.Fragment key={index}>
258263
<span

0 commit comments

Comments
 (0)