Open DivadNojnarg opened 4 months ago
I think it is missing the methods for the output and render. e.g.:
#' @method server_output correlation_boxplot_block
#' @export
server_output.correlation_boxplot_block <- function (x, result, output){
ggiraph::renderGirafe(result())
}
#' @method uiOutputBlock correlation_boxplot_block
#' @export
uiOutputBlock.correlation_boxplot_block <- function (x, ns){
ggiraph::girafeOutput(ns("res"))
}
Yes that's true: https://github.com/blockr-org/blockr/blob/5798d528092d2e7efbaf07a4ad6c494d20b5ecc4/R/server.R#L424. We cleaned the server scripts few months ago but the vignette wasn't updated to account for this.
To add:
uiOutputBlock.ggiraph_block <- function(x, ns) {
ggiraph::girafeOutput(ns("plot"))
}
server_output.ggiraph_block <- function(x, result, output) {
ggiraph::renderGirafe(result())
}
I think we could remove these blocks and create a blockr.ggiraph package instead, thoughts?
Sorry @JohnCoene, I did not labelled the issue correctly. The issue happens in a vignette where we describe the process to create plot blocks layer by layer with a last example involving ggiraph. These blocks and any supporting code are not intended to be in the blockr package.