Skip to content

Commit

Permalink
linewrap titles in reviews table for #12
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Apr 22, 2024
1 parent ce6d942 commit ac40f6a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 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.1.8.028
Version: 0.1.8.029
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.1.8.028",
"version": "0.1.8.029",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
2 changes: 1 addition & 1 deletion quarto/_colorTable_fn.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function reviewTable(data, {
...format,
[colorColumn]: d => htl.html`<div style="--row-color:${d}">`,
[issueNumColumn]: d => htl.html`<a href="https://github.com/ropensci/software-review/issues/${d}">${d}</a>`,
[titleColumn]: d => htl.html`<a href="https://github.com/ropensci/software-review/issues/${d[1]}">${d[0]}</a>`,
[titleColumn]: d => htl.html`<span style="white-space:break-spaces;"><a href="https://github.com/ropensci/software-review/issues/${d[1]}">${d[0]}</a></span>`,
},
columns,
...options
Expand Down
15 changes: 12 additions & 3 deletions quarto/reviews.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ cat (paste0 (

```{r add-html-to-table, echo = FALSE}
u <- "https://github.com/ropensci/software-review/issues/"
rev_dat$stage_num <- as.integer (substr (rev_dat$stage, 1, 1))
dat <- rev_dat
# Number has to come last here!!
dat <- dashboard:::add_gt_html (dat, u, "title")
Expand Down Expand Up @@ -128,6 +129,7 @@ gt::gt (udat) |>
dashboard:::add_urgency_cols (c ("urgency", "importance"))
```


```{r}
ojs_define (submissions = rev_dat)
```
Expand Down Expand Up @@ -186,25 +188,32 @@ filteredSorted = filtered.sort((a, b) => {

{{< include _colorTable_fn.qmd >}}

nope

```{ojs}
// And this uses the 'reviewTable' function defined in the above file to
// generate an Observable Inputs.table with coloured rows.
columns = ["stage", "number", "title", "stats", "stage_date", "editor", "inactive_for"]
columns = ["stage_num", "number", "title", "stats", "stage_date", "editor", "inactive_for"]
reviewTable(filteredSorted,
{
colorColumn: "rowColor",
issueNumColumn: "number",
titleColumn: "title",
columns: columns,
height: 'auto',
layout: 'auto',
header: {
stage_num: "Stage",
number: "Number",
title: "Title",
stats: "Stats?",
stage_date: "Stage date",
inactive_for: "Inactive for",
}
}
)
```



## 0\/Pre-submission

```{r dat0, echo = FALSE}
Expand Down

0 comments on commit ac40f6a

Please sign in to comment.