print-time html dependencies should use relative instead of absolute paths #1384
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partially fixes #1376, but
crosstalk::crosstalkLibs()
needs to adopt these same changes for those dependencies to be portable as well (see rstudio/crosstalk#63). Note that, unfortunately, sincepartial_bundle()
downloads the relevant plotly.js bundle at print-time, I don't think there is a fool-proof way to make that portable, but one could dopartial_bundle(p, local = FALSE)
in that case if they really need the R object to be portable.DEVELOPMENT NOTES
With these changes, file paths are now resolved in the htmltools namespace, rather than htmlwidgets, so the usual hack to get
pkgload::load_all()
to work will have to be extended/revised to shim in the appropriate namespace -- r-lib/pkgload#69TESTING NOTES
After installing plotly and crosstalk, make sure the following code will produce the image below