diff --git a/man/module_init_data.Rd b/man/module_init_data.Rd index 2c832cffae..7e9cd8b715 100644 --- a/man/module_init_data.Rd +++ b/man/module_init_data.Rd @@ -6,7 +6,7 @@ \alias{srv_init_data} \title{Data Module for teal} \usage{ -ui_init_data(id, data = NULL) +ui_init_data(id) srv_init_data(id, data) } @@ -16,17 +16,12 @@ a string specifying the \code{shiny} module id in cases it is used as a \code{sh rather than a standalone \code{shiny} app. This is a legacy feature.} \item{data}{(\code{teal_data}, \code{teal_data_module}, or \code{reactive} returning \code{teal_data}) -The \code{ui} component of this module does not require \code{data} if \code{teal_data_module} is not provided. -The \code{data} argument in the \code{ui} is included solely for the \verb{$ui} function of the -\code{teal_data_module}. Otherwise, it can be disregarded, ensuring that \code{ui_teal} does not depend on -the reactive data of the enclosing application.} +The data which application will depend on.} } \value{ A \code{reactive} object that returns: -\itemize{ -\item \code{teal_data} when the object is validated -\item \code{shiny.silent.error} when not validated. -} +Output of the \code{data}. If \code{data} fails then returned error is handled (after \code{\link[=tryCatch]{tryCatch()}}) so that +rest of the application can respond to this respectively. } \description{ This module manages the \code{data} argument for \code{srv_teal}. The \code{teal} framework uses \code{\link[=teal_data]{teal_data()}}, diff --git a/man/module_teal.Rd b/man/module_teal.Rd index 29cab0645c..408da6dcca 100644 --- a/man/module_teal.Rd +++ b/man/module_teal.Rd @@ -9,7 +9,6 @@ ui_teal( id, modules, - data = NULL, title = build_app_title(), header = tags$p(), footer = tags$p() @@ -28,12 +27,6 @@ Nested list of \code{teal_modules} or \code{teal_module} objects or a single will be displayed in the \code{teal} application. See \code{\link[=modules]{modules()}} and \code{\link[=module]{module()}} for more details.} -\item{data}{(\code{teal_data}, \code{teal_data_module}, or \code{reactive} returning \code{teal_data}) -The \code{ui} component of this module does not require \code{data} if \code{teal_data_module} is not provided. -The \code{data} argument in the \code{ui} is included solely for the \verb{$ui} function of the -\code{teal_data_module}. Otherwise, it can be disregarded, ensuring that \code{ui_teal} does not depend on -the reactive data of the enclosing application.} - \item{title}{(\code{shiny.tag} or \code{character(1)}) Optionally, the browser window title. Defaults to a title "teal app" with the icon of NEST. Can be created using the \code{build_app_title()} or @@ -45,6 +38,9 @@ the header of the app.} \item{footer}{(\code{shiny.tag} or \code{character(1)}) Optionally, the footer of the app.} +\item{data}{(\code{teal_data}, \code{teal_data_module}, or \code{reactive} returning \code{teal_data}) +The data which application will depend on.} + \item{filter}{(\code{teal_slices}) Optionally, specifies the initial filter using \code{\link[=teal_slices]{teal_slices()}}.} } @@ -73,4 +69,12 @@ performed: \item data transformation in \code{\link{module_transform_data}} } } + +\subsection{Fallback on failure}{ + +\code{teal} is designed in such way that app will never crash if the error is introduced in any +custom module provided by app developer (e.g. \code{\link[=teal_data_module]{teal_data_module()}}, \code{\link[=teal_transform_module]{teal_transform_module()}}). +If any module returns a failing object, the app will halt the evaluation and display a warning message. +App user should always have a chance to fix wrong input and continue to avoid session's restart. +} } diff --git a/man/module_teal_with_splash.Rd b/man/module_teal_with_splash.Rd index 4fa6ba3e3e..98b49551fb 100644 --- a/man/module_teal_with_splash.Rd +++ b/man/module_teal_with_splash.Rd @@ -22,10 +22,7 @@ a string specifying the \code{shiny} module id in cases it is used as a \code{sh rather than a standalone \code{shiny} app. This is a legacy feature.} \item{data}{(\code{teal_data}, \code{teal_data_module}, or \code{reactive} returning \code{teal_data}) -The \code{ui} component of this module does not require \code{data} if \code{teal_data_module} is not provided. -The \code{data} argument in the \code{ui} is included solely for the \verb{$ui} function of the -\code{teal_data_module}. Otherwise, it can be disregarded, ensuring that \code{ui_teal} does not depend on -the reactive data of the enclosing application.} +The data which application will depend on.} \item{title}{(\code{shiny.tag} or \code{character(1)}) Optionally, the browser window title. Defaults to a title "teal app" with the icon of NEST.