Skip to content

Commit

Permalink
improve ed-rev table for #7
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Mar 19, 2024
1 parent d7b2425 commit 944d717
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dashboard
Title: What the Package Does (One Line, Title Case)
Version: 0.0.6.001
Version: 0.0.6.002
Authors@R:
person(given = "First",
family = "Last",
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.6.001",
"version": "0.0.6.002",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
17 changes: 12 additions & 5 deletions quarto/ed-reviews.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,23 @@ ed_reviews <- ed_dat$reviews
## Editor Reviews

This panel provides data on reviews handled by each editor. Data are shown for
current editors only.
current editors only, with reviews listed from most to least recent.

```{r ed-rev, echo = FALSE, message = FALSE, results = 'asis'}
u <- "https://github.com/ropensci/software-review/issues/"
for (i in seq_along (ed_reviews)) {
this_ed <- names (ed_reviews) [i]
this_tab <- ed_reviews [[i]]
this_tab <- this_tab [order (this_tab$number, decreasing = TRUE), ]
num_rev <- nrow (this_tab)
rev_noun <- ifelse (num_rev == 1, "Review", "Reviews")
cat (paste0 (
"## [",
this_ed,
"](https://github.com/",
this_ed,
")\n\n"
))
cat (paste0 ("Total Reviews: ", nrow (ed_reviews [[i]]), "\n\n"))
this_tab <- ed_reviews [[i]]
this_tab$number <- paste0 (
"<a href=",
u,
Expand All @@ -48,12 +50,17 @@ for (i in seq_along (ed_reviews)) {
this_tab$number <- lapply (this_tab$number, gt::html)
tab <- gt::gt (this_tab) |>
gt::tab_header (paste0 (
"Reviews for [@",
num_rev,
" ",
rev_noun,
" for [@",
this_ed,
"](https://github.com/",
this_ed,
")"
))
)) |>
dashboard:::add_bg_colours ()
print (tab)
}
```

0 comments on commit 944d717

Please sign in to comment.