Repository navigation
[ADD] web_theme_focus: minimal focus backend theme - larger icons, hidden search, transparent navbar - #3648
[ADD] web_theme_focus: minimal focus backend theme - larger icons, hidden search, transparent navbar#3648volkantasci wants to merge 1 commit into
Conversation
3064e1d to
9dede9a
Compare
|
Thanks for the catch @tarteo — the copied artwork is gone.
Also, per the earlier review feedback, the branch is squashed to a single |
|
Hi @tarteo 👋 Following up on your review — the Enterprise-derived artwork is gone. In commit
All checks are green (pre-commit, Odoo/OCB tests, codecov, runboat) and the PR is a single squashed commit. Could you take another look when you have a moment? Thanks! |
Adds a "Focus" option to web_responsive's app-menu theme picker (res.users.apps_menu_theme): larger app icons with more spacing, no search bar on the home screen, and a full-bleed gradient behind a transparent top navbar. - Light background reuses web_responsive's Milk theme overlay (OCA/web, LGPL-3) with the Milk gradient. - Dark background is a pure CSS gradient (no image), loaded via the web.assets_web_dark bundle. - The active theme is mirrored onto <body data-app-theme> from a WebClient.setup patch so CSS can style the navbar and app-menu container outside .o_grid_apps_menu. - Tests cover the selection value, the dark-bundle asset registration, and session-info theme propagation.
9dede9a to
5c41389
Compare
|
Hi @tarteo 👋 I've rebased the branch onto the latest Could you take another look when you have a moment? Thanks! |
What does this PR do?
Adds the
web_theme_focusaddon: a new Focus option forweb_responsive's app-menu theme picker (⚙ Apps Menu Preferences → Theme).res.users.apps_menu_themegains thefocusselection value.web.assets_web_darkso they only load under the dark color scheme (requiresweb_dark_mode).session.apps_menu.themeon<body data-app-theme>from aWebClient.setuppatch, so CSS can reach the navbar and the app-menu container, which live outside.o_grid_apps_menu.The module does not aim to fully replicate Odoo Enterprise and explicitly excludes
web_enterprise.Tests
test_selection_includes_focus/test_user_can_be_set_to_focus: the selection value exists and is assignable.test_dark_bundle_registers_focus_assets:web.assets_web_darkresolves both focus.dark.scssfiles.test_webclient_bootstrap_renders: the webclient bootstrap page renders (HTTP 200) with the module installed.test_session_info_reports_focus_theme: a user withapps_menu_theme=focusreceivesapps_menu.theme == "focus"in the webclient session info.All 5 tests pass against a live Odoo 19.0 run (
0 failed, 0 error(s) of 5 tests), with bothweb.assets_web.min.cssandweb.assets_web_dark.min.csscompiling successfully.Screenshots
The gradient artwork (
app_switcher_background_light.svg/_dark.svg) is clean-room reconstructed — no proprietary Enterprise source is copied.Notes to reviewers
i18n/tr.po("Focus" → "Odak"), mirroring howweb_responsivetranslates "Milk"/"Community"..dark.scssrules are defined onbody[data-app-theme="focus"]; the compiled dark bundle places them after the embedded light rules, so the dark gradient/text colors win as intended (verified in the compiled bundle).web,web_dark_mode,web_responsive; the theme piggy-backs on web_responsive'sapps_menusession info, preferences dialog,reload_contextflow and.o_apps_menu_openedbody class.