Skip to content

feat: add 'Understood' button for legal banner#928

Open
Ritinpaul wants to merge 1 commit intoopenfoodfacts:mainfrom
Ritinpaul:feat/legal-banner-dismiss
Open

feat: add 'Understood' button for legal banner#928
Ritinpaul wants to merge 1 commit intoopenfoodfacts:mainfrom
Ritinpaul:feat/legal-banner-dismiss

Conversation

@Ritinpaul
Copy link
Contributor

Description

This PR implements the "Understood" button for the legal copyright warning banner on the image upload step.
Fixes #816

Context & Motivation:
Previously, the copyright warning banner persistently displayed during the image upload step. This PR adds functionality allowing users to acknowledge the warning and dismiss the banner. The dismissal state (legalBannerDismissed) is persisted via a Svelte store synced with localStorage so it survives page refreshes.

Furthermore, during implementation, I updated the SDK usage to resolve AttributeGroupV2 TypeScript errors (as documented in code comments regarding upstream missing fields in the SDK).

Visuals & Design Note:
To keep the PR focused and functional, the design of the "Understood" button has been kept deliberately minimal (inheriting base Ghost button styles). This design serves as a functional baseline and can be improved or adjusted upon review.

Here are the states of the new button:

1. Normal State (Understood Button Visible):
media__1771594799144

2. Hover State:
media__1771594799180

3. Clicked/Dismissed State (Banner Hidden):
media__1771594799121


Checklist:

Author Self-Review:

  • I have performed a self-review of my own code.
  • I understand the changes I'm proposing and why they are needed.
  • My changes generate no new warnings or errors (linting, console).
  • I have made corresponding changes to the documentation (if applicable).

LLM Usage Disclosure:
Please be transparent about the use of AI assistance.

  • If I did use an AI Large Language Model, I have reviewed the generated code/text to ensure its accuracy, security, and relevance to the project's context and licensing.

@vercel
Copy link

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer Ready Ready Preview, Comment Feb 20, 2026 2:42pm

@VaiTon
Copy link
Member

VaiTon commented Feb 20, 2026

@teolemon do we want to make the banner go away forever?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Add a "Understood" button that hides the Legal banner thanks to a cookie

2 participants