Repository navigation
Refactor/admin ux and styling - #17
Conversation
…X no catálogo e carrinho
…X no catálogo e carrinho
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Refactors parts of the storefront/admin UX by adjusting navigation styling/behavior, expanding catalog sorting options, and enhancing the admin product modal inputs/validation.
Changes:
- Hide the WhatsApp floating widget on the cart route and tweak header/mobile drawer branding/styling.
- Expand catalog sorting (price + A–Z/Z–A) and update sort option labels/values.
- Improve Admin Product modal pricing UX (cash/installment), add badge/highlights fields, and tighten payload validation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| components/whatsapp-float-widget.js | Hides floating WhatsApp widget on /carrinho* routes via usePathname(). |
| components/site-header.js | Replaces mobile drawer brand text with a logo image. |
| components/catalog-page-content.js | Updates sort options/values and adds name-based sorting. |
| components/admin/admin-product-modal.js | Mirrors price fields on blur, adds validation for >0 prices, and adds badge/highlights inputs. |
| app/globals.css | Raises toast z-index and moves the mobile drawer to slide in from the right (plus overflow adjustments). |
Comments suppressed due to low confidence (1)
components/catalog-page-content.js:18
normalizeSort()now only accepts the newSORT_OPTIONSvalues. That means existing shared links/bookmarks using the previous query param values (e.g.ordem=menor-preco-vista/ordem=maior-preco-vista) will silently fall back torelevancia. Consider adding a small legacy mapping (old -> new) insidenormalizeSortbefore theallowedcheck to keep backward compatibility for existing URLs.
{ value: "nome-za", label: "Nome: Z-A" },
];
function normalizeSort(value) {
const allowed = new Set(SORT_OPTIONS.map((option) => option.value));
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| rows={3} | ||
| value={productForm.highlightsText} | ||
| onChange={(e) => handleProductField("highlightsText", e.target.value)} | ||
| placeholder="Ex: Couro Legítimo Acabamento Premium Garantia de 1 ano" |
There was a problem hiding this comment.
In JSX, the placeholder string won’t decode HTML entities like , so users will likely see the literal text instead of line breaks. Use a JS string with real newlines (e.g. "...\n..." via {}) if you want a multi-line placeholder.
| placeholder="Ex: Couro Legítimo Acabamento Premium Garantia de 1 ano" | |
| placeholder={"Ex: Couro Legítimo\nAcabamento Premium\nGarantia de 1 ano"} |
No description provided.