diff --git a/addons/beyond_base/static/src/scss/beyond_variables.scss b/addons/beyond_base/static/src/scss/beyond_variables.scss index 223c525..da8e1b4 100644 --- a/addons/beyond_base/static/src/scss/beyond_variables.scss +++ b/addons/beyond_base/static/src/scss/beyond_variables.scss @@ -28,6 +28,11 @@ // · The rule colour graduated (login v1): #DCD8CE was the launcher's // decorative rule under the title and is now also the login's field // borders, so it left beyond_launcher.scss as $beyond-line. +// · Launcher v4 added a blue (#3D6A8A, Inventario), two golds (#C69B3A and +// #A87F22, Tableros) and three beiges (#F2EEE4/#EAE4D6/#DFD6C2, the radial +// ground). NONE graduated: all five are the colour-coding and the ground of +// one screen. The login and the kiosk bring their own surfaces; no second +// screen has asked for a beige. They stay local in beyond_launcher.scss. // // TYPOGRAPHY — the designs use Manrope. The @font-face rules and the // $beyond-font-family token live in scss/beyond_fonts.scss, which is listed in diff --git a/addons/beyond_base/static/src/webclient/beyond_launcher.scss b/addons/beyond_base/static/src/webclient/beyond_launcher.scss index c1183ac..497f68f 100644 --- a/addons/beyond_base/static/src/webclient/beyond_launcher.scss +++ b/addons/beyond_base/static/src/webclient/beyond_launcher.scss @@ -1,55 +1,106 @@ // ============================================================================= -// C-005/C-006 · Beyond launcher v3 (ADR-005) +// C-005/C-006 · Beyond launcher v4 (ADR-005) // -// Faithful translation of the signed-off "Menú Principal". Every colour, -// radius, size, gap, duration and font weight below comes from that file; the -// few rules that have no counterpart there are marked ENGINEERING and explain -// what they protect against — the design only covers the nominal case. +// 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). // -// Local, on purpose: the four block colours below are this screen's -// colour-coding, not brand colours, so they are NOT tokens in -// scss/beyond_variables.scss. That file's rule is that a colour graduates to a -// token when a SECOND screen needs it — which is how the purple became -// $beyond-kiosco once the kiosk page and the QR dialog started using it. The -// blue, gold and grey are new in v3 and no second screen uses them yet. +// 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. Row 2 is now two blocks, not three. +// · Tableros went from grey to gold. +// · The catch-all tile row is GONE. See the note over .beyond_launcher_master. // -// One colour left this file the other way (login v1): the #DCD8CE of the rule -// under the title is now also the login field borders, so it graduated to -// $beyond-line. The orange above stayed put even though the login's error text -// is the same hex — same value, unrelated meaning, and a shared token would -// fuse "Panel General" with "something went wrong". +// 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; -$beyond-launcher-panel-hover: #B14E1B; -$beyond-launcher-panel-active: #984115; // "Inventario" $beyond-launcher-inventario: #3D6A8A; -$beyond-launcher-inventario-hover: #345C79; -$beyond-launcher-inventario-active: #2C4E67; -// "Contactos" -$beyond-launcher-contactos: #A8802C; -$beyond-launcher-contactos-hover: #957025; -$beyond-launcher-contactos-active: #7F5F1F; +// "Tableros" — the bars and the word are two different golds in the design. +$beyond-launcher-tableros: #C69B3A; +$beyond-launcher-tableros-ink: #A87F22; -// "Tableros" -$beyond-launcher-tableros: #55606E; -$beyond-launcher-tableros-hover: #4A545F; -$beyond-launcher-tableros-active: #3F4750; +// 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 // ----------------------------------------------------------------------------- @@ -67,15 +118,49 @@ $beyond-launcher-tableros-active: #3F4750; border-radius: 0; display: flex; flex-direction: column; - background: $beyond-surface; + 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 min(140px, 22vh) inside rows that can squash. - overflow: hidden; + // 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; - // The title block + // ------------------------------------------------------------------------- + // 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. + // + // :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; + } + } + + // ------------------------------------------------------------------------- + // Header: the house and the rule. v4 dropped the title. + // ------------------------------------------------------------------------- .beyond_launcher_header { flex: none; display: flex; @@ -83,14 +168,14 @@ $beyond-launcher-tableros-active: #3F4750; align-items: center; gap: 8px; padding: 22px 22px 10px; - } - .beyond_launcher_title { - font-size: 34px; - font-weight: 800; - letter-spacing: 0.16em; - text-transform: uppercase; - color: $beyond-ink; + svg { + transition: transform 220ms ease; + + &:hover { + transform: scale(1.18); + } + } } .beyond_launcher_rule { @@ -101,7 +186,9 @@ $beyond-launcher-tableros-active: #3F4750; background: $beyond-line; } - // The signature, at the foot + // ------------------------------------------------------------------------- + // The signature, at the foot. v4 moved it from muted grey to full ink. + // ------------------------------------------------------------------------- .beyond_launcher_brand { flex: none; display: flex; @@ -112,74 +199,47 @@ $beyond-launcher-tableros-active: #3F4750; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; - color: $beyond-ink-muted; + 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. - // The catch-all row is empty for every Beyond role, so this is what keeps - // the screen down to the design's six blocks. - .beyond_launcher_band:not(:has(.beyond_block)):not(:has(.beyond_tile)) { + // 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; } - // Two rows of three. Both grow, so the blocks split the height evenly. + // Two rows. Both grow, so the blocks split whatever height is left. .beyond_launcher_band { - display: flex; - gap: 6px; - } - - .beyond_launcher_row1, - .beyond_launcher_row2 { flex: 1; min-height: 0; + display: flex; + gap: 6px; } .beyond_launcher_row1 { padding: 8px 6px 0; } .beyond_launcher_row2 { padding: 6px 6px 8px; } - // Catch-all row: fixed height under the blocks, so the six blocks keep - // splitting whatever is left. - .beyond_launcher_tiles { - flex: none; - height: 128px; - align-items: center; - gap: 8px; - padding: 0 6px; - // ENGINEERING — the row catches every unmapped app, so it can grow - // past the viewport. Scrolling sideways keeps them reachable without - // breaking the fixed band. Centring is done with auto margins rather - // than justify-content on purpose: centred flex content overflows in - // BOTH directions, pushing the first tiles off the left edge where - // scrolling cannot reach them. Auto margins collapse to 0 once there - // is no free space, so the row simply starts at the left. - justify-content: flex-start; - overflow-x: auto; - - .beyond_tile:first-child { margin-inline-start: auto; } - .beyond_tile:last-child { margin-inline-end: auto; } - } - // Reset: DropdownItem renders an , so Bootstrap's block - // layout, padding, colour and nowrap have to go before the design's own - // box takes over. + // layout, padding, colour and nowrap have to go before the design's own box + // takes over. This is the equivalent of the design's `all: unset`. .beyond_block, - .beyond_tile { + .beyond_mbtn { box-sizing: border-box; display: flex !important; flex-direction: column; align-items: center; width: auto; - background: none; - border: 0; text-align: center; text-decoration: none; cursor: pointer; } // ------------------------------------------------------------------------- - // Main band: three colour-coded blocks sharing the width + // The blocks // ------------------------------------------------------------------------- .beyond_block { flex: 1; @@ -188,7 +248,9 @@ $beyond-launcher-tableros-active: #3F4750; 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; &:hover, @@ -196,12 +258,16 @@ $beyond-launcher-tableros-active: #3F4750; flex-grow: 1.18; } - // Keyboard only. A plain :focus also fires on click, and since the QR - // block answers in place the launcher stays up with a ring around - // whatever the pointer last hit. - &:focus-visible { - outline: 4px solid $beyond-ink; - outline-offset: -6px; + 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; } } @@ -209,83 +275,90 @@ $beyond-launcher-tableros-active: #3F4750; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; - color: #FFFFFF; } .beyond_block_venta { - background: $beyond-primary; - - &:hover { background: $beyond-primary-dark; } - &:active { background: $beyond-primary-darker; } + @include beyond-vidrio($beyond-primary); + .beyond_block_name { color: $beyond-primary; } } .beyond_block_panel { - background: $beyond-launcher-panel; - - &:hover { background: $beyond-launcher-panel-hover; } - &:active { background: $beyond-launcher-panel-active; } + @include beyond-vidrio($beyond-launcher-panel); + .beyond_block_name { color: $beyond-launcher-panel; } } .beyond_block_qr { - background: $beyond-kiosco; - - &:hover { background: $beyond-kiosco-dark; } - &:active { background: $beyond-kiosco-darker; } + @include beyond-vidrio($beyond-kiosco); + .beyond_block_name { color: $beyond-kiosco; } } .beyond_block_inventario { - background: $beyond-launcher-inventario; - - &:hover { background: $beyond-launcher-inventario-hover; } - &:active { background: $beyond-launcher-inventario-active; } - } - - .beyond_block_contactos { - background: $beyond-launcher-contactos; - - &:hover { background: $beyond-launcher-contactos-hover; } - &:active { background: $beyond-launcher-contactos-active; } + @include beyond-vidrio($beyond-launcher-inventario); + .beyond_block_name { color: $beyond-launcher-inventario; } } .beyond_block_tableros { - background: $beyond-launcher-tableros; - - &:hover { background: $beyond-launcher-tableros-hover; } - &:active { background: $beyond-launcher-tableros-active; } + @include beyond-vidrio($beyond-launcher-tableros, 0.20, 0.30, 0.38); + .beyond_block_name { color: $beyond-launcher-tableros-ink; } } // ------------------------------------------------------------------------- - // Catch-all tiles (~132x98, well over the 48px touch floor) + // 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_tile { + .beyond_launcher_master { flex: none; - width: 132px; - padding: 14px 0; - gap: 10px; + 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; - transition: background 140ms ease; + gap: 8px; + background: none; + transition: background 140ms ease, border-color 140ms ease; &:hover, - &:focus-visible { - background: $beyond-surface-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_tile_name { + .beyond_mbtn_name { font-size: 13px; font-weight: 700; color: $beyond-ink-soft; - // ENGINEERING — these names are whatever the app is called; clip them - // rather than let a long one wrap and push the tile out of the band. + // 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; } - - .beyond_tile_icon { - width: 42px; - height: 42px; - object-fit: contain; - } } diff --git a/addons/beyond_base/static/src/webclient/beyond_launcher.xml b/addons/beyond_base/static/src/webclient/beyond_launcher.xml index 76efac8..0002acb 100644 --- a/addons/beyond_base/static/src/webclient/beyond_launcher.xml +++ b/addons/beyond_base/static/src/webclient/beyond_launcher.xml @@ -1,35 +1,46 @@
- Menú Principal +
@@ -64,9 +78,9 @@ onSelected="() => this.onNavBarDropdownItemSelection(app)" attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }" > - Venta @@ -79,12 +93,12 @@ onSelected="() => this.onNavBarDropdownItemSelection(app)" attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }" > - Panel General @@ -100,13 +114,13 @@ onSelected="() => this.onNavBarDropdownItemSelection(app)" attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }" > - QR @@ -122,32 +136,14 @@ onSelected="() => this.onNavBarDropdownItemSelection(app)" attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }" > - Inventario
- - - - Contactos - - - Tableros - -
- + +
- - + + Contactos + + + + + + Empleados