Skip to content

Commit

Permalink
cleaning structure, better naming of files/modules
Browse files Browse the repository at this point in the history
  • Loading branch information
osalamon committed Sep 4, 2024
1 parent 9723c3d commit 224438e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion app/view/disease_outbreaks/disease_app/disease_app.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ disease_app_ui <- function(id, i18n) {
fill = FALSE,
style = css(grid_template_columns = "3fr 1fr"),
disease_map_ui(
ns("map"), i18n
ns("disease_map"), i18n
),
tags$h3(i18n$translate("Location")),
),
Expand Down
14 changes: 7 additions & 7 deletions app/view/disease_outbreaks/disease_app/disease_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ box::use(
disease_map_ui <- function(id, i18n) {
ns <- NS(id)
card(
id = ns("map"),
id = ns("map_wrapper"),
class = "ms-md-3 card-shadow mt-2",
full_screen = TRUE,
card_header(
Expand Down Expand Up @@ -37,12 +37,12 @@ disease_map_server <- function(id, coordinates) {
min_zoom = 3
)
) |>
addTiles() |>
setView(
lng = 12.0,
lat = 51.0,
zoom = 10
)
addTiles() # |>
# setView(
# lng = 12.0,
# lat = 51.0,
# zoom = 10
# )
})
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ box::use(
)

#' @export
disease_outbreaks_contributors_ui <- function(id, i18n) { # nolint
disease_contributors_ui <- function(id, i18n) { # nolint
ns <- NS(id)
fluidRow(
class = "align-items-center justify-content-center m-0 p-0",
Expand Down Expand Up @@ -36,7 +36,7 @@ disease_outbreaks_contributors_ui <- function(id, i18n) { # nolint
}

#' @export
disease_outbreaks_contributors_server <- function(id, r) { # nolint
disease_contributors_server <- function(id, r) { # nolint
moduleServer(id, function(input, output, session) {
ns <- session$ns
})
Expand Down
14 changes: 7 additions & 7 deletions app/view/disease_outbreaks/disease_outbreaks_main.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ box::use(
)

box::use(
app/view/disease_outbreaks/info/disease_info[disease_info_ui, disease_info_server],
app/view/disease_outbreaks/info/disease_info[disease_info_ui],
app/view/disease_outbreaks/disease_app/disease_app[disease_app_ui, disease_app_server],
app/view/disease_outbreaks/disease_outbreaks_contributors[disease_outbreaks_contributors_ui],
app/view/disease_outbreaks/disease_contributors[disease_contributors_ui],
)

#' @export
Expand All @@ -16,10 +16,10 @@ disease_outbreaks_main_ui <- function(id, i18n) {
# Info Page ---
nav_panel(
title = i18n$translate("Info"),
value = "Info",
value = "Info (called from 1st navpanel in disease_outbreaks_main.R)",
icon = icon("circle-info"),
disease_info_ui(
ns("disease_info_ui"), i18n
ns("disease_info"), i18n
)
),
nav_panel(
Expand All @@ -33,8 +33,8 @@ disease_outbreaks_main_ui <- function(id, i18n) {
title = i18n$translate("Contributors"),
value = "Contributors",
icon = icon("sitemap"),
disease_outbreaks_contributors_ui(
ns("disease_outbreaks_contributors"),
disease_contributors_ui(
ns("disease_contributors"),
i18n
)
)
Expand All @@ -46,6 +46,6 @@ disease_outbreaks_main_server <- function(id) {
moduleServer(id, function(input, output, session) {
ns <- session$ns

# disease_info_server("disease_info_server")
disease_app_server("disease_app")
})
}
9 changes: 4 additions & 5 deletions app/view/disease_outbreaks/info/disease_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ disease_info_ui <- function(id, i18n) {
)
}

#' @export
disease_info_server <- function(id) {
moduleServer(id, function(input, output, session) {
# disease_info_server <- function(id) {
# moduleServer(id, function(input, output, session) {

})
}
# })
# }

0 comments on commit 224438e

Please sign in to comment.