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>
32 lines
1.2 KiB
Python
32 lines
1.2 KiB
Python
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])
|