Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard format under knitr incorrectly adds a section for deactivated code cells #52

Open
coatless opened this issue Aug 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@coatless
Copy link
Collaborator

Using echo: false and editable: false to create an output-only cell, we end up with extra whitespace under the live-* format.

For example, if we have:

---
title: empty space dashboard
format: 
  live-dashboard:
    theme: yeti
engine: knitr
---

{{< include ./_extensions/r-wasm/live/_knitr.qmd >}}


```{ojs}
//| echo: false
//| output: false
1 + 1
```

```{webr}
#| echo: false
#| edit: false
#| message: false
#| output: false
library(ggplot2)
```

## Row


```{webr}
#| echo: false
#| edit: false
ggplot()
```

## Row


```{webr}
#| echo: false
#| edit: false
plot(1:5)
```

This gives:

Quarto Live Dashboard created using dynamic WASM and OJS cells

In this case, we have two extra cells, one at the top and one at the bottom. Though, the desired outcome would just be two cells like in the usual static form:

Quarto Dashboard created using static cells
Source code for a static dashboard
---
title: correctly spaced dashboard
format: 
  dashboard:
    theme: yeti
engine: knitr
---

```{ojs}
//| echo: false
//| output: false
1 + 1
```

```{r}
#| echo: false
#| edit: false
#| message: false
#| output: false
library(ggplot2)
```

## Row


```{r}
#| echo: false
#| edit: false
ggplot()
```

## Row


```{r}
#| echo: false
#| edit: false
plot(1:5)
```
@georgestagg georgestagg added the bug Something isn't working label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants