From 2974a3cadb0a727860f585cde93aa966443b5693 Mon Sep 17 00:00:00 2001 From: HaudinFlorence Date: Tue, 30 Jul 2024 17:54:55 +0200 Subject: [PATCH 1/2] Change migration table to only have one header. --- .../StatusDashboard/current_migrations.jsx | 108 +++++++++--------- 1 file changed, 57 insertions(+), 51 deletions(-) diff --git a/src/components/StatusDashboard/current_migrations.jsx b/src/components/StatusDashboard/current_migrations.jsx index 89d8158f2f..c64368dccd 100644 --- a/src/components/StatusDashboard/current_migrations.jsx +++ b/src/components/StatusDashboard/current_migrations.jsx @@ -8,7 +8,7 @@ import Link from "@docusaurus/Link"; const COLLAPSED_KEY = "migration-collapsed"; const SORT_KEY = "migration-sort"; -export default function CurrentMigrations({ onLoad }) { +export default function CurrentMigrations({ onLoad, collapsed, name, rows, sort }) { const [state, setState] = useState({ closed: [], collapsed: { closed: true, longterm: true, regular: true }, @@ -49,6 +49,7 @@ export default function CurrentMigrations({ onLoad }) { } return { ...prev, collapsed: updated }; }); + useEffect(fetchContent(onLoad, setState), []); const { closed, longterm, regular } = state; const total = closed.length + longterm.length + regular.length; @@ -62,6 +63,61 @@ export default function CurrentMigrations({ onLoad }) {
+ + + + + + + + + + + + + + {rows.length || "…"} - - - - - - - - - - {rows.map((row) => { From e7323d7d8ec4a5c2c25a5da8400099190392bb42 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 19:23:53 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../StatusDashboard/current_migrations.jsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/StatusDashboard/current_migrations.jsx b/src/components/StatusDashboard/current_migrations.jsx index c64368dccd..f4e8618eea 100644 --- a/src/components/StatusDashboard/current_migrations.jsx +++ b/src/components/StatusDashboard/current_migrations.jsx @@ -49,7 +49,7 @@ export default function CurrentMigrations({ onLoad, collapsed, name, rows, sort } return { ...prev, collapsed: updated }; }); - + useEffect(fetchContent(onLoad, setState), []); const { closed, longterm, regular } = state; const total = closed.length + longterm.length + regular.length; @@ -65,8 +65,8 @@ export default function CurrentMigrations({ onLoad, collapsed, name, rows, sort
resort("name")} + className={state.sort.by === "name" ? styles[state.sort.order] : undefined} + > + Name + resort("status")} + className={state.sort.by === "status" ? styles[state.sort.order] : undefined} + > + PRs made + resort("done")} + className={state.sort.by === "done" ? styles[state.sort.order] : undefined} + > + Done + resort("in-pr")} + className={state.sort.by === "in-pr" ? styles[state.sort.order] : undefined} + > + In PR + resort("awaiting-pr")} + className={state.sort.by === "awaiting-pr" ? styles[state.sort.order] : undefined} + > + Awaiting PR + resort("awaiting-parents")} + className={state.sort.by === "awaiting-parents" ? styles[state.sort.order] : undefined} + > + Awaiting parents + resort("not-solvable")} + className={state.sort.by === "not-solvable" ? styles[state.sort.order] : undefined} + > + Not solvable + resort("bot-error")} + className={state.sort.by === "bot-error" ? styles[state.sort.order] : undefined} + > + Bot error +
resort("name")} - className={sort.by === "name" ? styles[sort.order] : undefined} - > - Name - resort("status")} - className={sort.by === "status" ? styles[sort.order] : undefined} - > - PRs made - resort("done")} - className={sort.by === "done" ? styles[sort.order] : undefined} - > - Done - resort("in-pr")} - className={sort.by === "in-pr" ? styles[sort.order] : undefined} - > - In PR - resort("awaiting-pr")} - className={sort.by === "awaiting-pr" ? styles[sort.order] : undefined} - > - Awaiting PR - resort("awaiting-parents")} - className={sort.by === "awaiting-parents" ? styles[sort.order] : undefined} - > - Awaiting parents - resort("not-solvable")} - className={sort.by === "not-solvable" ? styles[sort.order] : undefined} - > - Not solvable - resort("bot-error")} - className={sort.by === "bot-error" ? styles[sort.order] : undefined} - > - Bot error -
- - - - - - - - + +
resort("name")} className={state.sort.by === "name" ? styles[state.sort.order] : undefined} > @@ -84,39 +84,39 @@ export default function CurrentMigrations({ onLoad, collapsed, name, rows, sort > Done resort("in-pr")} className={state.sort.by === "in-pr" ? styles[state.sort.order] : undefined} > In PR resort("awaiting-pr")} className={state.sort.by === "awaiting-pr" ? styles[state.sort.order] : undefined} > Awaiting PR resort("awaiting-parents")} className={state.sort.by === "awaiting-parents" ? styles[state.sort.order] : undefined} > Awaiting parents resort("not-solvable")} className={state.sort.by === "not-solvable" ? styles[state.sort.order] : undefined} > Not solvable resort("bot-error")} className={state.sort.by === "bot-error" ? styles[state.sort.order] : undefined} > Bot error