feat: add 'Understood' button for legal banner#928
Open
Ritinpaul wants to merge 1 commit intoopenfoodfacts:mainfrom
Open
feat: add 'Understood' button for legal banner#928Ritinpaul wants to merge 1 commit intoopenfoodfacts:mainfrom
Ritinpaul wants to merge 1 commit intoopenfoodfacts:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
|
@teolemon do we want to make the banner go away forever? |
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.
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 withlocalStorageso it survives page refreshes.Furthermore, during implementation, I updated the SDK usage to resolve
AttributeGroupV2TypeScript 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):

2. Hover State:

3. Clicked/Dismissed State (Banner Hidden):

Checklist:
Author Self-Review:
LLM Usage Disclosure:
Please be transparent about the use of AI assistance.