From 35eef2ff906114f572457b92fb7c0ff3ecefe49b Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 2 Jun 2026 10:58:43 +0200 Subject: [PATCH] feat(ui): mejorar la responsividad y estructura de PublicationsTable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Se ajustan los estilos en PublicationsTable para mejorar la responsividad en dispositivos móviles. Se modifica la estructura del componente para incluir un mensaje de estado cuando no se encuentran publicaciones y se optimizan los estilos de los elementos de entrada y botones. --- .../dashboard/PublicationsTable.jsx | 320 +++++++++++------- 1 file changed, 207 insertions(+), 113 deletions(-) diff --git a/frontend/src/components/dashboard/PublicationsTable.jsx b/frontend/src/components/dashboard/PublicationsTable.jsx index 3f7191e..2334fa2 100644 --- a/frontend/src/components/dashboard/PublicationsTable.jsx +++ b/frontend/src/components/dashboard/PublicationsTable.jsx @@ -258,7 +258,7 @@ export function PublicationsTable({ )}

-
+
-
+
@@ -366,123 +366,217 @@ export function PublicationsTable({ ) : loading ? ( ) : ( - - - - - {COLUMNS.map((col) => ( - - ))} - - - + <> +
{filtered.length === 0 ? ( -
- - +

+ No se encontraron publicaciones con los filtros aplicados. +

) : ( - pageRows.map((pub, i) => { - const isSelected = selectedIds.has(pub.id); - return ( - +
+ +
+
+ {pageRows.map((pub, i) => { + const isSelected = selectedIds.has(pub.id); + return ( +
+
+ toggleRow(pub.id)} + ariaLabel={`Seleccionar publicación ${pub.title}`} + /> +
+
+ {isAuthenticated && pub.downloaded_by_me === false && ( + + + Nuevo + + )} +

+ {pub.title} +

+
+
+
+
+

+ Revista:{" "} + {pub.journal || "—"} +

+

+ Año:{" "} + {pub.publication_year ?? "—"} +

+

+ DOI:{" "} + {pub.doi ? ( + + {pub.doi} + + ) : ( + + — + + )} +

+
+ +
+
+
+ ); + })} +
+ + )} + + +
e.stopPropagation()} - > - - toggleSort(col.key)} - className={`select-none border-b border-surface-border/60 px-4 py-2.5 text-left text-xs font-medium tracking-wide text-ink-secondary${col.thClass ? ` ${col.thClass}` : ""}`} - > - - {col.label.toUpperCase()} - - -
- No se encontraron publicaciones con los filtros aplicados. -
+ + + + {COLUMNS.map((col) => ( + - + + + {filtered.length === 0 ? ( + + + + ) : ( + pageRows.map((pub, i) => { + const isSelected = selectedIds.has(pub.id); + return ( + + + + + + - - - - - - ); - }) - )} - -
e.stopPropagation()} + > + + toggleSort(col.key)} + className={`select-none border-b border-surface-border/60 px-4 py-2.5 text-left text-xs font-medium tracking-wide text-ink-secondary${col.thClass ? ` ${col.thClass}` : ""}`} > - { - e.stopPropagation(); - toggleRow(pub.id); - }} - > - toggleRow(pub.id)} - ariaLabel={`Seleccionar publicación ${pub.title}`} + + {col.label.toUpperCase()} + - - - {isAuthenticated && pub.downloaded_by_me === false && ( - + + ))} +
+ No se encontraron publicaciones con los filtros aplicados. +
{ + e.stopPropagation(); + toggleRow(pub.id); + }} + > + toggleRow(pub.id)} + ariaLabel={`Seleccionar publicación ${pub.title}`} + /> + + + {isAuthenticated && pub.downloaded_by_me === false && ( + + + Nuevo + + )} + {pub.title} + + + {pub.journal || "—"} + + {pub.publication_year ?? "—"} + + {pub.doi ? ( + e.stopPropagation()} + className="whitespace-nowrap font-mono text-xs text-brand-accent hover:underline" > - - Nuevo + {pub.doi} + + ) : ( + + — )} - {pub.title} - - - {pub.journal || "—"} - - {pub.publication_year ?? "—"} - - {pub.doi ? ( - e.stopPropagation()} - className="whitespace-nowrap font-mono text-xs text-brand-accent hover:underline" - > - {pub.doi} - - ) : ( - - — - - )} - - -
+ + + + + + ); + }) + )} + + + )}