A modified shinydashboard to incorporate more functionality from adminLTE:
-
A modified dashboardPage.R, a modified dashboardBody.R and deps.R to allow showing menu icons when sidebar collapse.
-
Add AdminLTE/bootstrap, AdminLTE/dist and AdminLTE/plugin to inst/AdminLTE/bootstrap, inst/AdminLTE/dist and inst/AdminLTE/plugin.
-
Enhance
tags$body(class = paste0("skin-", skin), ...)
totags$body(class = paste0("hold-transition skin-", skin, " sidebar-mini"), ...)
in dashboardPage.R. -
Add JS inhtmlDependency("AdminLTE", "2.0.6", ..., scripts = c(adminLTE_js, ...))
inaddDeps
in deps.R -
Add JS at the end oftags$body(...)
in dashboardPage.R - manual refer to JS with name, version and src derived fromaddDeps()
in deps.R, not perfect (TODO - replaceygdashboard-0.5.1.9000
bysystem.file("AdminLTE", package = "ygdashboard")
). -
These together allow showing menu icons when sidebar collapse.
-
-
A modified infoBox: allow filled infoBox (Type2 infoBox) to have progress report.
-
A modified dashboardPage.R, a modified dashboardHeader.R and a new dashboardControlbar.R: show control panel on top right of header panel.
-
Add component controlbar in argument list and in
content <- div(class = "wrapper", header, sidebar, body, controlbar)
in dashboardPage.R -
Add
HTML('<li><a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a></li>')
intags$header(class = "main-header", ..., div(class = "navbar-custom-menu", tags$ul(class = "nav navbar-nav", items, ...)))
in dashboardHeader.R to show controlbar button toggle on/off controlbar. -
Add dashboardControlbar.R to implement control-sidebar.
-
-
A modified dashboardPage.R, a modified dashboardHeader.R and a new dashboardUser.R: show user account info panel on top right of header panel.
-
Add component user in argument list and in
tags$header(class = "main-header", ..., div(class = "navbar-custom-menu", tags$ul(class = "nav navbar-nav", items, ...)))
in dashboardHeader.R to show user account inf panel on top right of header panel. -
Add dashboardUser.R to implement user account infomation.
-
Add
htmlDependency("ygdashboard", ...)
inaddDeps()
in deps.R pointing to inst/ygdashboard - so default user profile figure in inst/ygdashboard can be used when shiny rendering html.
-
-
A modified shinydashboard.js, a new moduleOutput.R and a modified
tagAssert()
in utils.R to allow dynamically generating ygdashboard modules such asdashboardUser()
,dashboardFooter()
.-
Add
var moduleOutputBinding =new Shiny.OutputBinding(); ...
to replace and findclass=ygdashboard-module-output
inshinydashboard.js
. This is a mimic ofvar menuOutputBinding = new Shiny.OutputBinding(); ...
and allows run time dynamically generate modules on server side to be binded into client side module place holders. Theclass="ygdashboard-module-output"
is used in shinydashboard.js as an id for replacing the origin DOM element with the new DOM elements copying over the ID and class. -
Add class
ygdashboard-module-output
as skipped elements intagAssert()
in utils.R:
if (allowUI && (hasCssClass(tag, "shiny-html-output") || hasCssClass(tag, "shinydashboard-menu-output") || hasCssClass(tag, "ygdashboard-module-output"))) { return() }
- Add
moduleOutput()
in moduleOutput.R as a method of creating a dynamic module output place holder on client side, use in context withshiny::renderUI({})
. This is a mimic ofmenuOutput()
. And similar as in menuOutput, it is recommended to use the wrapper function such asuserOutput()
andfooterOutput()
, instead of callingmoduleOutput()
directly.
-
-
A modified dashboardUser.R and a modified shinydashboard.js: create user dynamically from server side and render user reponsively on client side by taking input from URL - should be login from database when deployed.
-
Add a modified
dashboardUser()
in dashboardUser.R to create userInfo as shiny html context - tagList. -
Add
userOutput()
in dashboardUser.R as client-side place holder, use in context with server-side dynamically generatedrenderUser({ dashboardUser() })
.
-
-
A modified
sidebarUserPanel()
in dashboardSidebar.R to add user account info panel on sidebar with Online, Away, and Offline stauts:-
Add argument
status
insidebarUserPanel()
. -
Add
sidebarUserPanelOutput()
in menuOutput.R as client-side place holder, use in context with server-side dynamically generatedrenderMenu({ sidebarUserPanel() })
. -
Add
style="background-color:transparent;"
indiv(class = "user-panel", ..., div(class = "pull-left info", ...))
insidebarUserPanel()
- in case otherwise when work with leaflet package, background is overwritten by leafletfix.css:8.
-
-
A modified dashboardSidebar.R:
-
Add
menuSegment()
in context ofsidebarMenu()
in dashboardSidebar.R by<li class="header">MAIN NAVIGATION</li>
. -
Add
menuSegmentOutput()
in menuOutput.R as client-side place holder, use in context with server-side dynamically generatedrenderMenu({ menuSegment() })
.
-
-
A modified dashboardPage.R and a new dashboardFooter.R: add
footer
in bodycontent-wrapper
.-
Add a new
dashboardFooter()
to create dashboardFooter in dashboardFooter.R. -
Add a new
footerOutput()
in dashboardFooter.R as client-side place holder, use in context with server-side dynamically generatedrenderFooter({ dashboardFooter() })
. -
Add an argument
footer
indashboardPage()
in dashboardPage.R.
-
-
Add
chatBox()
in boxes.R: show chats and potential use for commnunicating with clients.-
Add
chatBox()
together with componentschatMessage()
,chatContactList()
andchatContact()
in boxes.R -
Add
chatMessageOutput()
andrenderChatMessage()
for generating chatMessage dynamically on server-side and rendering on client-side.
-
-
Add
calendarBox()
in boxes.R: show calendar and task progress.- TODO: check the reason calendar won't show in shiny?
-
Add
timelineBox()
,timelineLabel()
andtimelineItem()
in boxes.R: show timeline of development and etc.- TODO: Add
timelineOutput()
andrenderTimeline()
for generating timelineBox dynamically on server-side and rendering on client-side?
- TODO: Add
-
dashboardControlbar.R: create functions that can create sub-components in control-sidebar, like functions defined in dashboardSidebar.R
-
create more valid
status
inbox()
- so more header color such as oragne, dark-blue, purple - or, add an argument color that takes valid color as input and overwrite status.