Fix dependency problems when using attach_dependencies(standalone = TRUE)
:
bootstrap
- Fully embed entire bootstrap package, including all assets, not just css
- Attach
src
from top level of bootstrap, so all assets are bundled.
jquery
:- Fix missing
package
argument injquery
'shtmlDependency()
definition
- Fix missing
- attach
jquery
&bootstrap
dependencies before other frontend dependencies, as other dependencies requirejquery
(especially) to be loaded already.- I named a fixup commit
"idk"
, sorry @me [aebf9372] [a2eb660]
- I named a fixup commit
mustache
templates:- Fix outdated refEREnce to template file
test.html.mustache
, which was deleted. - Now include
display.html.mustache
- Fix outdated refEREnce to template file
- make
embedHandler()
backwards compatible with graphs generated bymandrake<1.1.0
- In
mandrake<1.1.0
,R
generatedhtml
directly and this was passed tovisNetwork
to be rendered directly - In
mandrake>=1.1.0
,R
encodes the data intojson
& passes this object tovisNetwork
, which can be decoded & flexibly rendered by the frontend. - Now,
embedHandler()
tries to parse the input asjson
, then rendering it into a template, but ifJSON.parse
raises a syntax error, the input will be given directly to theDOM
- In
- (Everything to be given to the DOM is still cleaned by
DOMPurify
)
- When styling code from plan commands, now wrap
styler::style_text()
intry
block - That way, if code that can't be parsed by styler (eg, contains a pretty printed quosure), it won't crash the workflow
- Remove "Remotes" section from DESCRIPTION, change a few dependency packages from github/development head to CRAN
- Implement front-end rendering of metadata in network.
- This allows for more flexible rendering of data in general.
- Exceptions include highlighted code -
R
does a better job of linking documentation
- Improve responsiveness of column documentation.
- Fix rmarkdown docomuments failing to render due to
rstudio/rmarkdown#1948 not yet being merged.
DOMPurify
js dependency (XSS Sanitization js lib) was previously included ashref
dependencyhref
dependencies are supported byhtmltools
, but not yet byrmarkdown
.
- Now
DOMPurify
is embedded directly (for now)
- Add a
warn_deprecated
option to old js handlers so that they can be evaluated in generating docs without triggering a warning
- Deprecate backend rendering of
html
-R
does not have great tools for this.- Now pass
json
to the frontend handler, which renders it usingmustache.js
.
- Now pass
- Deprecate
mandrake::embed_event_handler()
due to XSS vector, and its annoying to maintain JS stored in R code.- Users now have to call:
mandrake::attach_dependencies()
&drake::render_graph(on_select = "embed_event_handler")
- Users now have to call:
- Fix bug related to
htmlwidgets::saveWidget
whenselfcontained = TRUE
breaking embedded stylesheets.
- Now gracefully handle when targets are not cached, or missing from cache
- Now gracefully handle duplication of column definitions across package
- drops duplicate definitions, warns about dropping.
- Implement
attach_dependencies()
, which attaches bootstrap and jquery deps to graphs
Version Skipped
- Qualified a call to
rlang::\
%||%``
- Implement new tag,
inheritCol
. that allows columns to be inherited from other packages. Give a package name, and a list of columns.
- When fetching package name in
roclet_process.roclet_col()
,- if not found from
roxygen2::roxy_meta_get("current_package")
, will attempt to useenv$.packageName
.
- if not found from
- When processing output for
roclet_col()
,- Writes columns from separate packages to separate files.
- When adding columns to lookup cache, caches columns to three namespaces:
- All columns are added to
"objects"
(or the defaultstorr
namespace), where column is referenced by- Its name
- Or any of its aliases
"unique"
, where they are referenced by name only
- Each column, whose definition is provided by package
srcpkg
is added to"package:{srcpkg}"
, which contains only columns defined bysrcpkg
.
- All columns are added to
- Now use
@importFrom roxygen2 roclet_process
, etc to import roxygen2 generics - Now export roxygen2 S3 methods as S3Methods.
- Fixed bug where if no column definitions were given to output, roclet would crash
- Fixed (?) bug where if trying to self-inherit, would fail if docs for a col hadn't already been
generated.
- Because inheritance and column documentation were processed one-by-one (for each block, process col, then
inheritCol), this failure would cause things to consistently fail, as
@col
outputs never got written to file, to be found by@inheritCol
.- Now, all
@col
are processed, and results cached, then all@inheritCol
outputs are processed.
- Now, all
- Because inheritance and column documentation were processed one-by-one (for each block, process col, then
inheritCol), this failure would cause things to consistently fail, as
- Implement a top level
decorate_plan()
function. This function wraps the column extraction and linking process, and allows:- The user to specify a column containing markdown description, that will be rendered in the sidebar
- The
command
column of the plan is parsed, highlighted, and code referenced are automagically linked to their docs (thanks to downlit).- This is also rendered in a collapsible segment in the sidebar.
- The table of columns -> docs is still rendered in the sidebar, under the header "columns".
Tentative First-Pass
- Implement roxygen-based
@col
tag + column doc workflow #8.- Implement serialization of column docs from docstrings to
yaml
. - Implement deserialization of column docs, by specifying package owning the column specs.
- Implement serialization of column docs from docstrings to
- Implement Column spec lookup, extraction and formatting / integration with workflow
graphs #6.
- Incl. Extraction of metadata from plan.
Initial Dev Version
- Implement target-doc extraction function
extract_column_names()
- This uses the plan and the cache to extract column names from each target,
- and returns the plan with a new list-col containing that target's variable names.
- Add demo article "Test Usecase", showing the ability to embed metadata about a specific target directly into the network graph