Skip to content

fix margin and links#144

Merged
henri318 merged 1 commit into
mainfrom
fix/margin_and_links
Jul 13, 2026
Merged

fix margin and links#144
henri318 merged 1 commit into
mainfrom
fix/margin_and_links

Conversation

@henri318

@henri318 henri318 commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Mejoras de interfaz

    • Se ajustó el espaciado y la distribución visual en formularios, perfiles, cabeceras y páginas de productos.
    • Se reorganizó el contenido de los formularios y del detalle de pedidos para mejorar su presentación.
    • Los enlaces de retorno incorporan un espaciado vertical más consistente.
  • Correcciones

    • Se corrigió la estructura visual del detalle de pedidos.
    • En el carrito vacío, “Explorar productos” dirige ahora a la página principal localizada.
  • Pruebas

    • Se actualizaron las comprobaciones del carrito para reflejar la nueva navegación.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Se 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.

Changes

Reorganización de layouts

Layer / File(s) Summary
Separación de estilos de layout
app/[locale]/admin/sellers/create/page.module.css, app/[locale]/auth/change-password/page.module.css, app/[locale]/orders/[orderId]/page.module.css, app/[locale]/products/[id]/page.module.css, app/[locale]/profile/page.module.css, app/[locale]/seller/products/product-form.module.css, shared/ui/back-link.module.css
Se eliminan configuraciones flex redundantes, se corrige la delimitación de reglas CSS, se separan los estilos grid del formulario y se añade margen vertical al enlace compartido.
Contenedor del detalle de pedido
app/[locale]/orders/[orderId]/page.tsx
El resumen, los artículos y el reintento de pago quedan agrupados dentro de styles.content, sin cambios en la lógica de presentación.
Contenedores de formularios y encabezados
app/[locale]/admin/sellers/[sellerId]/products/page.tsx, app/[locale]/admin/sellers/[sellerId]/products/page.module.css, app/[locale]/seller/products/product-form.tsx
Se incorporan contenedores headerTop y content para separar el espaciado y la estructura del formulario, manteniendo el estado y los eventos existentes.

Navegación del carrito vacío

Layer / File(s) Summary
Destino de la CTA del carrito
modules/cart/presentation/components/cart-popup.tsx, modules/cart/presentation/components/cart-view.tsx, tests/unit/app/cart/cart-view.test.tsx, tests/unit/modules/presentation/components/cart-popup.test.tsx
Las CTA del estado vacío navegan a /${locale}/; las pruebas actualizan el href esperado y el mock de usePathname.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed El título refleja los dos ejes principales del cambio: ajustes de márgenes y actualización de enlaces.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/margin_and_links

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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8dc853d and 15e05e7.

📒 Files selected for processing (15)
  • app/[locale]/admin/sellers/[sellerId]/products/page.module.css
  • app/[locale]/admin/sellers/[sellerId]/products/page.tsx
  • app/[locale]/admin/sellers/create/page.module.css
  • app/[locale]/auth/change-password/page.module.css
  • app/[locale]/orders/[orderId]/page.module.css
  • app/[locale]/orders/[orderId]/page.tsx
  • app/[locale]/products/[id]/page.module.css
  • app/[locale]/profile/page.module.css
  • app/[locale]/seller/products/product-form.module.css
  • app/[locale]/seller/products/product-form.tsx
  • modules/cart/presentation/components/cart-popup.tsx
  • modules/cart/presentation/components/cart-view.tsx
  • shared/ui/back-link.module.css
  • tests/unit/app/cart/cart-view.test.tsx
  • tests/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

Comment on lines 8 to +14
margin-bottom: var(--spacing-lg);
}

.headerTop {
margin-bottom: var(--spacing-md);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 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.

Suggested change
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/',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 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.

@henri318
henri318 merged commit cbe0e68 into main Jul 13, 2026
5 checks passed
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.

1 participant