Whole of page tabsets result in unexpected behaviour #12331
-
DescriptionHi all, Quarto version 1.6.40 on Windows 11. Love Quarto and appreciate everyone's work on it. I'm getting some unexpected behaviour with tabsets. I'm trying to create whole-of-page tabsets which split the same content from different categories, in order to cut down on duplicated pages in the navbar. For example, instead of: Page 1 Group A, Page 1 Group B, Page 2 Group A, Page 2 Group B, Page 3 Group A, Page 3 Group B etc I'm trying to achieve: Page 1, Page 2, Page 3 - where each page has 2 tabsets (one for each group) containing multiple plots or other cards. My interpretation of the documentation is that this is possible, specifically:
In the reprex below for a single page, this layout is achieved in tab 2, but I can't figure out why it is not achieved in tab 1 (the row in tab 1 takes on a column layout for some reason). Any help is greatly appreciated. ---
title: "Cars"
format: dashboard
---
## Row {.tabset}
### 1
#### Row {height=20%}
```{r}
print("Row = 20%")
```
#### Row {height=80%}
##### Column {width=50%}
```{r}
plot(mtcars)
```
```{r}
plot(mtcars)
```
##### Column {width=50%}
```{r}
plot(mtcars)
```
### 2
#### Row {height=20%}
```{r}
print("Row = 20%")
```
#### Row {height=80%}
##### Column {width=50%}
```{r}
plot(mtcars)
```
```{r}
plot(mtcars)
```
##### Column {width=50%}
```{r}
plot(mtcars)
```
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
You really should use empty lines around code blocks, code cells, and headings. Is your two tabs supposed to be the same? |
Beta Was this translation helpful? Give feedback.
-
Hi @mcanouil, I've tried to update my reprex to use cards as per the issue you linked but I'm lost. Replacing explicit headers with fenced {.card} tags introduces new layout issues. I'm not sure if it is possible to 'nest' cards within cards like my reprex, as your example in the issue uses a single code cell/card for each tab panel. Are you able to point me in the right direction? I appreciate any help you can provide. ---
title: "Cars"
format: dashboard
---
## Row {.tabset}
::: {.card title="tab 1"}
#### Row {height=20%}
```{r}
print("Row = 20%")
```
#### Row {height=80%}
##### Column {width=50%}
```{r}
plot(mtcars)
```
```{r}
plot(mtcars)
```
##### Column {width=50%}
```{r}
plot(mtcars)
```
:::
::: {.card title="tab 2"}
#### Row {height=20%}
```{r}
print("Row = 20%")
```
#### Row {height=80%}
##### Column {width=50%}
```{r}
plot(mtcars)
```
```{r}
plot(mtcars)
```
##### Column {width=50%}
```{r}
plot(mtcars)
```
::: |
Beta Was this translation helpful? Give feedback.
-
For the benefit of others, there is a solution on Stack Overflow that answers how to achieve what I was aiming for, by using |
Beta Was this translation helpful? Give feedback.
I believe this to be the following issue: