Skip to content

Commit

Permalink
Added cookie panel, updated beta banner and minor updates to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbielby committed Jun 7, 2024
1 parent 536289d commit 62533f4
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-shiny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
RENV_PATHS_ROOT: ~/.local/share/renv

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shiny-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
RENV_PATHS_ROOT: ~/.local/share/renv

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/tidyCode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
tidyCode:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})
name: tidyCode

strategy:
fail-fast: false
Expand All @@ -25,11 +25,10 @@ jobs:
RENV_PATHS_ROOT: ~/.local/share/renv

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{matrix.config.r}}
use-public-rspm: true

- name: Cache R packages
Expand Down Expand Up @@ -59,7 +58,7 @@ jobs:
run: |
source("global.R")
codeChecks <- tidy_code_function()
codeChecks <- tidy_code()
if(any(is.na(codeChecks))) {
stop("There is a breaking error in the code.")
Expand Down
6 changes: 6 additions & 0 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ server <- function(input, output, session) {
cookie_link_panel = "cookies_panel_ui"
)

cookies_panel_server(
id = "cookies_panel",
input_cookies = shiny::reactive(input$cookies),
google_analytics_key = google_analytics_key # # nolint: [object_usage_linter]
)

# Links to tabs --------------------------------------------

observeEvent(input$link_to_industryFlow_tab, {
Expand Down
43 changes: 29 additions & 14 deletions ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,39 @@ fluidPage(
HTML(".navbar-nav {
float: none !important;
}
.navbar-nav > li:nth-child(9) {
.navbar-nav > li:nth-child(9) {
float: right;
}")
}
.navbar-nav > li:nth-child(8) {
float: right;
}
.navbar-nav > li:nth-child(7) {
float: right;
}
")
)
)
),
cookie_banner_ui(
"cookie-banner",
"Your dashboard name"
),
tags$head(includeHTML(("google-analytics.html"))),
dfe_cookie_script(),
navbarPage("",
id = "navbar",
tags$head(includeHTML(("google-analytics.html"))),
dfe_cookie_script(),
shinyGovstyle::banner(
"beta banner",
"beta",
paste0(
"<b>We're looking for volunteers! We've developed several new dashboards ",
"in the last 12 months and we'd really like to know what you think of them. ",
"If you're interested in helping us improve our products, please sign up ",
"using our <a href='https://forms.office.com/e/ZjNxf10uuN'>user-testing volunteer form</a>.</b><br>"
"<b>This dashboard is a new service that we are developing. If you have
any feedback or suggestions for improvements, please submit them using
our ",
a(
href = "https://forms.office.com/Pages/ResponsePage.aspx?id=yXfS-grGoU2187O4s0qC-c6JT6ONG3lJtlg-5hU4A6xURUpQME1OUVZIMEFMUUdNMEVONkhEN0g1VSQlQCN0PWcu",
"feedback form", .noWS = c("after")
),
".</b><br>"
)
),

Expand Down Expand Up @@ -748,18 +759,22 @@ fluidPage(
),
), # end of industry by subject tab

# Accessibility ===========================================================
# Support links ===========================================================

tabPanel(
"Accessibility",
accessibility_statement() # defined in R/accessibility_statement.R
"Support and feedback",
support_links() # defined in R/supporting_links.R
),
cookies_panel_ui(
id = "cookies_panel",
google_analytics_key = google_analytics_key
),

# Support links ===========================================================
# Accessibility ===========================================================

tabPanel(
"Support and feedback",
support_links() # defined in R/supporting_links.R
"Accessibility",
accessibility_statement() # defined in R/accessibility_statement.R
)
), # end of navbar page

Expand Down

0 comments on commit 62533f4

Please sign in to comment.