Repository navigation
Refactor home hero, catalog UI, product fallback - #19
Conversation
Simplify and tidy up home hero styles and markup, improve responsiveness, and add a product image fallback. - CSS: remove some heavy hero/brand-card styles, introduce .home-hero-logo and .home-store-name, adjust layout/positioning for category count and padding for better responsive behavior. - app/page.js: update hero copy, replace branded card + metrics with a single decorative hero image (aria-hidden) and remove the proof list; remove category icon initial rendering from category cards. - components/catalog-page-content.js: shorten the search placeholder, remove unused TransitionLink import and the contact link. - components/product-card.js: add imageSrc fallback logic and use it for product images to avoid broken/empty image sources. These changes aim to streamline the home hero presentation, tighten the catalog UI, and make product images more robust.
|
@siconeli1 is attempting to deploy a commit to the arielaio's projects team on Vercel, but is not a member of this team. To resolve this issue, you can:
To read more about collaboration on Vercel, click here. |
There was a problem hiding this comment.
Pull request overview
This PR streamlines the home page hero and catalog UI, improves responsive styling, and hardens product image rendering by adding a fallback when a product image is missing/blank.
Changes:
- Refactors the home hero markup/copy and simplifies the visual panel to a single decorative image.
- Tightens catalog UI by shortening search placeholder text and removing an extra contact link/import.
- Adds
imageSrcfallback logic inProductCardto avoid empty/brokensrcattributes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
components/product-card.js |
Adds a default image fallback and uses it in the product card image. |
components/catalog-page-content.js |
Removes unused TransitionLink import/contact link and shortens search placeholder. |
app/page.js |
Simplifies hero content/panel and removes category-card initial icon rendering. |
app/globals.css |
Updates home hero/category card styling for the refactored layout and responsiveness. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <img | ||
| className="home-hero-logo" | ||
| src="/logo-li-rilko-imports.png" | ||
| alt="Logo Li Rilko Imports" |
There was a problem hiding this comment.
The hero panel is marked aria-hidden="true", but the nested logo image still has a meaningful alt. Because the whole subtree is hidden from assistive tech, that alt will never be exposed (and it’s unclear whether the logo is decorative or informative). Either remove aria-hidden if the logo should be announced, or keep it decorative and set the image alt to an empty string (and/or use presentation semantics).
| alt="Logo Li Rilko Imports" | |
| alt="" |
| <h1> | ||
| Novidades <span className="home-store-name">Li Rilko</span> para renovar seu estilo. | ||
| </h1> | ||
| <p>Escolhas selecionadas da loja para você comprar com praticidade e atendimento próximo.</p> |
There was a problem hiding this comment.
The hero refactor removed the proof list / brand card / metrics markup, but related CSS still exists (e.g., .home-proof-list, .home-metrics-grid, .home-metric-card in app/globals.css). Consider deleting the now-unused styles to avoid dead CSS and make future home hero changes easier.
| <input | ||
| type="text" | ||
| placeholder="Buscar por produto, categoria ou característica" | ||
| placeholder="Buscar" |
There was a problem hiding this comment.
The search input relies on the placeholder text for its accessible name. Since placeholders are not a reliable substitute for a label (and the new placeholder is shorter), add an explicit accessible label (e.g., a visually-hidden <label> or an aria-label) so screen readers can identify the field consistently.
| placeholder="Buscar" | |
| placeholder="Buscar" | |
| aria-label="Buscar produtos no catálogo" |
Introduce a back button to the product detail page and associated styles. Import useRouter and add handleBack which uses router.back() when history exists, falling back to router.push('/catalogo') otherwise. Add button markup ("Voltar" with left arrow) inside a vg-product-back-row and new CSS for .vg-product-back-btn (.vg-product-back-row hidden by default and displayed in the responsive/mobile rules). This improves navigation for users landing directly on product pages or navigating from within the app.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Rework layout and sizing for product action controls: prevent wrapping in modal, set fixed icon size (.vg-add-btn .icon), convert .vg-action-row to a two-column grid with gap and alignment, make .vg-qty-selector width auto, and add compact sizing (min-width, font-size, gap, padding-inline) for .vg-add-btn to improve responsive spacing and alignment.
Simplify and tidy up home hero styles and markup, improve responsiveness, and add a product image fallback.
These changes aim to streamline the home hero presentation, tighten the catalog UI, and make product images more robust.