-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] progress bar in infoBox #135
base: main
Are you sure you want to change the base?
Conversation
ProblemThe problem I will need to solve with this PR is following: In order to display the progress bar width, one needs to have e.g.
On this, a CSS code below will apply:
Which, however, needs to have height property (additionally) as this gets lost (somehow), because we make the progress-bar reactive and that adds a new shiny class to it. Solutions1.We could solve it by doing this (with default CSS from AdminLTE):
But this requires to have
which I dont like. 2.Or we need to append
which is not much better in terms what we would have in 3.It would be best, if there would be a function like |
This uses solution number 2
# paste0("width: ", progressBarValue, "%; height: 2px;"))), | ||
|
||
if (progressBar) div(class = "progress", progressBarValue), | ||
if (!is.null(subtitle)) span(class = "progress-description", subtitle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
span(class = "progress-description", subtitle)
now uses CSS from AdminLTE which makes sure it behave correctly due to margins.
@@ -83,7 +87,12 @@ infoBox <- function(title, value = NULL, subtitle = NULL, | |||
div(class = "info-box-content", | |||
span(class = "info-box-text", title), | |||
if (!is.null(value)) span(class = "info-box-number", value), | |||
if (!is.null(subtitle)) p(subtitle) | |||
# if (progressBar) div(class = "progress", div(class = "progress-bar", style = progressBarValue)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extraneous comments?
Hi @wch, Thanks again. The reason for comments was that I was not sure about the solution and thus they were there for the ease of testing.
|
@@ -58,6 +58,7 @@ valueBox <- function(value, subtitle, icon = NULL, color = "aqua", width = 4, | |||
#' content; the icon will use the same color with a slightly darkened | |||
#' background. | |||
#' @param href An optional URL to link to. | |||
#' @param progressValue Must be between 0 and 100. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a more detailed description of what this does.
Well at least Jack would, #119 :) |
|
#124