-
Notifications
You must be signed in to change notification settings - Fork 1
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
Re-instated cookie control #101
Conversation
…up to date version
# renv::install("dfe-analytical-services/dfeshiny") | ||
|
||
# Run renv::restore() | ||
# If it doesn't work first time, maybe try renv::activate() and then renv::restore() |
Check notice
Code scanning / lintr
Lines should not be more than 80 characters. This line is 84 characters. Note
@@ -25,6 +25,21 @@ | |||
hide(id = "loading-content", anim = TRUE, animType = "fade") | |||
show("app-content") | |||
|
|||
# Code for controlling cookie consent - do not delete. See dfeshiny guidance for how this works: |
Check notice
Code scanning / lintr
Lines should not be more than 80 characters. This line is 98 characters. Note
@@ -25,6 +25,21 @@ | |||
hide(id = "loading-content", anim = TRUE, animType = "fade") | |||
show("app-content") | |||
|
|||
# Code for controlling cookie consent - do not delete. See dfeshiny guidance for how this works: | |||
# https://dfe-analytical-services.github.io/dfeshiny/articles/implementing-cookies.html |
Check notice
Code scanning / lintr
Lines should not be more than 80 characters. This line is 89 characters. Note
@@ -25,6 +25,21 @@ | |||
hide(id = "loading-content", anim = TRUE, animType = "fade") | |||
show("app-content") | |||
|
|||
# Code for controlling cookie consent - do not delete. See dfeshiny guidance for how this works: | |||
# https://dfe-analytical-services.github.io/dfeshiny/articles/implementing-cookies.html | |||
# ============================================================================================== |
Check notice
Code scanning / lintr
Lines should not be more than 80 characters. This line is 98 characters. Note
output$cookies_status <- dfeshiny::cookies_banner_server( | ||
input_cookies = shiny::reactive(input$cookies), | ||
parent_session = session, | ||
google_analytics_key = google_analytics_key |
Check warning
Code scanning / lintr
no visible binding for global variable 'google_analytics_key' Warning
value = "cookies_panel_ui", | ||
"Cookies", | ||
gov_main_layout( | ||
cookies_panel_ui(google_analytics_key = google_analytics_key) |
Check warning
Code scanning / lintr
no visible global function definition for 'cookies_panel_ui' Warning
value = "cookies_panel_ui", | ||
"Cookies", | ||
gov_main_layout( | ||
cookies_panel_ui(google_analytics_key = google_analytics_key) |
Check warning
Code scanning / lintr
no visible binding for global variable 'google_analytics_key' Warning
value = "support_panel", | ||
"Support and feedback", | ||
gov_main_layout( | ||
support_panel( |
Check warning
Code scanning / lintr
no visible global function definition for 'support_panel' Warning
gov_main_layout( | ||
support_panel( | ||
team_email = "[email protected]", | ||
repo_name = "https://github.com/dfe-analytical-services/attendance-data-dashboard", |
Check notice
Code scanning / lintr
Lines should not be more than 80 characters. This line is 95 characters. Note
repo_name = "https://github.com/dfe-analytical-services/attendance-data-dashboard", | ||
publication_name = "Pupil attendance in schools", | ||
publication_slug = "pupil-attendance-in-schools", | ||
form_url = "https://forms.office.com/Pages/ResponsePage.aspx?id=yXfS-grGoU2187O4s0qC-U4ie_t5E21MlsudeT67Fb5UQ0s1NFoxMUo4RjRYT080SFRMUUxVNUg5Uy4u" |
Check notice
Code scanning / lintr
Lines should not be more than 80 characters. This line is 157 characters. Note
Pull request overview
We spotted that someone had broken the cookie control on the dashboard, so I've made a quick fix and highlighted the code that shouldn't be removed.
Pull request checklist
Please check if your PR fulfils the following:
run_tests_locally()
)tidy_code()
)What is the current behaviour?
Cookie control was broke, clicking the accept / decline cookies button wasn't having any effect because the code to respond to those buttons had been removed from server.R
What is the new behaviour?
The code for the cookies has been reinstated (and upgraded to the latest version of dfeshiny). The cookie buttons should now trigger cookie consent behaviours and hide the cookie banner from the user.
As part of this, I've done a full package update, including upgrading dfeshiny to v0.4.3. I've also added in the standard dfeshiny support panel using dfeshiny::support_panel().