Learn R Programming

teal (version 0.16.0)

module_bookmark_manager: App state management.

Description

[Experimental]

Capture and restore the global (app) input state.

Usage

ui_bookmark_panel(id, modules)

srv_bookmark_panel(id, modules)

get_bookmarking_option()

need_bookmarking(modules)

Value

Invisible NULL.

Arguments

id

(character(1)) shiny module instance id.

modules

(teal_modules) teal_modules object. These are the specific output modules which will be displayed in the teal application. See modules() and module() for more details.

Server logic

A bookmark is a URL that contains the app address with a /?_state_id_=<bookmark_dir> suffix. <bookmark_dir> is a directory created on the server, where the state of the application is saved. Accessing the bookmark URL opens a new session of the app that starts in the previously saved state.

Details

This module introduces bookmarks into teal apps: the shiny bookmarking mechanism becomes enabled and server-side bookmarks can be created.

The bookmark manager presents a button with the bookmark icon and is placed in the tab-bar. When clicked, the button creates a bookmark and opens a modal which displays the bookmark URL.

teal does not guarantee that all modules (teal_module objects) are bookmarkable. Those that are, have a teal_bookmarkable attribute set to TRUE. If any modules are not bookmarkable, the bookmark manager modal displays a warning and the bookmark button displays a flag. In order to communicate that a external module is bookmarkable, the module developer should set the teal_bookmarkable attribute to TRUE.