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

Cookies Banner (fixes #3859) #3909

Merged
merged 19 commits into from
Dec 26, 2023
Merged

Conversation

wordhouse66
Copy link
Contributor

This PR adds a cookie banner
fixes #3859

@mattlindsey
Copy link
Collaborator

Looking good. I did a quick test and noticed a few things:

  • Make 'Accept Cookies' and 'Reject Cookies' look like buttons
  • Make wording a little friendlier. Something like 'We respect your privacy. Cookies are used to analyze traffic.'
  • Add link 'Privacy statement.' like the one at the bottom of the Sign Up page (/users/sign_up).
  • If you can, I think there is supposed to be an 'X' on the banner than lets the user close it without setting anything.

@wordhouse66
Copy link
Contributor Author

I have worked on all those things. Are they ok?

@mattlindsey
Copy link
Collaborator

Looking great, but noticed a couple of things
-When you click 'Accept' or 'Reject', the page goes blank
-I don't know a lot about cookies, but it appears the 'ga' (Google Analytics) cookie(s) are still getting set.
I think maybe this line shouldn't happen if the user hasn't 'allowed' cookies:

cookies[:user_id] = current_user.id if current_user

I'll try to look into this more soon, and you can get an 'extension' for your browser (I got 'Cookie Manager' for Chrome) to delete and view cookies while visiting localhost:300 to see the google cookies ('_ga' and '_gid', I think) to figure out how not to set them unless allowed by user.

@wordhouse66
Copy link
Contributor Author

Ok. I will work on fixing that.

@mattlindsey
Copy link
Collaborator

I get a few cucumber errors(below) due to the new cookie dialog. They say something about "Cuprite detected another element." Do you think they can be fixed? Also, I sent a few possible improvements on Slack you can look at if you want. Thanks!

Failing Scenarios:
cucumber features/events/create_events.feature:96 # Scenario: Creating a repeating event requires an end date
cucumber features/events/edit_future_event.feature:26 # Scenario: Check that edit page reflects initial settings
cucumber features/events/edit_future_event.feature:36 # Scenario: Edit an existing event to never end
cucumber features/events/edit_future_event.feature:45 # Scenario: Edit an existing event but cancel, and go back to show page for that event
cucumber features/events/edit_future_event.feature:50 # Scenario: User in non-UTC timezone edits and overrides the timezone of an existing event, and has expected side-effects for user in UTC timezone
cucumber features/events/edit_future_event.feature:59 # Scenario: User in non-UTC timezone edits but makes no changes to an existing event, and has no side-effects for user in UTC timezone
cucumber features/events/edit_future_event.feature:67 # Scenario: User in non-UTC timezone saves an existing event with no changes, during daylight savings

289 scenarios (7 failed, 282 passed)
2169 steps (7 failed, 44 skipped, 2118 passed)
1m38.448s

@wordhouse66
Copy link
Contributor Author

I will work on it.

Copy link
Collaborator

@mattlindsey mattlindsey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We sometime get cucumber test errors that mention the new cookie dialog ("Firing a click at coordinates [xxx] failed. Cuprite detected another element with CSS selector ...") but we can try to fix that later.

@mattlindsey mattlindsey merged commit 293094b into AgileVentures:develop Dec 26, 2023
1 check passed
mattlindsey added a commit that referenced this pull request Apr 27, 2024
* implemented cookies banner

* change cookies-banner-modal class

* change cookies-banner-modal class

* edit step_definitions/event_steps.rb

* edit step_definitions/event_steps.rb

* edit cookie-banner width

* edit cookie-banner width

* edit cookie-banner width

* edit cookie-banner width

* change target(click) back to.click

* x button to hide consent banner if user chooses neither cookie option

* activate google analytics only when user accepts cookies

* activate google analytics only when user accepts cookies

* activate google analytics only when user accepts cookies

* x button to hide consent banner if user chooses neither cookie option

* x button to hide consent banner if user chooses neither cookie option

* x button to hide consent banner if user chooses neither cookie option

* x button to hide consent banner if user chooses neither cookie option

---------

Co-authored-by: mac <[email protected]>
Co-authored-by: Matt Lindsey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cookies policy consent dialog
2 participants