-
Notifications
You must be signed in to change notification settings - Fork 25
Css tweaks #196
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
Merged
Merged
Css tweaks #196
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ef4a00c
start settings page refactor
jwildfire 684050a
more UI tweaks
jwildfire 2b4f7a1
Merge branch 'dev-v0.9.0' into css-tweaks
jwildfire 7774941
add function for section render
jwildfire 63865f6
more refactor
jwildfire 009de03
update validation styles
jwildfire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| library(safetyGraphics) | ||
| library(shiny) | ||
| library(shinyWidgets) | ||
| library(shinyjs) | ||
| library(dplyr) | ||
| library(purrr) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 17 additions & 91 deletions
108
inst/eDISH_app/modules/renderSettings/renderSettingsUI.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,97 +1,23 @@ | ||
| #' Render Settings module - UI code | ||
| #' | ||
| #' This module creates the Settings tab for the Shiny app. The UI is dynamically populated from the server side. | ||
| #' | ||
| #' The UI contains: | ||
| #' - Chart selector | ||
| #' - Settings customizations for the selected charts: | ||
| #' - Data mapping | ||
| #' - Measure settings | ||
| #' - Appearance settings | ||
| #' | ||
| #' @param id The module-specific ID that will get pre-pended to all element IDs | ||
| #' | ||
| #' @return The UI for the Settings tab | ||
| #' | ||
|
|
||
| renderSettingsUI <- function(id){ | ||
|
|
||
| ns <- NS(id) | ||
|
|
||
| tagList( | ||
| verticalLayout( | ||
| fluidRow( | ||
| column(4, | ||
| wellPanel( | ||
| div( | ||
| span(h2(tags$strong("Select Chart(s):"))), | ||
| checkboxGroupInput(ns("charts"),"", | ||
| choices = c("e-DISH" = "edish"), | ||
| selected="edish")) | ||
| ) | ||
| fluidRow( | ||
| column(12, | ||
| class="chartSelect section", | ||
| checkboxGroupInput( | ||
| ns("charts"), | ||
| "Select Chart(s):", | ||
| choices = c("e-DISH" = "edish"), | ||
| selected="edish" | ||
| ) | ||
| ), | ||
| fluidRow( | ||
| column(4, | ||
| tags$hr() | ||
| ) | ||
| ), | ||
| fluidRow( | ||
| column(4, | ||
| h2(tags$strong("Customize Settings:")) | ||
| ) | ||
| ), | ||
| fluidRow( | ||
| column(4, | ||
| div( | ||
| div(style="display: inline-block;", h3(tags$i("Data Mapping"))), | ||
| div(style="display: inline-block;", checkboxInput(ns("show_data_mapping"), "show", TRUE)) | ||
| ) | ||
| ) | ||
| ), | ||
| conditionalPanel(condition="input.show_data_mapping", ns=ns, | ||
| fluidRow( | ||
| column(4, | ||
| wellPanel( | ||
| uiOutput(ns("data_mapping_ui")) | ||
| )) | ||
|
|
||
| ) | ||
| ), | ||
|
|
||
| fluidRow( | ||
| column(4, | ||
| div( | ||
| div(style="display: inline-block;", h3(tags$i("Measure Settings"))), | ||
| div(style="display: inline-block;", checkboxInput(ns("show_measure_settings"), "show", TRUE)) | ||
| ) | ||
| ) | ||
| ), | ||
| conditionalPanel(condition="input.show_measure_settings", ns=ns, | ||
| fluidRow( | ||
| column(4, | ||
| wellPanel( | ||
| uiOutput(ns("measure_settings_ui")) | ||
|
|
||
| ) | ||
| ) | ||
| ) | ||
| ), | ||
| fluidRow( | ||
| column(6, | ||
| div( | ||
| div(style="display: inline-block;", h3(tags$i("Appearance Settings"))), | ||
| div(style="display: inline-block;", checkboxInput(ns("show_appearance_settings"), "show", TRUE)) | ||
| ) | ||
| ) | ||
| ), | ||
| conditionalPanel(condition="input.show_appearance_settings", ns=ns, | ||
| fluidRow( | ||
| column(4, | ||
| wellPanel( | ||
| uiOutput(ns("appearance_settings_ui")) | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| )) | ||
| ), | ||
| #TODO - make this a loop based on metadata | ||
| fluidRow( | ||
| createSettingsSection("data_mapping", "Data Mappings",6,ns), | ||
| createSettingsSection("measure_settings", "Measure Settings",6,ns), | ||
| createSettingsSection("appearance_settings", "Appearance Settings",6,ns) | ||
| ) | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
inst/eDISH_app/modules/renderSettings/util/createSettingsSection.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| createSettingsSection <- function(class, label,cols,ns){ | ||
| section <- | ||
| column(cols, | ||
| wellPanel( | ||
| class=paste0(class," section"), | ||
| h3( | ||
| label, | ||
| materialSwitch( | ||
| ns(paste0("show_",class)), | ||
| label = "", | ||
| right=TRUE, | ||
| value = TRUE, | ||
| status = "primary" | ||
| ) | ||
| ), | ||
| conditionalPanel( | ||
| condition=paste0("input.show_",class), | ||
| ns=ns, | ||
| uiOutput(ns(paste0(class,"_ui"))) | ||
| ) | ||
| ) | ||
| ) | ||
| return(section) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nice!