Version 2.0.x-beta code

Created on 28 October 2024, 17 days ago

Problem/Motivation

The EUCC Manager development has been a bit stagnant for a few years now, and it's time to remove at least the JQuery code and start moving forward with much cleaner code, with new features being rolled in.

I have been busily implementing 2.0.x code and have got many features rolled into the 2.0.x-dev branch.

  • New design for popup implemented (issue #2952078 from @thomas.frobieter)
  • Users can use twig suggestions in conjunction with the compliance set names (eg set name 'opt-in', template suggestion will be eu-cookie-compliance--opt-in.html.twig, or the EUCC will just use a default template(s) ie eu-cookie-compliance.html.twig, eu-cookie-compliance--legacy.html.twig
  • Each banner can be excluded from pages options, and from admin interface
  • New feature to have multiple compliance sets.
    • Each set can have an associated banner with it.
    • Each set can have categories with it (from the categories tab in config)
    • Each set has its own cookie associated with it.
    • Each set could eventually be only shown in which even region you need it to be shown in (still to be done)
    • Each set controls which scripts shouldn't be loaded
  • Jquery dependancy removed
  • Vanilla Javascript added #3174750
    • We now have a Banner class that controls an interaction with cookies
    • Banner class has a cookie manager for interacting with cookies. Abstracting it this way means we could potientially use a third party at anytime.
    • Banners produce events that can be listened for, rather than the previous subscriber pattern.
    • Banner will execute javascript exclusions on agreement or not on disagreement.
    • If agreed on load, excluded javascript will run automatically.
  • implemented hook_js_alter()
  • Eslint and phpcs now added to project to provide cleaner code and more maintainable styles
  • General cleanup where possible

Remaining tasks

  • Regions reimplementation
  • Opt in/out consent clarification, then implementation
  • Some fixes with showing / hiding the cookie banner (ie the "Privacy settings" tab)
  • Location of banner ie, Top/Bottom from a users point of view
  • When policy versions differ, reshow banner for agreement

User interface changes

  • Removed the ability for user to set the Agreed/disagreed values

API changes

  • The ability to use the subscribe to events has been removed, moving to Event listening instead.

There is change to possibly do a beta test, however, with the current move to Klaro, this might no longer be the case.

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇳🇿New Zealand atowl

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024