From 4c767b3e803d6a862572964fe73c875a23bde1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorem=20Ju=C3=A1rez?= Date: Sun, 23 Aug 2026 22:50:00 -0600 Subject: [PATCH] =?UTF-8?q?Devuelve=20el=20ensanchamiento=20lateral=20a=20?= =?UTF-8?q?las=20tarjetas=20del=20Men=C3=BA=20Principal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La rejilla del commit anterior igualaba los tamaños pero mataba el gesto: en una celda de rejilla el carril está fijo, así que la tarjeta bajo el cursor no podía crecer y se conformaba con levantarse. El artboard nuevo consigue las dos cosas a la vez volviendo a dos filas flex y metiendo un espaciador de flex 0.5 a cada extremo de la de abajo: 0.5 + 1 + 1 + 0.5 son las mismas tres partes que reparte la fila de arriba, así que las tarjetas vuelven a medir lo mismo y el par queda centrado, y como todo sigue siendo flex el hover recupera su flex-grow: 1.18 y empuja. Medido en Chrome: al pasar por Panel General crece de 472 a 523 px, Venta y QR se estrechan a 447 y QR se corre 25 px a la derecha; en la fila de abajo los espaciadores también ceden ancho (226 → 214) en vez de dejar el gesto a medias contra un borde muerto. Los espaciadores son vacíos: sin caja, sin texto, sin parada de tabulación. Solo sostienen espacio y lo devuelven cuando un vecino crece. Las dos filas no quedan iguales al píxel, y es del propio markup del diseño: la de abajo lleva un hueco de gap más y dos tarjetas en vez de tres aportando padding y borde, así que reparte 6 px menos y las suyas salen 7 px más anchas — un 1.5%, imperceptible. Se copia como está en vez de corregir un ideal que el diseño no pide. Nada más cambia: control maestro, firma, foco y colores intactos. Co-Authored-By: Claude Opus 5 (1M context) --- .../static/src/webclient/beyond_launcher.scss | 72 +++++++++---------- .../static/src/webclient/beyond_launcher.xml | 16 +++-- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/addons/beyond_base/static/src/webclient/beyond_launcher.scss b/addons/beyond_base/static/src/webclient/beyond_launcher.scss index 8ce9c7f..bc05ad9 100644 --- a/addons/beyond_base/static/src/webclient/beyond_launcher.scss +++ b/addons/beyond_base/static/src/webclient/beyond_launcher.scss @@ -23,10 +23,12 @@ // of small buttons. // · Tableros went from grey to gold. // · The catch-all tile row is GONE. See the note over .beyond_launcher_master. -// · The five doors are all ONE size (23-aug-2026 artboard). Two flex rows -// gave the bottom pair half the width each against the top trio's third; -// one grid of six columns, two per block, makes them equal and centres the -// bottom row. Hover lifts the block instead of widening it. +// · The five doors are all ONE size (23-aug-2026 artboard). The bottom row +// used to give its two blocks half the width each against the top trio's +// third; a half-width spacer at each end of it splits the row into the same +// three parts, so every door matches and the pair sits centred. Done with +// spacers rather than a grid so hover keeps SHOVING: the block under the +// cursor widens and its neighbours give way, which no grid track can do. // // PALETTE — the rule in scss/beyond_variables.scss is that a colour graduates // to a token when a SECOND screen needs it. Nothing graduated in v4 and one @@ -225,41 +227,34 @@ $beyond-launcher-vidrio-bajo: rgba(255, 255, 255, 0.35); } // ------------------------------------------------------------------------- - // The grid + // The two rows // - // Six columns, every block spanning two: that is the whole trick behind - // "all the same size". v4 laid the doors out as two flex ROWS, so the two - // blocks of the bottom row were half the width each while the three of the - // top row were a third — same height, different width. One grid of six - // fixes it: three per row, each a third wide, and the bottom row centred by - // hand into columns 2-3 and 4-5. - // - // `grid-auto-rows: 1fr` is what keeps the rows equal in height, and the - // grid itself takes `flex: 1` so the two rows split whatever the header, - // the master row and the signature leave behind. + // Both grow, so the blocks split whatever height the header, the master row + // and the signature leave behind. Flex and not a grid on purpose: a flex + // item can widen past its share, and that is the whole point of the hover + // below — the block under the cursor grows and shoves its neighbours aside. + // A grid track cannot do that. // ------------------------------------------------------------------------- - .beyond_launcher_grid { + .beyond_launcher_band { flex: 1; min-height: 0; - display: grid; - grid-template-columns: repeat(6, 1fr); - grid-auto-rows: 1fr; + display: flex; gap: 6px; - padding: 8px 6px 8px; } - // ENGINEERING — the hand-placed bottom row is the design's NOMINAL case: - // the five doors, all present. It only applies when all five actually - // render, because a block whose app is hidden for this role does not - // render at all, and an explicit `grid-column: 2` on a four-block screen - // pins Inventario off-centre with a hole beside it. Short of the five, the - // blocks auto-flow three per row in reading order, which is the sane - // degradation. Roles differ here for real: Tableros is visible to every - // internal user, Venta and Inventario ride on POS/stock groups, and Panel - // General and QR on the branch administrator's. - .beyond_launcher_grid:has(.beyond_block_venta):has(.beyond_block_panel):has(.beyond_block_qr):has(.beyond_block_inventario):has(.beyond_block_tableros) { - .beyond_block_inventario { grid-column: 2 / span 2; } - .beyond_block_tableros { grid-column: 4 / span 2; } + .beyond_launcher_row1 { padding: 8px 6px 0; } + .beyond_launcher_row2 { padding: 6px 6px 8px; } + + // The bottom row's two blocks would otherwise be half the row each against + // the third the three above get — same height, wider box. A half-width + // spacer at each end fixes both things at once: 0.5 + 1 + 1 + 0.5 splits + // into the same three parts as row 1, so every door is the same size, and + // the pair ends up centred. Empty, inert, invisible: no box, no text, no + // tab stop; it only holds space, and it yields it back when a neighbour + // grows on hover. + .beyond_launcher_spacer { + flex: 0.5; + min-width: 0; } // Reset: DropdownItem renders an , so Bootstrap's block @@ -281,7 +276,7 @@ $beyond-launcher-vidrio-bajo: rgba(255, 255, 255, 0.35); // The blocks // ------------------------------------------------------------------------- .beyond_block { - grid-column: span 2; + flex: 1; min-width: 0; min-height: 0; justify-content: center; @@ -290,15 +285,14 @@ $beyond-launcher-vidrio-bajo: rgba(255, 255, 255, 0.35); border: 1.5px solid $beyond-launcher-vidrio-borde; border-radius: 28px; backdrop-filter: blur(16px); - transition: transform 220ms ease, background 180ms ease; + transition: flex-grow 220ms ease, background 180ms ease; - // The block rises instead of growing. v4 widened it with flex-grow, - // which a grid cell cannot do: its track is fixed at two columns, and - // that is the point — the doors stay the same size. The design answers - // with a lift. + // The block under the cursor takes more of the row and pushes its + // neighbours aside. Transitioning flex-grow is what animates the shove: + // every sibling gives up width at the same time, spacers included. &:hover, &:active { - transform: translateY(-6px); + flex-grow: 1.18; } svg { diff --git a/addons/beyond_base/static/src/webclient/beyond_launcher.xml b/addons/beyond_base/static/src/webclient/beyond_launcher.xml index 45ada50..ce54ae5 100644 --- a/addons/beyond_base/static/src/webclient/beyond_launcher.xml +++ b/addons/beyond_base/static/src/webclient/beyond_launcher.xml @@ -68,11 +68,9 @@ - -
+ +
QR +
+ + +
+ Tableros +