rmarkdown icon indicating copy to clipboard operation
rmarkdown copied to clipboard

.tabset-dropdown's menu right icon doesn't render properly with self_contained: false

Open cpsievert opened this issue 5 years ago • 5 comments

Screen Shot 2019-11-18 at 10 46 48 AM

For a minimal example, put this minimal example in a rmarkdown website

cpsievert avatar Nov 18 '19 16:11 cpsievert

I also noticed this problem two weeks ago, but didn't look into it. This is another reason why I wanted to drop this feature.

yihui avatar Nov 19 '19 03:11 yihui

This looks to be related to self_contained. Here's a minimal example:

---
title: "tabset dropdown"
output:
  html_document:
    self_contained: false
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# R Markdown {.tabset .tabset-dropdown}

## Tab A

This is an R Markdown document. 

## Tab B

When you click the **Knit** button a document will be generated.

## Tab C

Here is a summary table.

```{r cars}
summary(cars)
```

## Tab D

Here is a plot:

```{r pressure, echo=FALSE}
plot(pressure)
```

# Here is another section {.tabset}

## Tab A

This is content in a standard tabset.

## Tab B

This is more content in a standard tabset.

cpsievert avatar Nov 19 '19 20:11 cpsievert

any idea if it was a problem from the very beginning when https://github.com/rstudio/rmarkdown/pull/1405 got implemented or it appears later on, for example when migrating to bs4?

jangorecki avatar Feb 28 '20 03:02 jangorecki

It has always been an issue

cpsievert avatar Feb 28 '20 14:02 cpsievert

hello! I was wondering if this issue has been resolved, I am currently encountering this issue when I add a navbar to my R Markdown file knitted to html (the tabset-dropdown works as expected when knitting without _site.yml)

I've pasted my site.yml file below:

name: Recovery Funds Dashboard
navbar:
  title: Recovery Funds Dashboard
  left:
  - text: Home
    href: index.html
  - text: FAQ
    href: faq.html
  - text: Glossary
    href: glossary.html
output:
  html_document:
    output_dir: '.'
    css: !expr here::here("www", "web_report_trust.css")
    self_contained: TRUE
output_dir: '.'

index.html is the page that has the issue (see screenshot below). All of the component markdown files (including index.Rmd) set self_contained: TRUE

Thanks so much for your help!

image

alenastern avatar Jun 30 '22 21:06 alenastern

Similar to @alenastern I am also still having this issue...does a solution exist?

michaelofrancis avatar Oct 01 '22 15:10 michaelofrancis

Thanks for pinging again @michaelofrancis

I have pushed a fix that it simpler than unmerged #2054

It should work as expected

cderv avatar Oct 03 '22 14:10 cderv

It works! Thank you.

michaelofrancis avatar Oct 03 '22 14:10 michaelofrancis

I revisited this thread in the hopes of incorporating the fix but I'm still having the same issue posted in my original comment above. @michaelofrancis @cderv - are there any package/software updates I need to make in order to implement the fix? My session info is below and I'm using RStudio 2022.12.0. Thank you!!

R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] zip_2.2.0         Rcpp_1.0.9        pillar_1.7.0      compiler_4.1.1    tools_4.1.1      
 [6] digest_0.6.28     gtable_0.3.0      lubridate_1.7.10  evaluate_0.19     lifecycle_1.0.3  
[11] tibble_3.1.5      pkgconfig_2.0.3   rlang_1.0.6       cli_3.4.1         DBI_1.1.3        
[16] rstudioapi_0.13   yaml_2.2.1        xfun_0.36         fastmap_1.1.0     dplyr_1.0.7      
[21] stringr_1.4.0     janitor_2.1.0     knitr_1.41        generics_0.1.0    vctrs_0.5.1      
[26] htmlwidgets_1.5.4 grid_4.1.1        rprojroot_2.0.2   DT_0.20           tidyselect_1.1.1 
[31] glue_1.4.2        snakecase_0.11.0  here_1.0.1        R6_2.5.1          fansi_0.5.0      
[36] rmarkdown_2.10    ggplot2_3.4.0     purrr_0.3.4       magrittr_2.0.3    scales_1.2.1     
[41] ellipsis_0.3.2    htmltools_0.5.2   rsconnect_0.8.28  assertthat_0.2.1  colorspace_2.0-2 
[46] utf8_1.2.2        stringi_1.7.5     munsell_0.5.0     crayon_1.5.0     

alenastern avatar Jan 13 '23 17:01 alenastern

[36] rmarkdown_2.10

@alenastern you are using an old R Markdown version - The fix is in rmarkdown 2.17

You need to update.

cderv avatar Jan 13 '23 19:01 cderv

@cderv thanks so much!

alenastern avatar Jan 13 '23 22:01 alenastern

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

github-actions[bot] avatar Jul 19 '23 05:07 github-actions[bot]