Skip to content

Commit

Permalink
fix all calls to pkg internal fn 'add_gt_html'
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Mar 18, 2024
1 parent 046fb95 commit 227cdea
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 32 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.4.006
Version: 0.0.4.007
Authors@R:
person(given = "First",
family = "Last",
Expand Down
16 changes: 2 additions & 14 deletions R/gt-table.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,9 @@ open_gt_table <- function (dat) {
requireNamespace ("gt")
u <- "https://github.com/ropensci/software-review/issues/"
dat_url <- dat
add_html <- function (dat_url, what = "number") {
dat_url [[what]] <- paste0 (
"<p><a href=",
u,
dat_url$number,
">",
dat_url [[what]],
"</a>"
)
dat_url [[what]] <- lapply (dat_url [[what]], gt::html)
return (dat_url)
}
# Number has to come last here!!
dat_url <- add_html (dat_url, "title")
dat_url <- add_html (dat_url, "number")
dat_url <- add_gt_html (dat_url, "title")
dat_url <- add_gt_html (dat_url, "number")
dat_url$stage_elapsed <- Sys.Date () - dat_url$stage_date

# Then create an "urgency" column used to highlight rows needing urgent
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.4.006",
"version": "0.0.4.007",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
16 changes: 2 additions & 14 deletions quarto/editors.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,8 @@ ed_dat_gen <- dplyr::group_by (ed_dat_gen, status) |>
dplyr::arrange (dplyr::desc (inactive_days), .by_group = TRUE) |>
dplyr::ungroup ()
add_html <- function (dat, what = "inactive_for") {
u <- "https://github.com/ropensci/software-review/issues/"
dat [[what]] <- paste0 (
"<p><a href=",
u,
dat$number,
">",
dat [[what]],
"</a>"
)
dat [[what]] <- lapply (dat [[what]], gt::html)
return (dat)
}
ed_dat_gen <- add_html (ed_dat_gen, what = "inactive_for")
u <- "https://github.com/ropensci/software-review/issues/"
ed_dat_gen <- dashboard::add_gt_html (ed_dat_gen, u, what = "inactive_for")
gt::gt (
ed_dat_gen,
Expand Down
4 changes: 2 additions & 2 deletions quarto/reviews.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ rev_dat <- review_status (open_only = TRUE, browse = FALSE, quiet = TRUE)
u <- "https://github.com/ropensci/software-review/issues/"
dat <- rev_dat
# Number has to come last here!!
dat <- dashboard:::add_html (dat, "titles")
dat <- dashboard:::add_html (dat, "number")
dat <- dashboard:::add_gt_html (dat, "titles")
dat <- dashboard:::add_gt_html (dat, "number")
```

```{r add-urgency-column, echo = FALSE}
Expand Down

0 comments on commit 227cdea

Please sign in to comment.