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

Docs: Add UPGRADE guide for version 3 #402

Open
wants to merge 1 commit into
base: release/v3
Choose a base branch
from

Conversation

OndraM
Copy link
Member

@OndraM OndraM commented Jan 7, 2025

WIP, but should contain almost everything notable.

@OndraM OndraM added the documentation Improvements or additions to documentation label Jan 7, 2025
@OndraM OndraM added this to the 3.0 milestone Jan 7, 2025
Copy link

netlify bot commented Jan 7, 2025

Deploy Preview for cookie-consent-manager ready!

Name Link
🔨 Latest commit c1af73c
🔍 Latest deploy log https://app.netlify.com/sites/cookie-consent-manager/deploys/677fd1069f74d900085a7094
😎 Deploy Preview https://deploy-preview-402--cookie-consent-manager.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@OndraM OndraM force-pushed the docs/upgrade-guide-v3 branch 3 times, most recently from 8053b5b to 0151d80 Compare January 9, 2025 13:33
Base automatically changed from bc/almacareer-org to release/v3 January 9, 2025 13:34
@OndraM OndraM force-pushed the docs/upgrade-guide-v3 branch from 0151d80 to 94c2dca Compare January 9, 2025 13:35
@OndraM OndraM marked this pull request as ready for review January 9, 2025 13:35
@OndraM OndraM requested a review from literat as a code owner January 9, 2025 13:35
@OndraM OndraM force-pushed the docs/upgrade-guide-v3 branch from 94c2dca to c1af73c Compare January 9, 2025 13:37
Release 3.0 includes backward-incompatible changes, including changes in the underlying vanilla-cookieconsent library,
which has also been upgraded from version 2 to 3.

This guide summarizes relevant changes in both `almacareer/cookie-consent` and `(vanilla-cookieconsent)[https://github.com/orestbida/cookieconsent]`
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
This guide summarizes relevant changes in both `almacareer/cookie-consent` and `(vanilla-cookieconsent)[https://github.com/orestbida/cookieconsent]`
This guide summarizes relevant changes in both `@almacareer/cookie-consent` and `(vanilla-cookieconsent)[https://github.com/orestbida/cookieconsent]`

This guide summarizes relevant changes in both `almacareer/cookie-consent` and `(vanilla-cookieconsent)[https://github.com/orestbida/cookieconsent]`
library to help you upgrade your codebase.

## Library npm namespace changed to `@almacareer`
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
## Library npm namespace changed to `@almacareer`
## Library npm scope changed to `@almacareer`

Technically, it is a scope - https://docs.npmjs.com/cli/v9/using-npm/scope

+"@almacareer/cookie-consent": "^3.0.0"
```

If you use the library via CDN, update URL to styles and script:
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
If you use the library via CDN, update URL to styles and script:
If you use the library via CDN, update the URL to styles and script:


Also, the typescript type has been renamed from `LmcCookieConsentManager` to `CookieConsentManager`.

## Data attribute to open the cookie preference window changed
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
## Data attribute to open the cookie preference window changed
## The data attribute to open the cookie preference window has changed


## Data attribute to open the cookie preference window changed

The `data-cc` attribute used to open the cookie settings window has been changed from `c-settings` to `show-preferencesModal`.
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
The `data-cc` attribute used to open the cookie settings window has been changed from `c-settings` to `show-preferencesModal`.
The `data-cc` attribute that opened the cookie settings window has been changed from `c-settings` to `show-preferencesModal`.

```

> [!NOTE]
> It is legally required to provide the user a link to change cookie preferences even after the consent was given for the first time.
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
> It is legally required to provide the user a link to change cookie preferences even after the consent was given for the first time.
> It is legally required to provide the user with a link to change cookie preferences even after the first consent is given

## Cookie has been renamed

The cookie storing the consent data has been changed from `lmc_ccm` to `almacareer_ccm`. If you directly read the cookie value
(either on backend or on frontend), you need to update the cookie name.
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
(either on backend or on frontend), you need to update the cookie name.
(either on the backend or on the frontend), you need to update the cookie name.

> This is expected and inevitable behavior with this change, as there is no legal way to migrate the old cookie to the
> new one, as we technically can't transfer the validity period of the old consent to the new cookie.

## Cookie content structure changed
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
## Cookie content structure changed
## The cookie content structure has changed

}
```

## Data atribute to run third party scripts changed
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
## Data atribute to run third party scripts changed
## Data attribute to run third-party scripts has changed

To be in line with the `vanilla-cookieconsent` library terminology, the term "preferences" is used instead of "settings".
If you used `translationOverrides` configuration, the key `settingsModalMoreInfo` has been renamed to `preferencesModalMoreInfo`.

## Secondary button mode config removed
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
## Secondary button mode config removed
## The secondary button mode config was removed


Configuration option `secondaryButtonMode` has been removed.

The consent dialog now always has primary button "Accept all" and secondary button "Accept necessary"
Copy link
Contributor

@literat literat Jan 10, 2025

Choose a reason for hiding this comment

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

suggestion:

Suggested change
The consent dialog now always has primary button "Accept all" and secondary button "Accept necessary"
The consent dialog now always has a primary button "Accept all" and a secondary button "Accept necessary"

## Other notable changes

- Legacy CommonJS support (CJS) has been removed. Use ESM import syntax instead.
- `cookieTable` configuration does not affect in any way any cookies. Cookie table is used only for listing the cookies in preferences modal.
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
- `cookieTable` configuration does not affect in any way any cookies. Cookie table is used only for listing the cookies in preferences modal.
- `cookieTable` configuration does not affect in any way any cookies. The cookie table is used only for listing the cookies in the preferences modal.

@literat
Copy link
Contributor

literat commented Jan 10, 2025

I have run your docs through the Grammarly app and added some suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants