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

Add cookie banner #344

Merged
merged 4 commits into from
Feb 8, 2024
Merged

Add cookie banner #344

merged 4 commits into from
Feb 8, 2024

Conversation

louis-md
Copy link
Collaborator

@louis-md louis-md commented Feb 6, 2024

Context

This PR adds the cookie banner to the docs

Tests passing before merging the PR:

  • The banner opens and closes correctly
  • All the checkboxes work correctly and keep the state when the banner is closed/opened
  • The local storage of the browser has the right data everytime checkboxes are checked/uncheked
  • Compatibility with app.safe.global local storage (staging)

@tanay1337 tanay1337 requested a review from germartinez February 6, 2024 16:28
@germartinez
Copy link
Member

germartinez commented Feb 6, 2024

Tests should be run before merging this PR.
staging env: https://docs.staging.5afe.dev

Some checks to consider:

  • The banner opens and closes correctly
  • All the checkboxes work correctly and keep the state when the banner is closed/opened
  • The local storage of the browser has the right data everytime checkboxes are checked/uncheked
  • Compatibility with app.safe.global local storage (staging)

Updated the PR description

@louis-md
Copy link
Collaborator Author

louis-md commented Feb 7, 2024

Tests should be run before merging this PR. staging env: https://docs.staging.5afe.dev

Some checks to consider:

  • The banner opens and closes correctly
  • All the checkboxes work correctly and keep the state when the banner is closed/opened
  • The local storage of the browser has the right data everytime checkboxes are checked/uncheked
  • Compatibility with app.safe.global local storage (staging)

Updated the PR description

I think we have to merge to test it in staging environment right?

Copy link
Member

@germartinez germartinez left a comment

Choose a reason for hiding this comment

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

I found a little issue following this steps:

  1. The localStorage is empty
  2. The banner is displayed automatically and the user clicks on "Accept All"
  3. The user clicks on "Preferences" and the banner is displayed with the "Analytics" checkbox checked.
  4. The user unchecks the checkbox and clicks on "Accept All"
  5. The user clicks on "Preference" and the banner is displayed, but the checkbox is unchecked and it should be checked. The localStorage works correctly, but not the checkbox.
  6. Refreshing the page fixes the issue after step 5.

Edit:
I found that this is also happening at htts://safe.global. As it is just a UI issue happening on the first visit (fixed after refreshing once) and the localStorage works good, I'm fine leaving this as it is for now an not spending more time (unless is something super easy to fix).

@germartinez germartinez self-requested a review February 7, 2024 18:29
germartinez
germartinez approved these changes Feb 7, 2024
@louis-md
Copy link
Collaborator Author

louis-md commented Feb 8, 2024

Latest commit makes two changes:

  • Fixes small state error found by @germartinez
  • Add rel='noreferrer' to _blank target link for security reasons

@louis-md louis-md merged commit 2047419 into main Feb 8, 2024
3 checks passed
@louis-md louis-md deleted the cookie-banner branch February 8, 2024 09:31
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.

3 participants