flexdashboard icon indicating copy to clipboard operation
flexdashboard copied to clipboard

{.mobile} not working well with storyboard

Open ghost opened this issue 6 years ago • 1 comments

I'm trying to build a Storyboard that shows different plots inside the same section when device is mobile or not mobile.

When using {.mobile} to build a simple flexdashboard, everything went right. But, when I tried to do this with storyboard, the output is a file that shows duplicated section with blank plot on the one that I used the {.mobile} parameter.

Can anyone help me with this?

Here is my simple code:

---
title: "Mobile Specific Component"
output: 
  flexdashboard::flex_dashboard:
    storyboard: true
---

### Chart 1 {.no-mobile}
    
```{r}
plot(cars)
### Chart 1 {.mobile}

```{r}
plot(cars)

ghost avatar Jul 05 '19 16:07 ghost

Thanks for the report! I can confirm that I see the same problem, specifically when using the .mobile and .no-mobile class with storyboards.

image

Here's a modified version of your reprex that makes the issue clear:

---
title: "Mobile Specific Component"
output:
  flexdashboard::flex_dashboard:
    storyboard: true
---

### Chart 1 {.no-mobile}

```{r}
plot(cars, main = "Not Mobile")
```

### Chart 1

```{r}
plot(cars, main = "Mobile")
```

gadenbuie avatar Feb 27 '23 21:02 gadenbuie