We’re pleased to bring you the latest release of the quarto-webr
extension, v0.4.0. This release brings an entirely new internal backend that improves the reliability and visual cues for non-interactive code cells. Additionally, the extension now supports a custom JSON format for code cell data and options. This has allowed for the introduction of more advanced code cell options, such as autorun
that automatically runs code on document open. These options can be set in the code cell using standard hashpipe Quarto option style.
For more details on the changes, please see the news entry below
quarto-webr
news file entry for version 0.4.0 (2024-02-05)
Breaking changes
- Internal JavaScript functions used by the extension have been significantly changed.
- JavaScript initialization procedure has been further refined.
Features
- Optimized the underlying code handling insertion and execution of R code. (#118)
- Implemented a custom JSON format for code cell data and option sharing between Quarto and webR. (#120)
- Redesigned non-interactive cells to provide improved reliability and visual cues. (#120)
- Interactive cells now have a toolbar above them that provides three actions: Run Code, Start Over, and Copy. (#91)
- Initial code cell option support (#104, #117, #125, #151):
- quarto-webr:
context
andautorun
. - Attributes:
label
andclasses
. - Figures:
fig-cap
,dpi
,fig-width
,fig-height
,out-width
, &out-height
. - Cell output:
warning
/message
,results
, andoutput
- quarto-webr:
- Added
repos
document meta option key to specify custom package repositories containing compiled R WASM Packages not found in the main webR repository (#124, #132).
Changes
- Added new CSS IDs governing the webR initialization state. (#110)
- Added shim that overrides
install.packages()
withwebr::install()
throughwebr::shim_install()
this requires webR v0.2.2 to be in use. (#122) - Added the keyboard shortcut for Run Code –
Shift + Enter
– to mouseover text for the Run Code button. (#91) - Allow
{webr-r}
code cell to propagate into Quartomarkdown
formats forhugo-md
. (#150, h/t @ClaudiuPapasteri) - Updated the version of the MonacoEditor from 0.43.0 to 0.45.0. (#130)
- Updated the version of the FontAwesome from 6.4.2 to 6.5.1. (#131)
Bugfixes
- Prevented HTML output being shown as HTML by replacing HTML characters like
<
,>
,&
, etc., with their corresponding HTML entities. (#115, h/t @gvelasq) - Fixed display of text found after a code cell in RevealJS appearing off the page. (#102, #106)
- Fixed
setup
andoutput
contexts not syncing with values found inpackages
. (#114, #105, #88) - Fixed
unexpected input
error appearing spuriously on Windows machines by enforcing the end-of-line (EOL) character to beLF
(\n
) and, thus preventingCRLF
(\r\n
) from entering the picture. (#94 huge thank you and h/t to @ute. Thanks also to @alexCardazzi for initial reporting).
Documentation
- New section discussing code cell options in
{webr-r}
cells. - New section with demos of the Quarto extension’s features. (#128)
- Added a demo on non-interactive code cells. (#128)
- Added a demo on using custom repositories to install R WASM package binaries. (#128)
- Added a demo for showing initial code cell option support. (#141)
- Added a demo for showing autorunning interactive code cells.
- Modified the RevealJS presentation YAML to include an option to disable the webR status message header (#110)
- Updated blog posts on community examples page (#135)
- Updated Hiding and Executing Code to use panel sets when displaying output from
{quarto-webr}
and showing the underlying code. - Minor documentation tweaks.
Deployment
- Added an instructive error message regarding whether template files are missing. (#107)