Skip to content
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

Remove expandable function #116

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions R/helper_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@
# app to keep the rest of the app code easier to read.
# -----------------------------------------------------------------------------

# Expandable function ---------------------------------------------------------
expandable <- function(input_id, label, contents) {
gov_details <- shiny::tags$details(
class = "govuk-details", id = input_id,
shiny::tags$summary(
class = "govuk-details__summary",
shiny::tags$span(
class = "govuk-details__summary-text",
label
)
),
shiny::tags$div(contents)
)
}

# Value box function ----------------------------------------------------------
# fontsize: can be small, medium or large
value_box <- function(value, subtitle, icon = NULL,
Expand Down
1 change: 1 addition & 0 deletions R/read_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ read_revenue_data <- function(file = "data/la_maintained_schools_revenue_reserve
}

# Upper Tier data ----------------------------------------------------------------

read_upper_tier_data <- function(file = "data/Local_Authority_Districts_All_simplified.geojson") {
df_upper_tier <- sf::read_sf(file)
return(df_upper_tier)
Expand Down
70 changes: 31 additions & 39 deletions R/ui_panels/example_tab_1.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,40 @@ example_tab_1_panel <- function() {
id = "main_col",
h1("Overall content title for this dashboard page"),
),
# Expandable section --------------------------------------------------
# Inputs section --------------------------------------------------
column(
width = 12,
expandable(
input_id = "details", label = textOutput("dropdown_label"),
contents =
div(
id = "div_a",
# User selection dropdowns ------------------------------------
gov_row(
column(
width = 6,
shinyGovstyle::select_Input(
inputId = "selectPhase",
label = "Select a school phase",
select_text = choices_phase,
select_value = choices_phase
)
),
column(
width = 6,
shinyGovstyle::select_Input(
inputId = "selectArea",
label = "Choose an area:",
select_text = choices_areas$area_name,
select_value = choices_areas$area_name
)
),
# Download button -------------------------------------------
column(
width = 12,
paste("Download the underlying data for this dashboard:"),
br(),
downloadButton(
outputId = "download_data",
label = "Download data",
icon = shiny::icon("download"),
class = "downloadButton"
)
)
)
gov_box(
column(
width = 5,
selectizeInput(
"selectPhase",
"Select a school phase:",
choices = choices_phase,
multiple = FALSE,
selected = "All Local authority maintained schools"
)
),
column(
width = 5,
selectizeInput(
"selectArea",
"Choose an area:",
choices = choices_areas$area_name,
multiple = FALSE,
selected = "England"
)
),
# Download button -------------------------------------------
column(
width = 2,
downloadButton(
outputId = "download_data",
label = "Download data",
icon = shiny::icon("download"),
class = "downloadButton"
)
)
),
),
# Tabset under dropdowns ----------------------------------------------
Expand Down
Loading