Skip to content

Commit 09d8251

Browse files
committed
Revert "WIP: working static mode in notebook. Cannot get bidirectional comms working. Implemented anywidget JS installation script based on Deno equivalent but cannot get JupyterLab to render the application/widget mimebundle as a widget"
This reverts commit d7bb74a.
1 parent d7bb74a commit 09d8251

File tree

4 files changed

+3
-1243
lines changed

4 files changed

+3
-1243
lines changed

DESCRIPTION

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,4 @@ Suggests:
3232
bslib,
3333
pkgdown,
3434
knitr,
35-
rmarkdown,
36-
IRkernel,
37-
IRdisplay
35+
rmarkdown

R/jupyter_install.R

-153
This file was deleted.

R/widget.R

+2-10
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ AnyHtmlWidget <- R6::R6Class("AnyHtmlWidget",
111111
private$server_host <- "0.0.0.0"
112112
private$server_port <- httpuv::randomPort(min = 8000, max = 9000, n = 1000)
113113

114-
if(!.mode %in% c("static", "gadget", "shiny", "dynamic", "jupyter")) {
114+
if(!.mode %in% c("static", "gadget", "shiny", "dynamic")) {
115115
stop("Invalid widget mode.")
116116
}
117117
private$mode <- .mode
@@ -194,7 +194,7 @@ AnyHtmlWidget <- R6::R6Class("AnyHtmlWidget",
194194
#' Set the widget mode.
195195
#' @param mode The new widget mode.
196196
set_mode = function(mode) {
197-
if(!mode %in% c("static", "gadget", "shiny", "dynamic", "jupyter")) {
197+
if(!mode %in% c("static", "gadget", "shiny", "dynamic")) {
198198
stop("Invalid widget mode.")
199199
}
200200
private$mode <- mode
@@ -244,14 +244,6 @@ AnyHtmlWidget <- R6::R6Class("AnyHtmlWidget",
244244
render = function() {
245245
if(private$mode == "static") {
246246
invoke_static(self)
247-
} else if(private$mode == "jupyter") {
248-
if (!(require("IRkernel", quietly = TRUE) && require("IRdisplay", quietly = TRUE))) {
249-
stop("IRkernel and IRdisplay packages are required to use Jupyter mode.")
250-
}
251-
if(!getOption('jupyter.rich_display')) {
252-
stop("jupyter.rich_display is not TRUE but jupyter mode was specified.")
253-
}
254-
IRdisplay::display(invoke_static(self))
255247
} else if(private$mode == "gadget") {
256248
invoke_gadget(self)
257249
} else if(private$mode == "dynamic") {

0 commit comments

Comments
 (0)