[go: up one dir, main page]

Skip to content

Draft: Add data-ot-ignore attribute to JavaScript files

What does this MR do and why?

  • Adds a data-ot-ignore to all JavaScript files that do not set cookies.
  • Separates banner-related functionality into its own file. The banner does set a cookie, so it needs to be blockable by OneTrust. We do not, however, want OneTrust to block default.js since this breaks a lot of functionality on the site.

Just a draft for now. If this is the correct way to handle these going forward, we'll also need to document this.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
  2. Enable a banner by editing content/_data/banner.yaml, and verify it still renders as before.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading