-
Notifications
You must be signed in to change notification settings - Fork 44
Design
Widgets, Outputs and Panels are all Python classes that are paired with a Jinga template. That Jinga template typically contains blocks for HTML, JS, and CSS (though most will probably rely on the default CSS from Bootstrap).
Widgets are Python classes that are paired with a Jinga template. The Jinga template takes as input at least a name and a value, usually also a label, and has a block for HTML, Javascript, and CSS. All have class ShinyWidget in their HTML.
- SelectInput (label, choices=list, default=first => str)
- CheckboxInput (label, default=False => bool)
- SliderInput (label, min, max, step => int/float)
- TextInput (label, default="", prompt="", maxchar=None, lines=None, => str)
- FileInput (label, maxsize => filepath)
- HtmlOutput => string
- VerbatimTextOutput => string
- PlotOutput => filename (?)
- TableOutput => pandas table
- DataTableOutput => pandas table
- D3Output => ?
Panels are ways to organize and display other widgets, outputs and panels using HTML and JS.
- tabsetPanel(tabpanels)
- tabPanel(name, 1+ outputs or a tabsetpanel)
- conditionalPanel(JS condition, panel)
Additional features (not for hackathon)
- download current figure
- pre-render figure all combinations
- be smart about what to update
Assume the user interface is at
/shiny
AJAX query is sent to:
/shiny/server?name1=value1&name2=value2...
containing the specific IDs and values of each of the input widgets. Returns:
{"changes": {"plot1": {"src": "newfile1.html"},
"plot2": {"src": "newfile2.html"}}}
Describing what specific object/attributes need to be altered.