Installed vignettes show blank tables/plots: self_contained: no drops lt assets on R CMD build
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- markdown, r
調査の方向性
issueに記載されている、対象となる10個のHTMLビネットのYAMLヘッダーを更新し、self_contained: noをyesに変更します。まず、記載されているビネットを1つ確認し、10個すべてが同じ設定であることを確認します。次に、R CMD build .を実行し、ビルドされたinst/doc/*.htmlを調べます。インストールされたビネットのHTMLに必要なアセットが含まれ、表と図が表示されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.)
- 主要言語
- R
- スター
- 23
- フォーク
- 6
- 平均マージ
- 2日 9時間
- マージ済み PR(30日)
- 12
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Merck/forestly のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 2 日以内に返信
-
Allow numerical filtering for percentages対応中かも @yihui が 7 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
Merck/forestly#166 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Add `ae_listing_label = ...` to `prepare_ae_forestly()`対応中かも @fukuhiro2023 が 19 日前に担当しました。 オープン
Merck/forestly#152 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
A lot of if-else in `format_ae_listing()`対応中かも @fukuhiro2023 が 20 日前に担当しました。 オープン
Merck/forestly#148 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
hubverse-org/hubUtils#317 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Rapporteket/NORIC#318 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mountainMath/canpumf#31 · コメント 2 件 ·