fix(plating): chatter action toolbar invisible in dark mode

The floating message-action toolbar (reaction / reply / star / link
icons) appearing on hover renders white-icons-on-white-background in
dark mode — Odoo's own dark.scss sets the icon hover color to white
but never gives the toolbar itself a dark background. Result: the
icons vanish entirely in dark mode.

Add fp_chatter_dark.scss that branches at compile time on
$o-webclient-color-scheme == dark (Odoo 19 compiles every SCSS file
into both web.assets_backend with `bright` AND web.assets_web_dark
with `dark`) and gives the toolbar:

- Solid dark background (#2b2f33 fallback, var(--o-component-bgcolor))
- Subtle 1px white-alpha border + drop shadow so it floats nicely
- Icon color rgba(255,255,255,.78) at full opacity (not 35%)
- Brighter hover state with a subtle bg highlight

Light bundle output is empty (the @if branch doesn't fire), so the
light theme is untouched.

Verified: dark bundle includes our rule with #2b2f33 marker present.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-04-19 08:45:47 -04:00
parent eed4dc8a78
commit 5994cec11b
3 changed files with 81 additions and 1 deletions

View File

@@ -5,7 +5,7 @@
{
'name': 'Fusion Plating',
'version': '19.0.5.0.0',
'version': '19.0.5.1.0',
'category': 'Manufacturing/Plating',
'summary': 'Core plating / metal finishing ERP: facilities, processes, tanks, baths, jobs, operators.',
'description': """
@@ -102,6 +102,7 @@ Copyright (c) 2026 Nexa Systems Inc. All rights reserved.
'web.assets_backend': [
'fusion_plating/static/src/scss/fusion_plating.scss',
'fusion_plating/static/src/scss/recipe_tree_editor.scss',
'fusion_plating/static/src/scss/fp_chatter_dark.scss',
'fusion_plating/static/src/xml/recipe_tree_editor.xml',
'fusion_plating/static/src/js/recipe_tree_editor.js',
],

View File

@@ -0,0 +1,48 @@
// =====================================================================
// Fusion Plating — Chatter dark-mode patch
//
// In dark mode the floating message-action toolbar (reaction / reply /
// star / link icons) renders white-on-white because Odoo sets the
// hover icon color to `white` but doesn't give the toolbar itself a
// dark background. Result: icons invisible, users can't see what
// they're hovering.
//
// Branch at compile time (Odoo 19 compiles every SCSS file into the
// `web.assets_backend` bundle with $o-webclient-color-scheme: bright,
// AND into `web.assets_web_dark` with $o-webclient-color-scheme: dark).
// Light bundle gets nothing (zero output); dark bundle gets the patch.
// =====================================================================
$o-webclient-color-scheme: bright !default;
@if $o-webclient-color-scheme == dark {
.o-mail-Message-actions {
// Solid dark background so light/white icons stand out
background-color: var(--o-component-bgcolor, #2b2f33) !important;
border: 1px solid rgba(255, 255, 255, 0.10);
border-radius: 6px;
padding: 2px 4px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
// Make sure every icon (reaction, reply, star, link, more) has
// enough contrast against the dark popup. Defaults sit at 35%
// opacity which barely shows.
button, .btn, .o-mail-ActionList-button {
color: rgba(255, 255, 255, 0.78) !important;
> i, > .oi, > .fa {
color: rgba(255, 255, 255, 0.82) !important;
opacity: 1 !important;
}
&:hover, &:focus, &:focus-visible, &.show {
background-color: rgba(255, 255, 255, 0.10) !important;
color: #fff !important;
> i, > .oi, > .fa {
color: #fff !important;
}
}
}
}
}