As counterpart to board_server()
, board_ui()
is responsible for rendering
UI for a board module. This top-level entry point for customizing board
appearance and functionality can be overridden by sub-classing the boar
object and providing an implementation for this sub-class. Such an
implementation is expected to handle UI for plugins and all board
components, including blocks, links and stacks, but may rely on
functionality that generates UI for these components, such as block_ui()
or stack_ui()
, as well as already available UI provided by plugins
themselves.
Usage
# S3 method for class 'board_options'
board_ui(id, x, ...)
# S3 method for class 'board_options'
update_ui(x, session, ...)
board_ui(id, x, ...)
# S3 method for class 'board'
board_ui(id, x, plugins = list(), ...)
# S3 method for class '`NULL`'
board_ui(id, x, ...)
insert_block_ui(id, x, blocks = NULL, ...)
# S3 method for class 'board'
insert_block_ui(id, x, blocks = NULL, ...)
remove_block_ui(id, x, blocks = NULL, ...)
# S3 method for class 'board'
remove_block_ui(id, x, blocks = NULL, ...)
update_ui(x, session, ...)
# S3 method for class 'board'
update_ui(x, session, ...)
Value
A board_ui()
implementation is expected to return shiny::tag or
shiny::tagList()
objects, while updater functions (insert_block_ui()
,
remove_block_ui()
and update_ui()
) are called for their side effects
(which includes UI updates such as shiny::insertUI()
, shiny::removeUI()
)
and return the board object passed as x
invisibly.
Details
Dynamic UI updates are handled by functions insert_block_ui()
and
remove_block_ui()
for adding and removing block-level UI elements to and
from board
UI, whenever blocks are added or removed. The lightly more
nondescript updated function update_ui()
is intended for board-level UI
updates, which is currently only needed when restoring from a saved state and
board option UI needs to be adjusted accordingly. All these update functions
are provided as S3 generics with implementations for board
and can be
extended if so desired.