Skip to content

[SUPERSEDED] Lovable sync 1779811437#464

Closed
adm01-debug wants to merge 21 commits into
mainfrom
lovable-sync-1779811437
Closed

[SUPERSEDED] Lovable sync 1779811437#464
adm01-debug wants to merge 21 commits into
mainfrom
lovable-sync-1779811437

Conversation

@adm01-debug
Copy link
Copy Markdown
Owner

@adm01-debug adm01-debug commented May 26, 2026

Fechado: versão intermediária supersedida pelo PR #465 (lovable-sync-1779811798). O #465 contém conteúdo idêntico + mais completo (COLUMN_CLASSES, data-testid, E2E tests).


Summary by cubic

Unifies grid column behavior across product views and persists the user’s column choice. Adds accessibility, keyboard support, and tests for the Column Selector while removing duplicated grid class maps.

  • New Features

    • Persist column count in localStorage via STORAGE_KEY ('product-grid-columns') and use it across products, novelties, replenishments, collections, filters, and favorites.
    • Accessibility: radiogroup/radio roles, aria-checked, focus styles, and keyboard selection (Enter/Space).
    • Tests for ColumnSelector: persistence, responsive filtering, auto-clamping, and keyboard navigation.
  • Refactors

    • Centralized grid classes in COLUMN_CLASSES; removed per-component mappings and unified usage in all grids.
    • Exported getDefaultColumns and standardized responsive clamping to cap columns by breakpoint.
    • Setter callbacks now sync localStorage; removed redundant keys/constants where duplicated.

Written for commit 159c973. Summary will update on new commits. Review in cubic

lovable-dev Bot and others added 21 commits May 26, 2026 16:01
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
X-Lovable-Edit-ID: edt-65367ce7-14f5-4395-a51d-c85d05a6f978
Co-authored-by: adm01-debug <231131902+adm01-debug@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 26, 2026 16:09
@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

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

Project Deployment Actions Updated (UTC)
we-dream-big Ready Ready Preview, Comment May 26, 2026 4:10pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Warning

Review limit reached

@adm01-debug, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 35 minutes and 20 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9b352629-21e1-4be9-874f-c0e562d5b82e

📥 Commits

Reviewing files that changed from the base of the PR and between fa7ad6d and 159c973.

📒 Files selected for processing (10)
  • src/components/novelties/NoveltyProductGrid.tsx
  • src/components/products/ColumnSelector.test.tsx
  • src/components/products/ColumnSelector.tsx
  • src/components/products/ProductGrid.tsx
  • src/components/replenishments/ReplenishmentProductGrid.tsx
  • src/components/replenishments/grid-layout.ts
  • src/hooks/products/useCatalogState.ts
  • src/pages/collections/useCollectionsPageState.ts
  • src/pages/filters/useFiltersPageState.ts
  • src/pages/products/FavoritesPage.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lovable-sync-1779811437

Comment @coderabbitai help to get the list of available commands and usage tips.

@supabase
Copy link
Copy Markdown

supabase Bot commented May 26, 2026

This pull request has been ignored for the connected project doufsxqlfjyuvxuezpln because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

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

Este PR centraliza a persistência e o mapeamento de classes do grid de produtos (colunas) para reduzir duplicação entre páginas/grids, adicionando também testes e pequenos ajustes de acessibilidade no seletor de colunas.

Changes:

  • Exporta STORAGE_KEY/getDefaultColumns e centraliza classes em COLUMN_CLASSES no ColumnSelector.
  • Padroniza o uso da chave de colunas (via STORAGE_KEY) e adiciona persistência em localStorage em múltiplos states/hooks.
  • Ajusta lógica de “responsive clamp” de colunas e adiciona teste unitário para ColumnSelector.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/pages/products/FavoritesPage.tsx Passa a usar STORAGE_KEY compartilhada para persistir colunas do grid.
src/pages/filters/useFiltersPageState.ts Persiste colunas via STORAGE_KEY e melhora clamp responsivo por breakpoint.
src/pages/collections/useCollectionsPageState.ts Persiste colunas via STORAGE_KEY no state da página de coleções.
src/hooks/products/useCatalogState.ts Ajusta clamp responsivo e mantém persistência de colunas via STORAGE_KEY.
src/components/replenishments/ReplenishmentProductGrid.tsx Persiste seleção de colunas via STORAGE_KEY.
src/components/replenishments/grid-layout.ts Remove duplicação de map de classes e reutiliza COLUMN_CLASSES.
src/components/products/ProductGrid.tsx Reutiliza COLUMN_CLASSES para manter consistência entre grids.
src/components/products/ColumnSelector.tsx Exporta constantes/funções, adiciona COLUMN_CLASSES, melhora ARIA do seletor.
src/components/products/ColumnSelector.test.tsx Adiciona testes para render/clamp/persistência/teclado do seletor.
src/components/novelties/NoveltyProductGrid.tsx Reutiliza COLUMN_CLASSES e persiste colunas via STORAGE_KEY.

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

Comment on lines +9 to +15
export const COLUMN_CLASSES: Record<ColumnCount, string> = {
3: "grid-cols-3",
4: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4",
5: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5",
6: "grid-cols-3 sm:grid-cols-4 md:grid-cols-5 lg:grid-cols-6",
8: "grid-cols-4 sm:grid-cols-5 md:grid-cols-6 lg:grid-cols-8",
};
import { useReducedMotion } from "@/hooks/ui/useReducedMotion";
import { SelectionCheckbox } from "@/components/common/SelectionCheckbox";
import { cn } from "@/lib/utils";
import { COLUMN_CLASSES, type ColumnCount } from "./ColumnSelector";
Comment on lines +37 to +40
const options = [3, 4, 5, 6, 8];
options.forEach(cols => {
expect(screen.getByRole("radio", { name: `${cols} colunas` })).toBeInTheDocument();
});
@adm01-debug adm01-debug changed the title Lovable sync 1779811437 [SUPERSEDED] Lovable sync 1779811437 May 26, 2026
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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