Quarto Webr Versions Save

Quarto Extension to Embed webR for HTML Documents, RevealJS, Websites, Blogs, and Books.

0.4.1

1 month ago

Features

  • Upgraded the embedded version of webR to v0.3.1. (#165)
  • read-only is a new code cell option that prevents changes to code inside of an interactive context.

Bug fixes

  • Fixed FontAwesome icons not appearing if embed-resources: true was set. (#95)

[!NOTE]

The embed-resources option only works if the communication channel is either "automatic" (default), "post-message", or "shared-array-buffer". Do not attempt to use it with "service-workers".

Changes

  • Upgrade monaco-editor from 0.45.0 to 0.47.0 (#170)

Documentation

  • Updated documentation using plot2 to tinyplot due to a name change upstream.
  • Added a new section on using data within {webr-r} code blocks.

0.4.0

3 months ago

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 and autorun.
    • Attributes: label and classes.
    • Figures: fig-cap, dpi, fig-width, fig-height, out-width, & out-height.
    • Cell output: warning/message, results, and output
  • 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).

quarto-webr-autorun-interactive-areas

Changes

  • Added new CSS IDs governing the webR initialization state. (#110)
  • Added shim that overrides install.packages() with webr::install() through webr::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 Quarto markdown formats for hugo-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 and output contexts not syncing with values found in packages. (#114, #105, #88)
  • Fixed unexpected input error appearing spuriously on Windows machines by enforcing the end-of-line (EOL) character to be LF (\n) and, thus preventing CRLF (\r\n) from entering the picture. (#94 huge thank you and h/t to @ute. Thanks also to @alexCardazzi for initial reporting).

Documentation

Deployment

  • Added an instructive error message regarding whether template files are missing. (#107)

0.3.9

5 months ago

Breaking changes

  • With the update to webR v0.2.2, the webr-worker.js and webr-serviceworker.js files are no longer required to be present with the document under default options.

Features

quarto-webr-in-revealjs-larger

Bugfixes

  • Fix line breaks inside of code output area inside of RevealJS.
  • Fix height and presentation of the webR cell within RevealJS. (#98)
  • Fix code output class styling in RevealJS. (#100)

Documentation

  • Updated documentation to reflect the removal of webr-worker.js and webr-serviceworker.js scripts. (#59)
  • Added a section on setting global extension settings using _quarto.yml to the meta options (#46)
  • Added slide embedding CSS class alongside examples.
  • Updated GIF on the README to show the UI improvements.
  • Minor documentation tweaks.

0.3.8

6 months ago

Features

  • Added autoload-packages document meta option key that will automatically load packages specified in the packages key. The default value is true. (#75)
    • This feature simplifies the use of packages, eliminating the need to call library() in interactive code cells or setup code cells, as the specified packages will be loaded automatically.
  • Added new output classes to differentiate between STDOUT and STDERR text. (#60, #89)
    • Error and warning messages will now appear red and regular output will appear black.

Screenshot showing the new quarto-webr CSS classes and the color coded STDOUT/STDERR

Bugfixes

  • Fix placement of the "WebR Status" indicator when in the revealjs presentation format. (#84)

Documentation

  • Added a subsection to using two keyboard shortcuts into the interactive code cell demo.
  • Emphasized the extension must be in the same directory or contained within a Quarto project as the Quarto document being used. (#79, #26)
  • Added an RevealJS presentation example. (#83)
  • Added examples of embedding a RevealJS presentation inside of a website and book project. (#83)
  • Added an example of using the extension with a Blog website. (#81)
  • Added documentation on theming quarto elements. (#89)
  • Miscellaneous documentation typo fixes.

Deployment

  • Added a tests/ directory that contains Quarto documents used across multiple browsers before triggering a point release. (#76)
  • Added the open-in-html-browser extension to devcontainer for better previewing options of HTML results.
  • GitHub codespaces now automatically open the README example when the devcontainer is launched.

0.3.7

6 months ago

Features

  • Added a Global Interpreter Lock (GIL) to ensure that only one code cell runs at a time, preventing simultaneous execution conflicts.
    • With this enhancement, you can now enjoy smoother and more predictable execution of your code, without interference from concurrently running code cells.
  • Added a visual spinning indicator to emphasize what code cell is currently running. (#64, #17)
  • Improved status updates about installing R packages specified in the document's package key. (#68)
  • Fully supported pager event types. (#58)
    • With this update, looking at R help documentation for a function is now possible.

Demonstration of the new locking mechanism and package status indicator

Bugfixes

  • Fixed base-url to allow for a localized version of webR away. (#54)
  • Fixed document-level packages meta option not installing packages if the status bar was not present (#69)
  • Fixed service workers not being placed if user explicitly set channel-type: 'automatic' (#74)

Documentation

Deployment

  • Switched from Quarto's publishing action to individually rendering projects, merging output, and, then, publishing. (#73)
    • By using a custom publish action, we can retain a single repository with nested quarto projects (e.g. A website project that also contains a book.)

0.3.6

7 months ago

Feature

  • Improved the run selected code shortcut to now also run the current line if no selection is present and advance to the next. (#43)
    • Use: Cmd + Enter on macOS or Ctrl + Enter on Windows

Bugfixes

  • Fixed space not being preserved (h/t @nguyenllpsych, #39)
  • Fixed webR not initializing if a document lacked a title (h/t @jimhester, #40)

Documentation

  • Added a walkthrough video to the getting started page.
  • Added a new page containing community examples of the quarto-webr extension in the wild.
  • Added an example on fill-in-the-blank usage.
  • Clarified how interactive code cells could be used to explore what-if scenarios.
  • Minor documentation fixes.

Deployment

  • Add new issue templates for questions and examples.
  • Improved GitHub repo issue template formatting.

0.3.5

7 months ago

Features

  • New documentation website is available at: https://quarto-webr.thecoatlessprofessor.com
  • Document option channel-type sets the communication channel webR uses.
    • channel-type: automatic (default): Communicates using either shared-array-buffer or service-worker.
    • channel-type: shared-buffer-array: Fastest communication option, but requires setting up HTTP headers.
    • channel-type: service-worker: Slower communication option and requires worker scripts to be next to the rendered document.
    • channel-type: post-message: Easiest setup option at the expense of being unable to interrupt the R process or accept user-input.
  • Code cell option context controls whether the code and output are shown or suppressed.
    • context: interactive(default) shows both code and output.
    • context: setup suppresses both code and output.
    • context: output suppresses code but shows its output.
    • To use the new hidden code cell feature, the code cell needs #| context: <value> like so:
```{webr-r}
#| context: setup

my_hidden_variable = 11
```

Bugfixes

  • Fixed webR status indicator appearing outside of the header. (#33)
  • Fixed button styling difference between standalone documents and website-based documents.

Documentation

  • Created the docs folder inside the repository to host the documentation website.
  • Moved documentation from the README.md file onto separate web pages.
    • Acknowledgements now has a dedicated page thanking contributors and collaborators.
    • Developer resources expands on the reference resources.
    • Using R packages describes the best practices for using R's ecosystem of extensions
    • Customization Options describes the document level options available to be set in document's YAML field.
  • Added new documentation entries for hidden code cell evaluation and communication channels.
  • Added a rendered version of the README example to the website.
  • Incorporated additional examples into the "Exploring Interactive Code Cells" demo document.

Deployment

  • Added a Quarto action to render and publish the documentation website.
  • Added issue templates for feature requests and bug fixes.
  • Symlink the _extension directory into docs to avoid needing to add the extension on each render.

0.3.2

8 months ago

Feature

  • Upgraded the MonacoEditor version to v0.43.0 from v0.31.0

Bugfixes

  • Fixed quarto-webr documents requiring a reload in Safari to see/interact with code cells (#21)
  • Fixed keyboard shortcuts not re-initializing correctly on multiple Monaco Editors by re-registering shortcuts on code cell focus (#28)

0.3.1

8 months ago

Feature

  • Upgrade extension to use webR v0.2.1

0.3.0

8 months ago

Feature

  • Implements changes required to run webR v0.2.0