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

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

Closed
cpsievert opened this issue Nov 18, 2019 · 12 comments · May be fixed by #2054
Closed

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

cpsievert opened this issue Nov 18, 2019 · 12 comments · May be fixed by #2054
Labels
feature a feature request or enhancement theme: tabsets related to tabsets feature in rmarkdown

Comments

@cpsievert
Copy link
Contributor

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

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

@yihui
Copy link
Member

yihui commented Nov 19, 2019

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.

@cpsievert
Copy link
Contributor Author

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 cpsievert changed the title .tabset-dropdown's menu right icon doesn't render properly using render_site() .tabset-dropdown's menu right icon doesn't render properly with self_contained: false Nov 19, 2019
@jangorecki
Copy link

any idea if it was a problem from the very beginning when #1405 got implemented or it appears later on, for example when migrating to bs4?

@cpsievert
Copy link
Contributor Author

It has always been an issue

@cderv cderv added feature a feature request or enhancement theme: tabsets related to tabsets feature in rmarkdown labels Jan 11, 2022
@alenastern
Copy link

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

@michaelofrancis
Copy link

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

@cderv cderv closed this as completed in 86c364c Oct 3, 2022
@cderv
Copy link
Collaborator

cderv commented Oct 3, 2022

Thanks for pinging again @michaelofrancis

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

It should work as expected

@michaelofrancis
Copy link

It works! Thank you.

@alenastern
Copy link

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     

@cderv
Copy link
Collaborator

cderv commented Jan 13, 2023

[36] rmarkdown_2.10

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

You need to update.

@alenastern
Copy link

@cderv thanks so much!

@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement theme: tabsets related to tabsets feature in rmarkdown
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants