From 9224eca00bcc5bfe8a7260c3fd0d7a5f671e9a83 Mon Sep 17 00:00:00 2001 From: mpadge Date: Thu, 25 Apr 2024 17:16:57 +0200 Subject: [PATCH] restructure dashboard pages for #12 --- DESCRIPTION | 2 +- codemeta.json | 2 +- quarto/_quarto.yml | 1 - quarto/ed-reviews.qmd | 96 ------------------------------------------- quarto/editors.qmd | 6 +-- quarto/history.qmd | 2 +- quarto/index.qmd | 23 ++++++----- quarto/reviews.qmd | 2 +- 8 files changed, 17 insertions(+), 117 deletions(-) delete mode 100644 quarto/ed-reviews.qmd diff --git a/DESCRIPTION b/DESCRIPTION index 04217f9..9f093c6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: dashboard Title: What the Package Does (One Line, Title Case) -Version: 0.1.10 +Version: 0.2.0 Authors@R: person(given = "First", family = "Last", diff --git a/codemeta.json b/codemeta.json index 01501fc..93f53b0 100644 --- a/codemeta.json +++ b/codemeta.json @@ -6,7 +6,7 @@ "name": "dashboard: What the Package Does (One Line, Title Case)", "codeRepository": "https://github.com/ropensci-review-tools/dashboard", "license": "https://spdx.org/licenses/MIT", - "version": "0.1.10", + "version": "0.2.0", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", diff --git a/quarto/_quarto.yml b/quarto/_quarto.yml index 2ef95ab..0667501 100644 --- a/quarto/_quarto.yml +++ b/quarto/_quarto.yml @@ -8,7 +8,6 @@ website: pinned: true left: - editors.qmd - - ed-reviews.qmd - reviews.qmd - history.qmd right: diff --git a/quarto/ed-reviews.qmd b/quarto/ed-reviews.qmd deleted file mode 100644 index 52d894a..0000000 --- a/quarto/ed-reviews.qmd +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: "Editor Reviews" -execute: - echo: false -format: - html: - fig-width: 8 - fig-height: 4 - code-fold: false ---- - -```{r load-pkg-ed-rev, echo = FALSE, message = FALSE} -library (dashboard) -``` - -```{r get-ed-dat, echo = FALSE, message = FALSE} -#| cache: true -ed_dat <- editor_status (quiet = TRUE) -``` -```{r prepro-ed-dat} -#| cache: false -ed_reviews <- ed_dat$reviews -ojs_define (ed_reviews_in = ed_reviews) -``` - -This panel provides data on reviews handled by each editor. Data are shown for -current editors only, with reviews listed from most to least recent. Open -reviews are highlighted in yellow. - -```{ojs} -edReviewsIn = transpose(ed_reviews_in) -// And get array of unique eds for input selector: -editorsAll = edReviewsIn.map(function(item) { - return item.editor; -}); -editors = Array.from(new Set(editorsAll)); - -// Add 'rowColor' variable: -edReviews = { - return edReviewsIn.map(row => ({ - ...row, - rowColor: row.state === "OPEN" ? "yellow" : "transparent", - })); -} -``` - -```{ojs} -viewof editor = Inputs.select(editors, {multiple: false, label: "Editor:"}) -viewof state = Inputs.checkbox( - ["OPEN", "CLOSED"], - { value: ["OPEN"], label: "Issue State:" } -) -``` - -```{ojs} -filtered = edReviews.filter(function(ed) { - return editor.includes(ed.editor) && state.includes(ed.state) -}) -n_filtered = filtered.length; -``` - -```{ojs} -sortColumn = "number" - -// This sorts in reverse order: -filteredSorted = filtered.sort((a, b) => { - if (a[sortColumn] < b[sortColumn]) { - return 1; - } - if (a[sortColumn] > b[sortColumn]) { - return -1; - } - return 0; -}); - -``` - -{{< include _colorTable_fn.qmd >}} - -```{ojs} -numberColumn = "number" -columns = ["number", "title", "state", "opened_at", "closed_at"] - -colorTable(filteredSorted, - { - colorColumn: "rowColor", - editorColumn: "editor", - issueNumColumn: "number", - columns: columns, - format: { - [numberColumn]: d => htl.html`${d}`, - }, - height: 'auto', - } -) -``` diff --git a/quarto/editors.qmd b/quarto/editors.qmd index edda796..b3f68eb 100644 --- a/quarto/editors.qmd +++ b/quarto/editors.qmd @@ -1,5 +1,5 @@ --- -title: "rOpenSci Editors" +title: "Editors" execute: echo: false format: @@ -24,7 +24,6 @@ chk <- register_gfont ("Open Sans") chk <- addGFontHtmlDependency (family = "Open Sans") ``` - ```{r get-ed-dat, echo = FALSE, message = FALSE} #| cache: true aggregation_period <- "quarter" # default @@ -167,8 +166,6 @@ colorTable(filteredSorted, ``` -

- ## Editor Reviews {#editor-reviews} ```{r ojs-def-ed-rev} @@ -230,7 +227,6 @@ filteredSortedRevs = filteredRevs.sort((a, b) => { ```{ojs} numberColumn = "number" columnsRevs = ["number", "title", "state", "opened_at", "closed_at"] -console.log("-----filteredSortedRevs = ", filteredSortedRevs) colorTable(filteredSortedRevs, { diff --git a/quarto/history.qmd b/quarto/history.qmd index 8b01f5e..87bb6b6 100644 --- a/quarto/history.qmd +++ b/quarto/history.qmd @@ -1,5 +1,5 @@ --- -title: "Software Review History" +title: "Historical Data" format: html: fig-width: 8 diff --git a/quarto/index.qmd b/quarto/index.qmd index 96c291b..1ca4069 100644 --- a/quarto/index.qmd +++ b/quarto/index.qmd @@ -4,18 +4,19 @@ title: "rOpenSci Software Review Dashboard" This dashboard provides an overview of all current [rOpenSci software review issues](https://github.com/ropensci/software-review/issues), and of editor -availability and past editorial workloads. The dashboard includes the following components: +availability and past editorial workloads. The dashboard includes the following +components: -- The [*rOpenSci Editors* page](./editors.qmd) which provides information to - help identify editors who may be free to handle new submissions. -- The [*Editor Reviews* page](./ed-reviews.qmd) which provides an overview of - all current and previous issues handled by each current editor. -- The [*Software Review Overview* page](./reviews.qmd) which provides an - overview of all currently open submissions to the software peer-review - system. This page is primarily intended to provide an overview of the current - state of software peer-review for the Editors-in-Charge, and in particular to - identify reviews in need of attention. -- The [*Software Review History* page](./history.qmd) which gives insights into +- The [*Editors* page](./editors.qmd) which provides information on current + editors and activities. This page helps the Editor-in-Charge identify + editors for new submissions, and gives each editor an overview of their + current and previous editorial portfolios. +- The [*Software Review* page](./reviews.qmd) which provides an overview of all + currently open submissions to the software peer-review system. This page is + primarily intended to provide an overview of the current state of software + peer-review for the Editors-in-Charge, and in particular to identify reviews + in need of attention. +- The [*Historical Data* page](./history.qmd) which gives insights into the historical developments of the software peer-review program. Source code for this dashboard is at diff --git a/quarto/reviews.qmd b/quarto/reviews.qmd index bd099ec..085368a 100644 --- a/quarto/reviews.qmd +++ b/quarto/reviews.qmd @@ -1,5 +1,5 @@ --- -title: "Software Review Overview" +title: "Software Review" execute: echo: false format: