- Fix build issues with Vite #66 #67 by @florianbrinkmann
- Fixed an issue with Vite assets not being published correctly #65
- Cookie Notice v8 now supports Statamic 4 #61
- Now using Vite to build assets internally #60
- In your site's
composer.json
file, replacedoublethreedigital/cookie-notice
withduncanmcclean/cookie-notice
- Then, change the addon's version constraint to
^8.0
- Statamic 3.4 Support
- There's been a few small design changes to the notice
- CSS for the notice are now loaded inline, rather than via an external stylesheet (prevents it from not being displayed with some ad-blockers)
- Fixed a JavaScript issue when loading the notice for the first time
- Fixed an issue where text on 'Manage Cookies' button sometimes wouldn't show
- Fixed an issue where the CSS file in
public/vendor/cookie-notice
wouldn't be included in your site's Git repository
The supported versions of PHP/Statamic/Laravel used alongside this addon have changed, the supported versions are now:
- PHP 8.1 & 8.2
- Statamic 3.3
- Laravel 8
- You can now click the buttons on the cookie notice widget while the page is still loading #55 #56
- Fixed an issue for new users providing consent
- Cookie Notice now has events! You can listen to them to detect consent changes, then trigger the relevant third-party scripts. #54
- The Cookie Notice view is 'translatable' out-of-the-box now #51 #52
- Statamic 3.3 support
- Dropped support for Statamic 3.0 and Statamic 3.1
- The JavaScript code can be included in a different place than the Notice itself #48 #49
- Fixed issue with
hasConsent
if 'cookie notice cookie' does not exist #45
- Fixed TailwindCSS classes being purged incorrectly #44
- Support for Statamic 3.2
- Fixed bug in new update script I added to display warnings when updating to v5.
- Added a
z-index
to the cookie notice wrapper (hopefully fixes #41)
- Fixed bug in new update script I added to display warnings when updating to v5.
- When upgrading to v5, you'll now get warnings about breaking changes if they affect you.
- Fixed issue with CSS not being compiled properly
This release resolves an issue in the publish workflow of the previous release. Please review v5.0.0 for the changelog.
Cookie Notice is now compatible with Static Caching!
- Now compatible with static caching #40
Assets
All users of this addon will need to re-publish Cookie Notice's assets after updating.
php artisan vendor:publish --tag=cookie-notice-assets
Antlers view
If you've chosen to publish Cookie Notices views so you can edit them (they'll exist in resources/views/vendor
), you will need to re-publish the views and make your changes again. Changes had to be made to support static caching.
php artisan vendor:publish --tag=cookie-notice-views
Checking for consent
Additionally, if you're checking for a user's consent anywhere, you'll need to do this using JavaScript instead of the Antlers tags.
Before
Now
if (window.cookieNotice.hasConsent()) {
// has consented to something
}
if (window.cookieNotice.hasConsent("Marketing")) {
// marketing scripts
}
- The cookie notice will no longer show in Live Preview #42
- Refactored view to use Antlers, instead of Blade
- Allow for using globals inside the cookie notice view #27
This release shouldn't be a breaking change if you're coming from v3. However, I've marked it as such in case there are any unintended side affects.
You should be able to continue using your Blade cookie notice views for as long as you like. Or if you like, you could switch it around for Antlers. It really doesn't matter which one you use.