Skip to content

Commit

Permalink
Fix toolbar display RevealJS & switch to require() (#149)
Browse files Browse the repository at this point in the history
* Ensure toolbar doesn't exist the limits by switching to the border-box model instead of content-box

* Simplify statement to `require()`
  • Loading branch information
coatless authored Feb 2, 2024
1 parent 0d4651c commit 5ed0802
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _extensions/webr/qwebr-document-engine-initialization.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ async function qwebrInstallRPackage(packageName) {

// Function to load a single package
async function qwebrLoadRPackage(packageName) {
await mainWebR.evalRVoid(`if(requireNamespace('${packageName}', quietly = TRUE)) { library(${packageName}); }`);
await mainWebR.evalRVoid(`require('${packageName}', quietly = TRUE)`);
}

// Generic function to process R packages
Expand Down
5 changes: 5 additions & 0 deletions _extensions/webr/qwebr-styling.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
width: 100%;
display: flex;
justify-content: space-between;
box-sizing: border-box;
}

.qwebr-editor-toolbar-left-buttons, .qwebr-editor-toolbar-right-buttons {
display: flex;
}

.qwebr-non-interactive-loading-container.qwebr-cell-needs-evaluation, .qwebr-non-interactive-loading-container.qwebr-cell-evaluated {
Expand Down
2 changes: 1 addition & 1 deletion tests/qwebr-test-repo-key.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Test: Repos package key"
format: html
engine: knitr
webr:
packages: ['demorwasmbinary', 'visualize']
packages: ['demorwasmbinary', 'visualize', 'fakepkg']
repos:
- 'https://tutorials.thecoatlessprofessor.com/webr-unified-gh-workflow/'
filters:
Expand Down

0 comments on commit 5ed0802

Please sign in to comment.