From 1e33470482a37fa0fbfdb7ea9d3e86d86a9d23c0 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 13 Sep 2024 11:15:24 +0200 Subject: [PATCH 1/5] fix version updates badge color contrast in dark mode --- src/components/StatusDashboard/styles.module.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/StatusDashboard/styles.module.css b/src/components/StatusDashboard/styles.module.css index c5d4fa6ec2..11ef1052f8 100644 --- a/src/components/StatusDashboard/styles.module.css +++ b/src/components/StatusDashboard/styles.module.css @@ -193,11 +193,20 @@ font-weight: 600; } +[data-theme="dark"] .version_updates_content .badge a { + color: var(--ifm-color-primary-darkest); +} + .version_updates_content .badge:hover { border-width: var(--ifm-badge-border-width); border-color: var(--ifm-color-primary); } +[data-theme="dark"] .version_updates_content .badge:hover { + border-width: var(--ifm-badge-border-width); + border-color: var(--ifm-color-primary-light); +} + .errored_item { border: var(--ifm-table-border-width) solid transparent; cursor: pointer; From 1a3467feabfddb7531066e2a04d645ea56bf9d9f Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 13 Sep 2024 11:15:38 +0200 Subject: [PATCH 2/5] color the progress bar with our primary --- src/components/StatusDashboard/styles.module.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/StatusDashboard/styles.module.css b/src/components/StatusDashboard/styles.module.css index 11ef1052f8..6b2888c46a 100644 --- a/src/components/StatusDashboard/styles.module.css +++ b/src/components/StatusDashboard/styles.module.css @@ -271,3 +271,7 @@ right: 0; text-align: right; } + +.progress_bar progress { + accent-color: var(--ifm-color-primary); +} From 9dc57b747456d35ea808bb4420bf480fcdcf944e Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 13 Sep 2024 11:26:35 +0200 Subject: [PATCH 3/5] version updates should use the whole width, and be placed under migrations --- src/components/StatusDashboard/index.jsx | 14 ++++++++------ src/components/StatusDashboard/toc.jsx | 6 +++--- src/components/StatusDashboard/version_updates.jsx | 2 +- src/pages/status/index.jsx | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/StatusDashboard/index.jsx b/src/components/StatusDashboard/index.jsx index 070ef3ede8..3ca546294c 100644 --- a/src/components/StatusDashboard/index.jsx +++ b/src/components/StatusDashboard/index.jsx @@ -35,7 +35,7 @@ export default function StatusDashboard() { const onLoadIncidents = incidents => setState((prev) => ({ ...prev, incidents, loaded: prev.loaded + 1 })); return ( -
+
@@ -59,6 +59,12 @@ export default function StatusDashboard() {
+
+
+
+ +
+
@@ -90,14 +96,10 @@ export default function StatusDashboard() {
-
+
-
-
- -
diff --git a/src/components/StatusDashboard/toc.jsx b/src/components/StatusDashboard/toc.jsx index e3274cf321..01f7d77fbf 100644 --- a/src/components/StatusDashboard/toc.jsx +++ b/src/components/StatusDashboard/toc.jsx @@ -14,6 +14,9 @@ export default function TOC({ incident }) {
  • Current Migrations
  • +
  • + Version Updates +
  • Azure Pipelines Usage
  • @@ -26,9 +29,6 @@ export default function TOC({ incident }) {
  • Incidents
  • -
  • - Version Updates -
  • ); diff --git a/src/components/StatusDashboard/version_updates.jsx b/src/components/StatusDashboard/version_updates.jsx index 1feaa1b0d2..d8368d9722 100644 --- a/src/components/StatusDashboard/version_updates.jsx +++ b/src/components/StatusDashboard/version_updates.jsx @@ -6,7 +6,7 @@ import styles from "./styles.module.css"; export default function VersionUpdates({ onLoad }) { const [{ collapsed, errored, expanded, errors, queued }, setState] = useState({ - collapsed: { queued: true, errored: true }, + collapsed: { queued: false, errored: true }, expanded: {}, errored: [], errors: {}, diff --git a/src/pages/status/index.jsx b/src/pages/status/index.jsx index 5a9aafa6bb..9a455c21c7 100644 --- a/src/pages/status/index.jsx +++ b/src/pages/status/index.jsx @@ -8,7 +8,7 @@ export default function Home() { title="Status dashboard" description="Status dashboard for conda-forge" > - + ); } From 92a8bda061a0557bd7637a0a0d527dc43a02f275 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 13 Sep 2024 14:37:11 +0200 Subject: [PATCH 4/5] Collapse resolved incidents by default --- src/components/StatusDashboard/incidents.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/StatusDashboard/incidents.jsx b/src/components/StatusDashboard/incidents.jsx index 688d30ffe4..ae0f42d9f7 100644 --- a/src/components/StatusDashboard/incidents.jsx +++ b/src/components/StatusDashboard/incidents.jsx @@ -92,7 +92,12 @@ export default function Incidents({ ongoing, onLoad, ...props }) {
    {open.map((issue, i) => {issue})} - {closed.map((issue, i) => {issue})} + {closed.length ? ( +
    + See previous incidents + {closed.map((issue, i) => {issue})} +
    + ) : null}
    ); From eabfd87ad4be7d4516d2871da5afb05ad537dcc0 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 13 Sep 2024 16:22:37 +0200 Subject: [PATCH 5/5] Use version_updates.v2.json --- .../StatusDashboard/version_updates.jsx | 31 +++++++++---------- src/constants.js | 4 +-- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/components/StatusDashboard/version_updates.jsx b/src/components/StatusDashboard/version_updates.jsx index d8368d9722..f8ad1829bd 100644 --- a/src/components/StatusDashboard/version_updates.jsx +++ b/src/components/StatusDashboard/version_updates.jsx @@ -4,13 +4,12 @@ import React, { useEffect, useState } from "react"; import styles from "./styles.module.css"; export default function VersionUpdates({ onLoad }) { - const [{ collapsed, errored, expanded, errors, queued }, setState] = + const [{ collapsed, expanded, errors, queued }, setState] = useState({ collapsed: { queued: false, errored: true }, expanded: {}, - errored: [], errors: {}, - queued: [] + queued: {} }); const toggleItem = item => () => setState(prev => ( { ...prev, expanded: { ...prev.expanded, [item]: !prev.expanded[item] } } @@ -35,9 +34,9 @@ export default function VersionUpdates({ onLoad }) {

    Version Updates {" "} - {queued.length} + {Object.keys(queued).length} {" "} - {errored.length} + {Object.keys(errors).length}

    @@ -47,19 +46,19 @@ export default function VersionUpdates({ onLoad }) { (collapsed.queued ? styles.collapsed : styles.expanded) }> Queued Version Updates{" "} - {queued.length} + {Object.keys(queued).length}
    - {queued.map((item, index) => ( + {Object.entries(queued).map(([name, version], index) => (
    - ", item)}> - {item} + ", name)}> + {`${name} ${version}`}
    ))} @@ -70,29 +69,29 @@ export default function VersionUpdates({ onLoad }) { (collapsed.errored ? styles.collapsed : styles.expanded) }> Errored Version Updates{" "} - {errored.length} + {Object.keys(errors).length}
    - {errored.map((item, index) => ( + {Object.entries(errors).map(([name, message], index) => (
    + (expanded[name] ? styles.expanded : styles.collapsed)} + onClick={toggleItem(name)}>
    {/* Prevent link clicks from expanding/collapsing. */} event.stopPropagation()} - href={urls.versions.pr.replace("", item)}>{item} + href={urls.versions.pr.replace("", name)}>{name}
    -
    +                style={{ display: !expanded[name] && "none" }}>
    +                
                   
    ))} diff --git a/src/constants.js b/src/constants.js index cc44f7d6a3..5947f8e173 100644 --- a/src/constants.js +++ b/src/constants.js @@ -138,8 +138,8 @@ export const urls = { usage: "https://conda-forge.herokuapp.com/status-monitor/report/travis-ci", }, versions: { - api: "https://raw.githubusercontent.com/regro/cf-graph-countyfair/master/status/version_status.json", - pr: "https://github.com/conda-forge/-feedstock/blob/main/recipe/meta.yaml", + api: "https://raw.githubusercontent.com/regro/cf-graph-countyfair/master/status/version_status.v2.json", + pr: "https://github.com/conda-forge/-feedstock/tree/main/recipe", }, schemas: { "conda-forge.yml":