Add GPC support to OneTrust cookie banner#1134
Merged
nolannbiron merged 7 commits intomainfrom Feb 26, 2026
Merged
Conversation
When Global Privacy Control is enabled, hide Accept/Reject buttons and show a localized "Done" button that rejects all cookies.
🦋 Changeset detectedLatest commit: 081495b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Global Privacy Control (GPC) behavior to the OneTrust cookie banner so that, when GPC is enabled, users aren’t presented with Accept/Reject options and instead can dismiss via a single “Done” action that rejects all cookies.
Changes:
- Add a locale→label map for a new “Done” banner button.
- When GPC is enabled, hide OneTrust Accept/Reject buttons and append a “Done” button that triggers reject-all behavior.
- Add a changeset bump for
@gitbook/integration-onetrust.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| integrations/onetrust/src/script.raw.js | Adds GPC-specific UI behavior and localization for a new “Done” action in the OneTrust banner. |
| .changeset/bright-dogs-spend.md | Declares a patch release for the OneTrust integration to ship the GPC banner behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gregberge
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Global Privacy Control is enabled, hide Accept/Reject buttons and show a localized "Done" button that rejects all cookies.