Skip to content

Releases: coatless/quarto-webr

A Change Is Gonna Come

24 Jun 19:04
Compare
Choose a tag to compare

Breaking Changes

  • We've update the minimum Quarto requirement to 1.4.554.
    • This version of Quarto is apart of the latest RStudio IDE (Version: 2024.04.0, Date: 2024-04-29).

Features

  • Upgraded to webR v0.3.3 (#196)

  • Added ability to download the R history of commands executed through a new global menu in the right column and underneath Revealjs' "Tools" menu. (#148)

WebsiteRevealjs

qwebr-demo-r-history-html

qwebr-demo-r-history-revealjs

  • Added the ability to have the monaco editor switch between Quarto's light and dark theme modes. (#176)
qwebr-editor-theme-dark-and-light
  • Added two new document-level options:

    • cell-options specifies global defaults for {webr-r} options (#173, thanks ute!)
    • version specifies what version of webR should be used. Default embedded version. (#211)
  • Added the editor-* class of cell-level options to control the interactive code cell editor:

    • editor-code-line-numbers allows highlighting code lines in the editor window. (#204)
    • editor-word-wrap allows long lines to be wrapped inside of the code cell. Default "true". (#38)
    • editor-quick-suggestions enables autocomplete menu suggestions. Default "false".(#182, thanks egenn!)
    • editor-max-height limits growth of the editor window. (#177, thanks ute!)
    • editor-font-scale scales the code cell size relative to the page font size. Default is 1 for HTML Documents, Books, and Websites and 0.5 for Revealjs Slides. (#172 & #209, thanks ute!)
  • Enabled non-graphical computation within a webr-r cell when OffScreenCanvas is not available. (#155, thanks for raising it @mccarthy-m-g)

    • If OffScreenCanvas is not available, we now display a Quarto warning callout at the start of the document that emphasizes only non-graphical computation is available and a gentle nudge to upgrade the web browser being used.
    • The majority of modern browsers now have support for OffScreenCanvas. This previously effected users still on iOS 16 (Safari 16 and earlier).

Changes

  • Added a mouse over button to allow for downloading an image when generated. (#147)
  • Increase the minimum Quarto version requirement to 1.4.554. (#198).
  • Upgraded to webR v0.3.2 (#187)
  • Added Lua type annotations and function documentation into the Quarto extensions' Lua filter. (#190)
  • Avoided distributing webr-serviceworker.js and webr-worker.js when channel-type is not service-worker. (#210)
  • Dynamically write webr-serviceworker.js and webr-worker.js files based on the version chosen (#212)
  • Updated the version of the FontAwesome from 6.5.1 to 6.5.2. (#191)

Bug fixes

  • Newline characters that separate options from code lines are now removed. (#217)
  • Prevented vertical scroll bars from always being present by modifying the adaptive container of the editor to always be at least 2 pixels greater than the editor's content instead of being the exact amount. (#164)

Documentation

  • Added new editor options vignette.
  • Updated community examples covering quarto-webr uses in 2024 Q1 (#193).
  • Improve the data loading documentation page by clarifying the virtual file system usage (#201).

Vivid Montage

25 Mar 16:59
ff55dd4
Compare
Choose a tag to compare

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.

Ball of Yarn

05 Feb 12:56
3bf20b2
Compare
Choose a tag to compare

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)

Zoom-Zoom

17 Nov 02:26
e8a8a5d
Compare
Choose a tag to compare

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.

New Coat of Paint

13 Nov 20:36
Compare
Choose a tag to compare

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.

Mutex On, Mutex Off

16 Oct 20:57
Compare
Choose a tag to compare

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.)

Ready, Set, Run.

25 Sep 01:38
39379f1
Compare
Choose a tag to compare

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

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.

Seance of Communication Channels

17 Sep 10:36
Compare
Choose a tag to compare

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.

Rocking the Monaco

14 Sep 00:53
deb3cf6
Compare
Choose a tag to compare

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)

Maintenance Release: Upgrade to webR v0.2.1

13 Sep 06:41
3ac3256
Compare
Choose a tag to compare

Feature

  • Upgrade extension to use webR v0.2.1