Skip to content

ERA-11250 Swap in new cookie manager by Osana#1241

Merged
chrisj-er merged 13 commits intodevelopfrom
ERA-11250
Mar 25, 2026
Merged

ERA-11250 Swap in new cookie manager by Osana#1241
chrisj-er merged 13 commits intodevelopfrom
ERA-11250

Conversation

@chrisj-er
Copy link
Copy Markdown
Contributor

What does this PR do?

Swapping out OneTrust with Osana
feat: Osana cookie manager

How does it look

Relevant link(s)

Comment thread src/UserMenu/index.js
<Dropdown.Divider />
</>}

<Dropdown.Item onClick={() => cookieSettingsRef.current.click()}>{t('cookieSettingsItem')}</Dropdown.Item>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like we can do a bit more cleanup in this file. The following lines can go away:

// Line 1 (just the useRef import)
import React, { useRef } from 'react';
...
// Line 17
const cookieSettingsRef = useRef();
...
// Line 28
<button className="ot-sdk-show-settings" hidden id="ot-sdk-btn" ref={cookieSettingsRef} />

Comment thread src/index.js Outdated

useEffect(() => {
if (window?.OneTrust) {
if (typeof window !== 'undefined' && window.Osano) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We usually go for optional chaining, so we can keep the code as it was, just changing the property:

if (window?.Osano) {

It's logically the same.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

^^that. window?.Osano?.cm is a step safer as well, since it checks for the target object receiving a property in this code.

Comment thread src/UserMenu/index.js Outdated
</>}

<Dropdown.Item onClick={() => cookieSettingsRef.current.click()}>{t('cookieSettingsItem')}</Dropdown.Item>
{window.Osano?.cm && (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's add some optional chaining to the window object (like window?.Osano?.cm) so we're not set up for future failures in headless test environments.

@amicavi
Copy link
Copy Markdown
Contributor

amicavi commented Mar 31, 2025

Before merging this ticket, please consider the impact this could have on GDPR

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

25 similar comments
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 1, 2026

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 2, 2026

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 4, 2026

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 5, 2026

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 7, 2026

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 8, 2026

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 9, 2026

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

@github-actions
Copy link
Copy Markdown

🗑️ Environment torn down due to inactivity

chrisj-er added 2 commits March 25, 2026 13:45
Replaced typeof window !== 'undefined' && window.Osano with window?.Osano?.cm. Removed the no-op locale fallback logic
Fixed indentation on the <% if %> block to align with surrounding content.
@chrisj-er chrisj-er merged commit dbff2fc into develop Mar 25, 2026
6 checks passed
@chrisj-er chrisj-er deleted the ERA-11250 branch March 25, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants