Files
BEYOND/addons/beyond_base/static/src/webclient/beyond_launcher.scss
T
Jorem JuárezandClaude Opus 5 3bd3bdd900 Móvil: puertas parejas, pestañas que no se derraman, la miga en su renglón y el alta en español
Tres capturas del Director (18-sep-2026), cuatro causas:

- LANZADOR ASIMÉTRICO: las dos bandas repartían mitad y mitad — tres
  puertas arriba compartían lo mismo que dos abajo y las de abajo salían
  más altas. En teléfono las bandas se disuelven (display: contents) y
  las puertas cuelgan directo de la columna: reparten a partes iguales,
  las que haya.

- PESTAÑAS ENCIMADAS: `flex: none` vivía dos líneas ANTES del
  `all: unset` de la propia pestaña, que lo des-asignaba. En escritorio
  no se veía porque caben; a 375 cada caja se encogía bajo su texto y
  los glifos se derramaban sobre la vecina. El humo de anchos compara
  CAJAS, y las cajas encogidas no se tocan: verde con la pantalla rota.
  El flex va ahora después del unset, con nowrap.

- LA MIGA ESTRUJADA («C..»): en pantalla chica el core la teletransporta
  a la barra y quedaba aplastada entre la casa y las pestañas. No se
  esconde —en una pantalla profunda es el camino de regreso—: la barra
  envuelve y la miga toma su propio renglón.

- «NEW» EN INGLÉS: la única fábrica de cuentas (_beyond_crear_cuenta)
  no fijaba idioma y la cuenta nacía con el en_US de fábrica; nuestros
  textos salen en español porque son literales, los del core no. La
  cuenta nace ahora con el idioma de la red (es_MX si está activo), y
  un backfill de arranque (ADR-011, idempotente, solo cuentas del alta
  en otro idioma) repara las ya nacidas — la del teléfono del Director
  incluida, al desplegar.

Por indicación del Director, sin corrida de suite: se prueba directo en
producción. La prueba del lanzador se actualizó al marcador nuevo
(display: contents) y corre con la próxima pasada.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 11:18:44 -06:00

499 lines
19 KiB
SCSS

// =============================================================================
// C-005/C-006 · Beyond launcher v4 (ADR-005)
//
// Faithful translation of the signed-off "Menú Principal v4". Unlike v3, the
// design arrived as real CSS, so every colour, gradient, radius, blur, shadow
// and duration below is copied from it rather than reconstructed. The rules
// that have no counterpart there are marked ENGINEERING and say what they
// protect against — the design is one artboard and this sits on top of Odoo's
// real apps dropdown.
//
// It is still the native apps dropdown, restyled: the popover is forced full
// screen with :has() + !important, which beats the inline positioning the
// popover service writes. :has() is supported by the target browsers
// (BRIEF §8).
//
// WHAT CHANGED FROM v3, beyond the paint:
// · The solid colour-coded blocks became glass — a white gradient over the
// module's own tint over $beyond-surface, with a blurred backdrop, a white
// hairline and a shadow in the module's colour. Hover and pressed no
// longer swap a hex: they deepen the same tint.
// · The title "MENÚ PRINCIPAL" is gone; the header is the house and the rule.
// · Contactos left the big blocks and joined Empleados in a new master row
// 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). 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
// thing was re-checked:
// · The blue (#3D6A8A) and the two golds (#C69B3A icon, #A87F22 label) are
// this screen's colour-coding for Inventario and Tableros. One screen.
// · The three beiges of the radial gradient are this screen's ground. The
// login and the kiosk have their own; nothing else wants a beige.
// · #C55A22 stays local even though the login's error text is the same hex:
// same value, unrelated meaning (see beyond_variables.scss).
// · The greens, the purple, the inks, $beyond-surface and $beyond-line ARE
// tokens and are used as such — the design happens to reuse them exactly.
// Two v3 locals died with the redesign: the old grey of Tableros (#55606E) and
// the gold of the Contactos block (#A8802C). Neither is referenced any more.
// =============================================================================
// "Panel General"
$beyond-launcher-panel: #C55A22;
// "Inventario"
$beyond-launcher-inventario: #3D6A8A;
// "Tableros" — the bars and the word are two different golds in the design.
$beyond-launcher-tableros: #C69B3A;
$beyond-launcher-tableros-ink: #A87F22;
// The ground: a radial wash from the top centre.
$beyond-launcher-bg-alto: #F2EEE4;
$beyond-launcher-bg-medio: #EAE4D6;
$beyond-launcher-bg-bajo: #DFD6C2;
// The glass: a white hairline and the sheen that sells the material.
$beyond-launcher-vidrio-borde: rgba(255, 255, 255, 0.85);
$beyond-launcher-vidrio-alto: rgba(255, 255, 255, 0.95);
$beyond-launcher-vidrio-bajo: rgba(255, 255, 255, 0.35);
// Manrope and $beyond-font-family now live in scss/beyond_fonts.scss: the login
// screen needs the same face from web.assets_frontend, and one copy of six
// @font-face rules is enough. That file is listed before this one in
// web.assets_backend, so the variable below is already defined here.
// -----------------------------------------------------------------------------
// The glass of a block.
//
// Three stacked layers, exactly as the design writes them: a white gradient on
// top for the sheen, the module's tint under it, and $beyond-surface at the
// bottom so the stack is opaque. Only the two top layers move between rest,
// hover and pressed; the shadow does not change.
//
// The tint opacities are a parameter and not a constant because the design
// gives Tableros a heavier hand (0.20/0.30/0.38 against everyone else's
// 0.15/0.24/0.30): the gold is the lightest of the five and needs it to read.
// -----------------------------------------------------------------------------
@mixin beyond-vidrio($tinte, $reposo: 0.15, $hover: 0.24, $activo: 0.30) {
background:
linear-gradient(150deg, rgba(255, 255, 255, 0.60) 0%, rgba(255, 255, 255, 0.22) 100%),
linear-gradient(0deg, rgba($tinte, $reposo), rgba($tinte, $reposo)),
$beyond-surface;
box-shadow:
inset 0 1px 0 $beyond-launcher-vidrio-alto,
inset 0 -1px 0 $beyond-launcher-vidrio-bajo,
0 16px 38px rgba($tinte, $reposo);
&:hover {
background:
linear-gradient(150deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.18) 100%),
linear-gradient(0deg, rgba($tinte, $hover), rgba($tinte, $hover)),
$beyond-surface;
}
&:active {
background:
linear-gradient(150deg, rgba(255, 255, 255, 0.50) 0%, rgba(255, 255, 255, 0.15) 100%),
linear-gradient(0deg, rgba($tinte, $activo), rgba($tinte, $activo)),
$beyond-surface;
}
}
// -----------------------------------------------------------------------------
// Full-screen shell
// -----------------------------------------------------------------------------
.o-dropdown--menu:has(.beyond_launcher_band) {
position: fixed !important;
inset: 0 !important;
width: 100% !important;
height: 100% !important;
max-width: none !important;
max-height: none !important;
transform: none !important;
margin: 0 !important;
padding: 0;
border: 0;
border-radius: 0;
display: flex;
flex-direction: column;
background: radial-gradient(120% 90% at 50% 0%,
$beyond-launcher-bg-alto 0%,
$beyond-launcher-bg-medio 55%,
$beyond-launcher-bg-bajo 100%);
color: $beyond-ink;
font-family: $beyond-font-family;
-webkit-font-smoothing: antialiased;
// Nothing scrolls: the design absorbs a short viewport in the icons, which
// shrink with the 22vh cap inside rows that can squash.
//
// !important like the geometry above, and for the same reason: the popover
// service writes `overflow-y: auto` INLINE, next to the top/max-height it
// also writes. v3 declared this without !important and quietly lost the
// vertical axis — the screen was one short viewport away from scrolling
// instead of squashing.
overflow: hidden !important;
// -------------------------------------------------------------------------
// FOCUS — there is none, anywhere on this screen, and that is the design's
// decision, not an oversight.
//
// Leave it alone. It looks like the classic accessibility bug and it is the
// first thing a reviewer "fixes"; v4 was signed off with the ring removed
// on purpose, so if it needs to come back that is a design change with a
// new artboard, not a patch here. Note the cost so the decision stays
// informed: this screen cannot be driven by sight with the keyboard. It
// still WORKS by keyboard — the dropdown's own arrow/enter navigation is
// untouched — you just cannot see where you are.
//
// The one thing the new artboard does give focus is a brighter hairline on
// the block — 0.95 white against the 0.85 at rest. It is faint, but it is
// the design's own answer and it is more than v4 had.
//
// :focus and :focus-visible both, and !important, because the reset has to
// beat Bootstrap's .dropdown-item:focus and Odoo's own o-dropdown rules.
// -------------------------------------------------------------------------
.beyond_block,
.beyond_mbtn {
&:focus,
&:focus-visible {
outline: none !important;
}
}
.beyond_block:focus {
border-color: rgba(255, 255, 255, 0.95);
}
// -------------------------------------------------------------------------
// Header: the house and the rule. v4 dropped the title.
// -------------------------------------------------------------------------
.beyond_launcher_header {
flex: none;
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding: 22px 22px 10px;
// La casa es ahora una plantilla compartida y dibuja con currentColor:
// el tono lo pone quien la usa (beyond_base/…/beyond_casa.xml).
color: $beyond-ink;
svg {
transition: transform 220ms ease;
&:hover {
transform: scale(1.18);
}
}
}
.beyond_launcher_rule {
display: block;
width: 64px;
height: 4px;
border-radius: 2px;
background: $beyond-line;
}
// -------------------------------------------------------------------------
// The signature, at the foot. v4 moved it from muted grey to full ink.
// -------------------------------------------------------------------------
.beyond_launcher_brand {
flex: none;
display: flex;
// La firma se queda a la derecha y cerrar sesión ocupa la izquierda:
// `space-between` en vez de empujar la firma, para que la salida no
// quede pegada a la marca.
justify-content: space-between;
align-items: center;
padding: 4px 22px 14px;
.beyond_launcher_salir {
display: flex;
align-items: center;
gap: 8px;
// Alto de dedo: esta pantalla se usa en tableta de mostrador.
min-height: 44px;
padding: 0 14px;
border-radius: 10px;
font-size: 14px;
font-weight: 600;
color: $beyond-ink;
text-decoration: none;
opacity: 0.75;
svg {
width: 20px;
height: 20px;
}
&:hover, &:focus-visible {
opacity: 1;
background: rgba(35, 32, 29, 0.06);
color: $beyond-ink;
}
}
span {
font-size: 13px;
font-weight: 600;
letter-spacing: 0.04em;
color: $beyond-ink;
}
}
// ENGINEERING — a row with no apps for this role must not leave a ghost
// strip. :has() rather than :empty so template whitespace cannot fool it.
// This is what makes the master row disappear for a Beyond role, which is
// every role: Contactos and Empleados are behind base.group_system.
.beyond_launcher_band:not(:has(.beyond_block)),
.beyond_launcher_master:not(:has(.beyond_mbtn)) {
display: none;
}
// -------------------------------------------------------------------------
// The two rows
//
// 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_band {
flex: 1;
min-height: 0;
display: flex;
gap: 6px;
}
.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 <a.dropdown-item>, so Bootstrap's block
// layout, padding, colour and nowrap have to go before the design's own box
// takes over. This is the <a> equivalent of the design's `all: unset`.
.beyond_block,
.beyond_mbtn {
box-sizing: border-box;
display: flex !important;
flex-direction: column;
align-items: center;
width: auto;
text-align: center;
text-decoration: none;
cursor: pointer;
}
// -------------------------------------------------------------------------
// The blocks
// -------------------------------------------------------------------------
.beyond_block {
flex: 1;
min-width: 0;
min-height: 0;
justify-content: center;
gap: 28px;
padding: 18px 12px;
border: 1.5px solid $beyond-launcher-vidrio-borde;
border-radius: 28px;
backdrop-filter: blur(16px);
transition: flex-grow 220ms ease, background 180ms ease;
// 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 {
flex-grow: 1.18;
}
svg {
flex: 0 1 auto;
min-height: 0;
max-height: 100%;
// The design says `width: min(140px, 22vh)`. Written as a pair
// because Sass evaluates a bare min() itself and refuses to compare
// px with vh; the used width is identical.
width: 140px;
max-width: 22vh;
height: auto;
}
}
.beyond_block_name {
font-size: 28px;
font-weight: 800;
letter-spacing: -0.02em;
}
.beyond_block_venta {
@include beyond-vidrio($beyond-primary);
.beyond_block_name { color: $beyond-primary; }
}
.beyond_block_panel {
@include beyond-vidrio($beyond-launcher-panel);
.beyond_block_name { color: $beyond-launcher-panel; }
}
.beyond_block_qr {
@include beyond-vidrio($beyond-kiosco);
.beyond_block_name { color: $beyond-kiosco; }
}
.beyond_block_inventario {
@include beyond-vidrio($beyond-launcher-inventario);
.beyond_block_name { color: $beyond-launcher-inventario; }
}
.beyond_block_tableros {
@include beyond-vidrio($beyond-launcher-tableros, 0.20, 0.30, 0.38);
.beyond_block_name { color: $beyond-launcher-tableros-ink; }
}
// -------------------------------------------------------------------------
// Master row
//
// Two curated buttons, and only two. v3 ended in a catch-all strip that
// rendered every app the launcher had not mapped; v4 replaced it with this,
// so the strip is gone. That is a real loss of reach for the technical
// account (base.group_system): Facturación, Ajustes, Aplicaciones and
// Asistencias no longer have a door on this screen and are reachable only
// by URL. Deliberate — the design is the six doors and nothing else — but
// written down because it is the kind of thing that gets discovered at the
// worst moment.
//
// Both buttons sit behind base.group_system, so for every Beyond role this
// row renders empty and the rule above collapses it.
// -------------------------------------------------------------------------
.beyond_launcher_master {
flex: none;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 2px 6px 6px;
}
.beyond_mbtn {
// 124 x ~85: comfortably over the 48px touch floor (CLAUDE.md).
width: 124px;
padding: 12px 0;
border: 1.5px solid transparent;
border-radius: 20px;
gap: 8px;
background: none;
transition: background 140ms ease, border-color 140ms ease;
&:hover,
&:active {
background:
linear-gradient(150deg, rgba(255, 255, 255, 0.60) 0%, rgba(255, 255, 255, 0.22) 100%),
$beyond-surface;
border-color: $beyond-launcher-vidrio-borde;
}
svg {
width: 36px;
height: 36px;
}
}
.beyond_mbtn_name {
font-size: 13px;
font-weight: 700;
color: $beyond-ink-soft;
// ENGINEERING — the two names are ours and short, but the box is fixed
// at 124px; clip rather than let a translation wrap and shove the row.
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
// -----------------------------------------------------------------------------
// Móvil (Pieza A, 17-sep-2026). Dentro de la raíz y al final, como manda el
// contrato (ADR-027). En teléfono las bandas se disuelven y cada puerta
// se vuelve una fila ancha —icono y nombre lado a lado— colgada directo
// de la columna del lanzador: todas reparten a partes iguales y caben
// sin desplazamiento porque los bloques ya saben encogerse (flex: 1 +
// min-height: 0), la misma física del diseño de escritorio ante un
// viewport corto. Los separadores solo repartían anchura: fuera.
// -----------------------------------------------------------------------------
.o-dropdown--menu:has(.beyond_launcher_band) {
@include beyond-telefono {
gap: 8px;
// Las bandas se DISUELVEN (capturas del 18-sep): con ellas, tres
// puertas arriba repartían la misma mitad que dos abajo, y las de
// abajo salían más altas. Con `display: contents` las puertas
// cuelgan directo de la columna del lanzador y comparten a partes
// iguales —las que haya: si un rol esconde una, el reparto se
// rehace solo—, conservando la física de encogerse en un viewport
// corto.
.beyond_launcher_band { display: contents; }
.beyond_launcher_spacer { display: none; }
.beyond_block {
margin: 0 12px;
flex-direction: row;
justify-content: flex-start;
gap: 18px;
padding: 10px 18px;
border-radius: 20px;
// El empujón al pasar el cursor es de escritorio: en una columna
// táctil solo haría saltar la lista bajo el dedo.
&:hover,
&:active {
flex-grow: 1;
}
svg {
flex: none;
width: 52px;
max-width: none;
max-height: 52px;
}
}
.beyond_block_name { font-size: 20px; }
.beyond_launcher_header { padding: 14px 16px 6px; }
.beyond_launcher_brand { padding: 4px 14px 10px; }
}
// Táctil por capacidad, no por anchura: una tablet en horizontal también
// lo recibe. 48px = $beyond-panel-tactil; el token vive en el bundle del
// panel (beyond_branch) y este archivo compila antes, así que aquí va el
// valor — el contrato prohíbe declarar OTRO token, no usar el mismo piso.
@include beyond-tactil {
.beyond_launcher_salir,
.beyond_mbtn {
min-height: 48px;
}
}
}