|
2 | 2 | #' @param request Internal parameter for 'shiny'. |
3 | 3 | #' @noRd |
4 | 4 | app_ui <- function(request) { |
5 | | - bslib::page_sidebar( |
6 | | - title = "Explore potentially-mitigatable activity data (in development)", |
| 5 | + bslib::page_navbar( |
| 6 | + id = "page_navbar", |
| 7 | + title = "Explore potentially-mitigatable activity data", |
| 8 | + selected = "Visualisations", # start with this panel open |
7 | 9 | fillable = FALSE, # allow page scroll |
8 | 10 |
|
| 11 | + bslib::nav_panel( |
| 12 | + id = "nav_panel_viz", |
| 13 | + title = "Visualisations", |
| 14 | + |
| 15 | + bslib::card( |
| 16 | + fill = FALSE, |
| 17 | + bslib::card_header( |
| 18 | + class = "bg-warning", |
| 19 | + bsicons::bs_icon("exclamation-triangle"), |
| 20 | + "Warning" |
| 21 | + ), |
| 22 | + "This app is in development and its output has not been verified.", |
| 23 | + "The information presented here should not be relied on as fact." |
| 24 | + ), |
| 25 | + |
| 26 | + bslib::layout_columns( |
| 27 | + col_widths = c(3, 9), |
| 28 | + fill = FALSE, |
| 29 | + fillable = FALSE, |
| 30 | + mod_show_strategy_text_ui("mod_show_strategy_text"), |
| 31 | + bslib::layout_column_wrap( |
| 32 | + width = 1, |
| 33 | + gap = "0.8rem", |
| 34 | + mod_plot_rates_ui("mod_plot_rates"), |
| 35 | + bslib::layout_column_wrap( |
| 36 | + width = 1 / 2, |
| 37 | + mod_table_procedures_ui("mod_table_procedures"), |
| 38 | + mod_table_diagnoses_ui("mod_table_diagnoses") |
| 39 | + ), |
| 40 | + bslib::layout_column_wrap( |
| 41 | + width = 1 / 2, |
| 42 | + mod_plot_age_sex_pyramid_ui("mod_plot_age_sex_pyramid"), |
| 43 | + mod_plot_nee_ui("mod_plot_nee") |
| 44 | + ), |
| 45 | + ) |
| 46 | + ) |
| 47 | + ), |
| 48 | + |
| 49 | + bslib::nav_panel( |
| 50 | + id = "nav_panel_info", |
| 51 | + title = "Information", |
| 52 | + bslib::layout_columns( |
| 53 | + bslib::layout_columns( |
| 54 | + col_widths = c(12, 12), |
| 55 | + bslib::card( |
| 56 | + id = "card_purpose", |
| 57 | + bslib::card_header("Purpose"), |
| 58 | + md_file_to_html("app", "text", "info-purpose.md") |
| 59 | + ), |
| 60 | + bslib::card( |
| 61 | + id = "card_data", |
| 62 | + bslib::card_header("Definitions"), |
| 63 | + md_file_to_html("app", "text", "info-definitions.md") |
| 64 | + ), |
| 65 | + bslib::card( |
| 66 | + id = "card_data", |
| 67 | + bslib::card_header("Data"), |
| 68 | + md_file_to_html("app", "text", "info-data.md") |
| 69 | + ) |
| 70 | + ), |
| 71 | + bslib::layout_columns( |
| 72 | + col_widths = c(12, 12), |
| 73 | + bslib::card( |
| 74 | + id = "card_navigation", |
| 75 | + bslib::card_header("Navigation"), |
| 76 | + md_file_to_html("app", "text", "info-navigation.md") |
| 77 | + ), |
| 78 | + bslib::card( |
| 79 | + id = "card_how_to_use", |
| 80 | + bslib::card_header("Interface"), |
| 81 | + md_file_to_html("app", "text", "info-interface.md") |
| 82 | + ) |
| 83 | + ) |
| 84 | + ) |
| 85 | + ), |
| 86 | + |
| 87 | + bslib::nav_item( |
| 88 | + class = "ms-auto", # push to far-right |
| 89 | + shiny::tags$a( |
| 90 | + href = Sys.getenv("FEEDBACK_FORM_URL"), |
| 91 | + target = "_blank", |
| 92 | + class = "nav-link", |
| 93 | + bsicons::bs_icon("chat-dots"), |
| 94 | + "Give feedback" |
| 95 | + ) |
| 96 | + ), |
| 97 | + |
9 | 98 | sidebar = bslib::sidebar( |
10 | 99 | bslib::accordion( |
11 | 100 | id = "sidebar_accordion", |
12 | 101 | open = FALSE, |
13 | 102 | multiple = TRUE, |
14 | 103 | bslib::accordion_panel( |
15 | | - title = "Statistical units", |
16 | | - icon = bsicons::bs_icon("pin-map"), |
| 104 | + title = "Datasets", |
| 105 | + icon = bsicons::bs_icon("table"), |
17 | 106 | mod_select_geography_ui("mod_select_geography"), |
18 | 107 | mod_select_provider_ui("mod_select_provider"), |
19 | 108 | ), |
20 | 109 | bslib::accordion_panel( |
21 | | - title = "Types of potentially mitigatable activity (TPMAs)", |
| 110 | + title = "Types of Potentially Mitigatable Activity (TPMAs)", |
22 | 111 | icon = bsicons::bs_icon("hospital"), |
23 | 112 | mod_select_strategy_ui("mod_select_strategy") |
24 | 113 | ) |
25 | 114 | ) |
26 | | - ), |
27 | | - |
28 | | - bslib::card( |
29 | | - fill = FALSE, |
30 | | - bslib::card_header( |
31 | | - class = "bg-warning", |
32 | | - bsicons::bs_icon("exclamation-triangle"), |
33 | | - "Warning" |
34 | | - ), |
35 | | - "This application is in development and its output has not been verified. |
36 | | - The information presented here should not be relied on as fact." |
37 | | - ), |
38 | | - |
39 | | - bslib::layout_columns( |
40 | | - col_widths = c(3, 9), |
41 | | - fill = FALSE, |
42 | | - fillable = FALSE, |
43 | | - mod_show_strategy_text_ui("mod_show_strategy_text"), |
44 | | - bslib::layout_column_wrap( |
45 | | - width = 1, |
46 | | - gap = "0.8rem", |
47 | | - mod_plot_rates_ui("mod_plot_rates"), |
48 | | - bslib::layout_column_wrap( |
49 | | - width = 1 / 2, |
50 | | - mod_table_procedures_ui("mod_table_procedures"), |
51 | | - mod_table_diagnoses_ui("mod_table_diagnoses") |
52 | | - ), |
53 | | - bslib::layout_column_wrap( |
54 | | - width = 1 / 2, |
55 | | - mod_plot_age_sex_pyramid_ui("mod_plot_age_sex_pyramid"), |
56 | | - mod_plot_nee_ui("mod_plot_nee") |
57 | | - ), |
58 | | - ) |
59 | 115 | ) |
60 | 116 | ) |
61 | 117 | } |
0 commit comments