Installed vignettes show blank tables/plots: self_contained: no drops lt assets on R CMD build
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- markdown, r
- Domain
- documentation
Research direction
Update the YAML headers in the 10 affected HTML vignettes listed in the issue, changing self_contained: no to yes. Start by checking one listed vignette and confirm all 10 have the same setting; then run R CMD build . and inspect the built inst/doc/*.html. Done means the installed vignette HTML includes its required assets and the tables and figures render.
Written by the indexing model from the issue text.
Description
Problem
After R CMD build + R CMD INSTALL, opening the installed vignette .html files (inst/doc/*.html) in a browser shows no tables or plots — the interactive AE forest tables and the dot-plot/error-bar figures are missing. The prose renders, but the table area is blank.
Root cause
Every HTML vignette sets self_contained: no in its YAML header:
output:
rmarkdown::html_document:
self_contained: no
With self_contained: no, pandoc writes the lt JS/CSS (and other web dependencies) into a <vignette>_files/ sidecar directory and references them with relative <script src="..._files/lt-x.y.z/lt-interactive.js"> tags. R CMD build strips these _files/ sidecar directories from the built package, so the installed .html points at assets that do not exist. No JS loads, and since the lt table is built entirely client-side from an embedded spec, nothing renders.
This is preexisting but only became visible once all table/figure rendering moved to client-side JS (lt); the old static-image paths masked it.
Reproduction
R CMD build .then extract the tarball.inst/doc/customize-color.htmlreferencescustomize-color_files/lt-*/lt-interactive.js.- No
*_files/directory exists anywhere in the build. - Open the installed
.htmlin a browser → blank table.
Verification
- Standalone render opened directly in a browser works (deps resolve from the local
_files/), which is why this is easy to miss duringrmarkdown::render()dev loops. - Headless check of the built-tarball
inst/doc/customize-color.htmlconfirms the table does not mount.
Fix
Set self_contained: yes (the rmarkdown default) in the affected vignettes so pandoc inlines all JS/CSS into a single standalone .html. The lt assets are small (the old reactable+plotly bulk that likely motivated self_contained: no is gone), so inlining is cheap.
Verified: with self_contained: yes, R CMD build produces inst/doc/*.html with zero external _files/lt references and no sidecar directory; a headless browser renders the table (10 rows) and all 42 inline SVG figures with no JS errors.
Affected files (all 10 HTML vignettes carrying self_contained: no):
customize-ae-specific-columns, customize-color, customize-diff-label, customize-digits, customize-display-only-soc, customize-listing-columns, customize-toggle-buttons, customize-width, customize-xlimit, forestly.
(design-pattern.Rmd uses html_vignette and is unaffected; both forestly.Rmd and design-pattern.Rmd are in .Rbuildignore, so they are not shipped as installed vignettes anyway.)
- Dominant language
- R
- Stars
- 23
- Forks
- 6
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 12
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Merck/forestly
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 2 days
-
Allow numerical filtering for percentagesPossibly taken @yihui claimed this 7 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Merck/forestly#166 · 1 assignee ·
Maintainers usually reply within 2 days
-
Add `ae_listing_label = ...` to `prepare_ae_forestly()`Possibly taken @fukuhiro2023 claimed this 19 days ago. Open
Merck/forestly#152 · 1 assignee ·
Maintainers usually reply within 2 days
-
A lot of if-else in `format_ae_listing()`Possibly taken @fukuhiro2023 claimed this 20 days ago. Open
Merck/forestly#148 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
internal-code
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
inbo/erl-butterflies-2025#26 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
NovoNordisk-OpenSource/mighty.component#116 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100