quarto-dev / quarto-dev/quarto-cli

Feature request: programmatic value box styling for OJS dashboards

Open
#14,158 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

dashboards enhancement ojs-engine
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Currently, value boxes in Quarto dashboards can be programmatically customized in R and Python, as in this example from the docs:

```{python}
#| content: valuebox
#| title: "Comments per day"
dict(
  icon = "chat",
  color = "primary",
  value = comments
)
```

```{r}
#| content: valuebox
#| title: "Spam per day"
list(
  icon = "trash",
  color = "danger",
  value = spam
)
```

The OJS engine works really well with Quarto dashboards, as it allows for interactivity without a server and with much better responsiveness than Shiny or Shinylive.

It would be great if we could do something like the following in dashboards and have the same output as above:

```{ojs}
//| content: valuebox
//| title: "Comments per day"
({
  icon: "chat",
  color: "primary",
  value: comments
})
```

The parentheses are needed for OJS. Here, comments would be another variable defined in another OJS cell or from R/Python with ojs_define.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source files or tests. Start by tracing how Quarto dashboard value boxes consume R/Python cell results and how OJS cells expose values via ojs_define; done means an OJS object with icon, color, and value renders the same value box output.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.