fix margin and links#144
Conversation
📝 WalkthroughWalkthroughSe reorganizan contenedores y estilos de varias páginas, se corrige la estructura CSS del detalle de pedido, se añade espaciado compartido y la CTA del carrito vacío pasa a dirigir a la portada localizada. ChangesReorganización de layouts
Navegación del carrito vacío
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/`[locale]/admin/sellers/[sellerId]/products/page.module.css:
- Around line 8-14: Renombra el selector CSS `.headerTop` a `.header-top` para
cumplir la convención kebab-case de Stylelint y actualiza la referencia
correspondiente `styles.headerTop` en el componente para usar
`styles['header-top']`.
In `@tests/unit/modules/presentation/components/cart-popup.test.tsx`:
- Line 17: En el mock de usePathname del test, conserva el pathname original no
raíz para mantener el escenario de apertura existente. En la prueba del
componente de carrito, verifica explícitamente que router.push sea llamado con
«/es/» al activar la CTA, usando el mock del router ya disponible.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: fee2aefd-19d0-4fc1-9160-8e990402182b
📒 Files selected for processing (15)
app/[locale]/admin/sellers/[sellerId]/products/page.module.cssapp/[locale]/admin/sellers/[sellerId]/products/page.tsxapp/[locale]/admin/sellers/create/page.module.cssapp/[locale]/auth/change-password/page.module.cssapp/[locale]/orders/[orderId]/page.module.cssapp/[locale]/orders/[orderId]/page.tsxapp/[locale]/products/[id]/page.module.cssapp/[locale]/profile/page.module.cssapp/[locale]/seller/products/product-form.module.cssapp/[locale]/seller/products/product-form.tsxmodules/cart/presentation/components/cart-popup.tsxmodules/cart/presentation/components/cart-view.tsxshared/ui/back-link.module.csstests/unit/app/cart/cart-view.test.tsxtests/unit/modules/presentation/components/cart-popup.test.tsx
💤 Files with no reviewable changes (4)
- app/[locale]/profile/page.module.css
- app/[locale]/auth/change-password/page.module.css
- app/[locale]/admin/sellers/create/page.module.css
- app/[locale]/products/[id]/page.module.css
| margin-bottom: var(--spacing-lg); | ||
| } | ||
|
|
||
| .headerTop { | ||
| margin-bottom: var(--spacing-md); | ||
| } | ||
|
|
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Renombrar .headerTop a kebab-case según la convención de Stylelint.
Stylelint reporta un error en la línea 11: el selector .headerTop debería ser kebab-case (selector-class-pattern). La corrección requiere actualizar también la referencia en app/[locale]/admin/sellers/[sellerId]/products/page.tsx línea 69, cambiando styles.headerTop a styles['header-top'].
♻️ Corrección propuesta
.header {
margin-bottom: var(--spacing-lg);
}
-.headerTop {
+.header-top {
margin-bottom: var(--spacing-md);
}Y en app/[locale]/admin/sellers/[sellerId]/products/page.tsx:
- <div className={styles.headerTop}>
+ <div className={styles['header-top']}>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| margin-bottom: var(--spacing-lg); | |
| } | |
| .headerTop { | |
| margin-bottom: var(--spacing-md); | |
| } | |
| margin-bottom: var(--spacing-lg); | |
| } | |
| .header-top { | |
| margin-bottom: var(--spacing-md); | |
| } |
🧰 Tools
🪛 Stylelint (17.14.0)
[error] 11-11: Expected class selector ".headerTop" to be kebab-case (selector-class-pattern)
(selector-class-pattern)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@app/`[locale]/admin/sellers/[sellerId]/products/page.module.css around lines
8 - 14, Renombra el selector CSS `.headerTop` a `.header-top` para cumplir la
convención kebab-case de Stylelint y actualiza la referencia correspondiente
`styles.headerTop` en el componente para usar `styles['header-top']`.
Source: Linters/SAST tools
| vi.mock('next/navigation', () => ({ | ||
| useRouter: () => ({ push: vi.fn() }), | ||
| usePathname: () => '/es/products', | ||
| usePathname: () => '/es/', |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Conserva un pathname no raíz y verifica explícitamente el destino.
/es/products y /es/ producen el mismo locale (es), así que este cambio solo modifica el escenario de apertura y no comprueba que la CTA navegue realmente a /es/. Mantén el pathname original y verifica explícitamente la llamada a router.push('/es/').
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/unit/modules/presentation/components/cart-popup.test.tsx` at line 17,
En el mock de usePathname del test, conserva el pathname original no raíz para
mantener el escenario de apertura existente. En la prueba del componente de
carrito, verifica explícitamente que router.push sea llamado con «/es/» al
activar la CTA, usando el mock del router ya disponible.
Summary by CodeRabbit
Mejoras de interfaz
Correcciones
Pruebas