Several generics are exported in order to integrate stack UI into board UI.
We have stack_ui() which is dispatched on the board (and in the default
implementation) on individual stack objects. This renders stacks as
bootstrap accordion items (using bslib::accordion()). If a different way
of displaying stacks and integrating them with a board is desired, this can
be implemented by introducing a board subclass and providing a stack_ui()
method for that subclass. Inserting stacks into (and removing stacks from)
a board is available as insert_stack_ui()/remove_stack_ui() and blocks
into/from stacks via add_block_to_stack()/remove_block_from_stack().
All are S3 generics with implementations for board and alternative
implementation may be provided for board sub-classes.
stack_ui(id, x, ...)# S3 method for board
stack_ui(id, x, stacks = NULL, edit_ui = NULL, ...)
# S3 method for stack
stack_ui(id, x, edit_ui = NULL, ...)
insert_stack_ui(id, x, board, edit_ui = NULL, session = get_session(), ...)
# S3 method for board
insert_stack_ui(id, x, board, edit_ui = NULL, session = get_session(), ...)
remove_stack_ui(id, board, session = get_session(), ...)
# S3 method for board
remove_stack_ui(id, board, session = get_session(), ...)
add_block_to_stack(board, block_id, stack_id, session = get_session(), ...)
# S3 method for board
add_block_to_stack(board, block_id, stack_id, session = get_session(), ...)
remove_block_from_stack(
board,
block_id,
board_id,
session = get_session(),
...
)
# S3 method for board
remove_block_from_stack(
board,
block_id,
board_id,
session = get_session(),
...
)
UI set up via stack_ui() is expected to return shiny::tag() or
shiny::tagList() objects while stack/block insertion/removal functions
(into/from board/stack objects) are called for their side-effects. Both
insert_stack_ui()/remove_stack_ui and
add_block_to_stack()/remove_block_from_stack() return NULL invisibly
and where the former call shiny::insertUI()/shiny::removeUI() and the
latter modify the DOM via shiny::session custom messages.
Parent namespace
Object
Generic consistency
(Additional) stacks (or IDs) for which to generate the UI
Stack edit plugin
Board object
Shiny session
Block/stack/board IDs