Conversation
…ter UI for compliance
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly overhauls the website's cookie and privacy consent mechanisms. It transitions from a custom, React-based cookie consent solution to a more integrated approach utilizing Google's consent mode and an updated Osano CMP. The changes aim to improve compliance with privacy regulations and streamline the user experience related to data consent, while also updating the visual presentation of legal information in the footer. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
📝 WalkthroughWalkthroughReplaces a custom cookie-consent/banner implementation with Osano: updates Osano script URL and GA bootstrap (local gtag pushing to dataLayer with expanded consent keys and settings), hides Osano widget via CSS, removes Root consent/analytics side-effects, and updates footer HTML to include legal links and an Osano “Preferences” button. Changes
sequenceDiagram
participant Browser
participant Site as Site (Root)
participant Osano
participant DataLayer as dataLayer/GA
Browser->>Site: Load page (no custom cookie banner)
Site-->>Browser: Render children
Browser->>Osano: Load updated Osano script
Osano-->>Browser: Determine consent (ad/analytics/personalization/functionality/security)
Osano->>DataLayer: Push consent update (respecting wait_for_update: 500)
Browser->>DataLayer: gtag() pushes events/pageviews when consent permits
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request successfully replaces the deprecated React cookie manager with Google's Consent Mode Platform (CMP) via Osano, updates the configuration, and adds new compliance links to the footer. My review includes suggestions to improve accessibility for the new footer links, enhance code maintainability by removing a temporary comment and redundant CSS, and restore TypeScript type declarations for better long-term stability.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
docusaurus.config.ts (1)
69-72: Please verify this Osano script is the production profile.The inline note reads like a launch-only override. Before merge, confirm this URL is the CMP config bound to
docs.opentdf.io; otherwise the live site can ship the wrong consent copy/categories.If helpful, I can sketch an env-backed constant here so stage/prod IDs do not get hand-edited in
main.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docusaurus.config.ts` around lines 69 - 72, The Osano CMP script URL in docusaurus.config.ts (attributes.src on the tagName "script" entry) appears to be a launch-time override; verify that the provided URL is the production profile bound to docs.opentdf.io and replace it with the confirmed production Osano config if it is not. If you want safer deployments, externalize the Osano ID/URL into an environment-backed constant (e.g., process.env.OSANO_CMP or a config constant used in docusaurus.config.ts) and reference that constant for attributes.src so stage/prod values are not hand-edited in main.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docusaurus.config.ts`:
- Around line 236-240: The new footer anchor tags for 'Terms', 'Privacy', and
'Cookie Policy' open targets in a new tab but lack rel hardening; update each
<a> element (the anchors with hrefs 'https://www.virtru.com/terms-of-service/',
'https://www.virtru.com/privacy-policy/', and
'https://www.virtru.com/cookie-policy') to include rel="noopener noreferrer"
alongside target="_blank" to match the rest of the external footer links.
- Line 242: Replace the anchor element that triggers Osano.cm.showDrawer with a
focusable button: change the element to <button type="button"
onclick="Osano.cm.showDrawer('osano-cm-dom-info-dialog-open')">Preferences <img
src="/img/privacyoptions.svg"></button> (serve the SVG locally by adding
privacyoptions.svg to the static/img/ directory). Also add CSS rules mirroring
.legal-container a (cursor, hover text-decoration, focus styles) to a new
.legal-container button selector in src/css/custom.css so the button visually
matches the anchor and remains keyboard-accessible.
---
Nitpick comments:
In `@docusaurus.config.ts`:
- Around line 69-72: The Osano CMP script URL in docusaurus.config.ts
(attributes.src on the tagName "script" entry) appears to be a launch-time
override; verify that the provided URL is the production profile bound to
docs.opentdf.io and replace it with the confirmed production Osano config if it
is not. If you want safer deployments, externalize the Osano ID/URL into an
environment-backed constant (e.g., process.env.OSANO_CMP or a config constant
used in docusaurus.config.ts) and reference that constant for attributes.src so
stage/prod values are not hand-edited in main.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3e8ba7fc-e5e3-46fe-ba1b-9b2c41ca342c
📒 Files selected for processing (3)
docusaurus.config.tssrc/css/custom.csssrc/theme/Root.tsx
be2f758 to
b03302a
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/css/custom.css (1)
213-233: Add keyboard-visible affordance for the legal preferences button.Line 227 only styles
:hover. Add:focus-visibleso keyboard users get equivalent feedback.Proposed CSS tweak
.legal-container button { color: var(--ifm-link-color); background: none; border: none; cursor: pointer; } -.legal-container button:hover { text-decoration: underline; } +.legal-container button:hover, +.legal-container button:focus-visible { text-decoration: underline; } +.legal-container button:focus-visible { + outline: 2px solid var(--ifm-color-primary); + outline-offset: 2px; +}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/css/custom.css` around lines 213 - 233, The button in .legal-container currently only provides a hover state (.legal-container button:hover) and needs an equivalent keyboard-visible affordance; add a :focus-visible rule (e.g., .legal-container button:focus-visible) that mirrors the hover styling (such as text-decoration: underline and any outline or box-shadow for accessibility) so keyboard users receive the same visual feedback as mouse users, and ensure the rule targets the same .legal-container button selector to keep behavior consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/css/custom.css`:
- Around line 213-233: The button in .legal-container currently only provides a
hover state (.legal-container button:hover) and needs an equivalent
keyboard-visible affordance; add a :focus-visible rule (e.g., .legal-container
button:focus-visible) that mirrors the hover styling (such as text-decoration:
underline and any outline or box-shadow for accessibility) so keyboard users
receive the same visual feedback as mouse users, and ensure the rule targets the
same .legal-container button selector to keep behavior consistent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0b48fd3f-33ee-456e-b739-5c19ec45435f
📒 Files selected for processing (3)
docusaurus.config.tssrc/css/custom.csssrc/globals.d.ts
✅ Files skipped from review due to trivial changes (1)
- docusaurus.config.ts
Summary by CodeRabbit
New Features
Changes