Skip to content

chore: WPB-26190 Add cookie consent banner - #42

Draft
MarianKijewski wants to merge 6 commits into
mainfrom
chore/WPB-26190_add_cookie_consent_banner
Draft

chore: WPB-26190 Add cookie consent banner#42
MarianKijewski wants to merge 6 commits into
mainfrom
chore/WPB-26190_add_cookie_consent_banner

Conversation

@MarianKijewski

Copy link
Copy Markdown
Contributor

PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

No way to ask documentation readers for permission to track and analyze their site usage.

Solutions

Introduce cookie consent banner using this plugin: https://github.com/orestbida/cookieconsent, the additional Docusaurus logic:

Needs releases with:

Testing

How to Test

  • Run npm i and npm start, the page will open automatically.
  • The cookie banner should appear in bottom part of the screen and block access until action is taken.
  • In case you want to make it toggle your preferences, navigate to the footer and press on "Cookie Preferences" button.
  • In order to show initial banner again, you must clear the cookies.

Notes

This PR doesn't introduce tracking yet. It only asks for consent to do so.

Attachments

Light mode:
image

Dark mode:
image

Cookie settings:
image


References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

`npm i vanilla-cookieconsent@3.1.0`
This is done in order to have access to ColorModeProvider,
which allows to use `useColorMode` method.
All of that just to have cookie banner in same color mode.
Required in order to stay compliant.
The styling is added to preserve newlines in description.
acceptAllBtn: "Accept",
acceptNecessaryBtn: "Decline",
showPreferencesBtn: "Cookie settings",
footer: "<a href=\"#link\">Privacy Policy</a>"

@MarianKijewski MarianKijewski Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To be updated when Privacy Policy page is there

This is needed because the button to show cookie preferences needs to work on every page.
@MarianKijewski MarianKijewski self-assigned this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant