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

UHF-8650 Preparation for the HDS cookie banner module #1083

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Conversation

khalima
Copy link
Contributor

@khalima khalima commented Oct 15, 2024

UHF-8650

This PR mostly tackles the issues when either of the EU Cookie compliance or HDBT cookie banner modules are installed. Hence the massive amount of todo comments.

What was done

  • Updated the cookie policy/settings URL to be retrieved from hdbt_cookie_banner module.
  • Use cookie settings service to retrieve the privacy policy url and rely on hdbt_cookie_banner_page_attachments() to handle the react search URL.
  • Use HDBT cookie banner cookie settings URL if available. Otherwise, fallback to helfi_eu_cookie_compliance private policy URL.
  • Changed the cookie-policy template name to cookie-settings page.
  • Added possibility to use the hdbt_cookie_banner settingsPageUrl variable.

How to install

  • Install at least the following instances: Etusivu, KYMP, SOTE
    • git pull origin dev
    • make fresh
  • Update the Helfi platform config and HDBT theme
    • composer require drupal/helfi_platform_config:dev-UHF-8650 drupal/hdbt:dev-UHF-8650 -W
  • Run make drush-cr

How to test

Etusivu

Testing instructions for the EU Cookie Compliance module

  • Create a standard page with Map, Video embed and Chart paragraphs
  • Explore the page in incognito and accept only necessary cookies.
    • Reload the page and check that all paragraphs have the Content cannot be displayed messages.
    • Accept the cookies from the cookie settings page and reload the page above. Check that the paragraphs work as they should.

Testing instructions for the HDBT Cookie banner module

  • Enable and configure the hdbt_cookie_banner module.
    • Run make shell and in shell drush en -y hdbt_cookie_banner
    • Go to https://helfi-etusivu.docker.so/fi/admin/structure/hdbt-cookie-banner
    • Select "Use instance specific cookie settings" checkbox.
      • This will make the Drupal use the instance specific cookie settings and cookie banner javascript
    • Override the contents of this file to Site settings textarea: sitesettings.json
    • Save the changes and clear caches.
  • Explore the standard page (created in first step) in incognito and accept only necessary cookies.
    • Reload the page and check that all paragraphs have the Content cannot be displayed messages.
    • Accept the cookies from the cookie settings page and reload the page above. Check that the paragraphs work as they should.

KYMP

Testing instructions for the EU Cookie Compliance module

  • Create a standard page with Map, Video embed, Chart and a Journey planner paragraphs
  • Explore the page in incognito and accept only necessary cookies.
    • Reload the page and check that all paragraphs and the "react and share" block have the Content cannot be displayed messages.
    • Accept the cookies from the cookie settings page and reload the page above. Check that the paragraphs work as they should.

Testing instructions for the HDBT Cookie banner module

  • Enable and configure the hdbt_cookie_banner module.
    • Run make shell and in shell drush en -y hdbt_cookie_banner
    • Go to https://helfi-kymp.docker.so/fi/admin/structure/hdbt-cookie-banner
    • Check that the "Use instance specific cookie settings" checkbox is unchecked.
      • This will make the Drupal use the "helfi-etusivu" API URL and will load the HDS cookie consent JS library from the "helfi-etusivu"
    • Save the changes and clear caches.
  • Explore the standard page (created in first step) in incognito and accept only necessary cookies.
    • Reload the page and check that all paragraphs have the Content cannot be displayed messages.
    • Accept the cookies from the cookie settings page and reload the page above. Check that the paragraphs work as they should.

SOTE

Testing instructions for the EU Cookie Compliance module

Testing instructions for the HDBT Cookie banner module

  • Enable and configure the hdbt_cookie_banner module.
    • Run make shell and in shell drush en -y hdbt_cookie_banner
    • Go to https://helfi-sote.docker.so/fi/admin/structure/hdbt-cookie-banner
    • Check that the "Use instance specific cookie settings" checkbox is unchecked.
      • This will make the Drupal use the "helfi-etusivu" API URL and will load the HDS cookie consent JS library from the "helfi-etusivu"
    • Save the changes and clear caches.
  • Explore the standard page (created in first step) in incognito and accept only necessary cookies.

Other

  • Check that code follows our standards

Other PRs

@khalima khalima changed the title UHF-8650 Switch to HDS cookie banner UHF-8650 Preparation for the HDS cookie banner module Oct 21, 2024
@khalima khalima marked this pull request as ready for review October 21, 2024 13:09
Copy link

⚠️ Visual regression found! Please check if this change is wanted or accidental. You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt/pull/1083/html_report/

@khalima khalima marked this pull request as ready for review October 23, 2024 07:48
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.

2 participants