diff --git a/fusion_plating/fusion_plating/__manifest__.py b/fusion_plating/fusion_plating/__manifest__.py index d5bf86a6..47f58352 100644 --- a/fusion_plating/fusion_plating/__manifest__.py +++ b/fusion_plating/fusion_plating/__manifest__.py @@ -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', ], diff --git a/fusion_plating/fusion_plating/static/src/scss/fp_chatter_dark.scss b/fusion_plating/fusion_plating/static/src/scss/fp_chatter_dark.scss new file mode 100644 index 00000000..d972bdae --- /dev/null +++ b/fusion_plating/fusion_plating/static/src/scss/fp_chatter_dark.scss @@ -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; + } + } + } + } +} diff --git a/fusion_plating/scripts/fp_dark_bundle_check.py b/fusion_plating/scripts/fp_dark_bundle_check.py new file mode 100644 index 00000000..d625aa92 --- /dev/null +++ b/fusion_plating/scripts/fp_dark_bundle_check.py @@ -0,0 +1,31 @@ +env = env # noqa +# Force generation of both bundles +for bundle_name in ('web.assets_backend', 'web.assets_web_dark'): + bundle = env['ir.qweb']._get_asset_bundle(bundle_name) + css = bundle.css() # this materializes the attachment + print(f'{bundle_name}: triggered, css() type={type(css).__name__}') + +env.cr.commit() + +# Now find them +attachs = env['ir.attachment'].sudo().search( + [('url', 'like', '/web/assets/%')], + order='id desc', +) +print(f'\\n{len(attachs)} asset attachments after force-compile:') +for a in attachs: + raw_size = len(a.raw or b'') + print(f' [{a.id}] {a.name} ({raw_size} bytes)') + +# Check the dark one for our marker +dark = attachs.filtered(lambda a: 'web.assets_web_dark' in (a.name or '')) +if dark: + text = (dark[0].raw or b'').decode('utf-8', errors='ignore') + print(f'\\ndark bundle markers:') + print(f' o-mail-Message-actions: {text.count("o-mail-Message-actions")} occurrences') + print(f' #2b2f33 marker : {text.count("#2b2f33")} occurrences') + print(f' rgba(255, 255, 255, 0.10) marker: {text.count("rgba(255, 255, 255, 0.10)")} occurrences') + if '#2b2f33' in text: + idx = text.find('#2b2f33') + print(f'\\ncontext around our color:') + print(text[max(0, idx-300):idx+300])