Skip to content

Make product badge optional and refine UI - #21

Merged
siconeli1 merged 2 commits into
mainfrom
revamp-ui-ux
Mar 28, 2026
Merged

siconeli1 merged 2 commits into
mainfrom
revamp-ui-ux

Conversation

@siconeli1

Copy link
Copy Markdown
Collaborator

Remove the implicit "Destaque" fallback for product badges across normalizers, repository, CSV import, provider and seed data so badges are optional by default. Add a Supabase migration to set products.badge default to an empty string and update existing rows. Update product page rendering to only show the badge when present (or when product is unavailable). Also tweak product card styles: background gradient, centered/contained images, padding, rounded borders and subtle scale/transition adjustments for improved visuals.

Remove the implicit "Destaque" fallback for product badges across normalizers, repository, CSV import, provider and seed data so badges are optional by default. Add a Supabase migration to set products.badge default to an empty string and update existing rows. Update product page rendering to only show the badge when present (or when product is unavailable). Also tweak product card styles: background gradient, centered/contained images, padding, rounded borders and subtle scale/transition adjustments for improved visuals.
Copilot AI review requested due to automatic review settings March 28, 2026 03:40
@vercel

vercel Bot commented Mar 28, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
li-rilko Ready Ready Preview, Comment Mar 28, 2026 3:40am

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Makes product “badge” optional throughout the catalog pipeline and refines some product UI styling, removing the previous implicit "Destaque" fallback behavior.

Changes:

  • Removes "Destaque" badge fallbacks across CSV import, normalizers, repository snapshot building, provider normalization, and seed/base catalog data.
  • Adds a Supabase migration to change products.badge default to an empty string and updates existing rows.
  • Updates product page to only render the badge when it exists (or when the product is unavailable) and tweaks product card media styles (gradient, contain/center images, padding, borders, scaling).

Reviewed changes

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

Show a summary per file
File Description
supabase/migrations/20260328_000003_product_badge_optional.sql Changes DB default for products.badge and attempts to normalize existing rows.
lib/products-csv-import.js Stops defaulting imported badges to "Destaque"; imports empty when missing.
lib/catalog-repository.js Removes badge fallback in payload normalization and snapshot mapping.
lib/catalog-normalizer.js Removes badge fallback during catalog sanitization and input normalization.
components/providers/catalog-provider.js Removes badge fallback when normalizing provider products.
lib/catalog-data.js Removes badges from base in-memory seed products.
data/catalog-seed.json Removes badges from JSON seed catalog entries.
app/produto/[id]/page.js Renders gallery badge only if unavailable or badge is non-empty.
app/globals.css Refines product card media presentation and hover scaling.

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


update public.products
set badge = ''
where badge is distinct from '';

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

The UPDATE condition where badge is distinct from '' will match every row whose badge is not already an empty string (including non-empty badges), so this migration will wipe all existing badge values. If the intent is only to remove the previous implicit default (e.g., convert NULLs and/or the old default value 'Destaque' to empty), restrict the WHERE clause accordingly (e.g., where badge is null or badge = 'Destaque').

Suggested change
where badge is distinct from '';
where badge is null;

Copilot uses AI. Check for mistakes.
@siconeli1
siconeli1 merged commit 8764817 into main Mar 28, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 5f085fd5 Deployed Mar 28, 2026 by vercel[bot]
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.

2 participants