Skip to content

Update Consent Storage#992

Open
Niyibitanga wants to merge 1 commit intomasterfrom
ninosa/Source
Open

Update Consent Storage#992
Niyibitanga wants to merge 1 commit intomasterfrom
ninosa/Source

Conversation

@Niyibitanga
Copy link
Copy Markdown
Contributor

Update to store consent type as the values used for processing instead of object sent by site.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the consent storage mechanism to store consent data using the internal processing format (ConsentData with BooleanFlag values) instead of the external API format (ConsentState with string values). This eliminates redundant conversions and simplifies the consent tracking flow.

Key Changes:

  • Changed internal storage type from ConsentState (string-based) to ConsentData (BooleanFlag-based)
  • Added getConsentState() helper function to convert internal format to external format when needed
  • Simplified consent initialization and tracking by removing intermediate conversions
Comments suppressed due to low confidence (1)

packages/clarity-js/src/data/metadata.ts:159

  • Avoid automated semicolon insertion (94% of all statements in the enclosing function have an explicit semicolon).
  }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/clarity-js/src/data/metadata.ts
Comment thread packages/clarity-js/src/data/metadata.ts
Comment thread packages/clarity-js/src/data/metadata.ts Outdated
Comment thread packages/clarity-js/src/data/metadata.ts Outdated
Comment thread packages/clarity-js/src/data/metadata.ts Outdated
Comment thread packages/clarity-js/src/data/metadata.ts Outdated
Comment thread packages/clarity-js/src/data/metadata.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread packages/clarity-js/src/data/metadata.ts
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.

3 participants