Name:
[FIX] viin_brand_web: scope the navbar hover/active hook guard to the regular navbar
State:
Killed
finished in 168m
PR State:
merged
PR Author:
David Tran
PR Author Email:
PR:
#685
Committer:
David Tran
Committer Email:
david.tran@tvtmarine.com
Commit:
7b08e4252a4e357b4a3d42f49932173fbdd37ffd
Description:
[FIX] viin_brand_web: scope the navbar hover/active hook guard to the regular navbar
test_navbar_menu_entry_interactive_states_use_deep_chrome_rung asserted
that core never DECLARES --NavBar-entry-backgroundColor--hover/--active,
because the var() fallback those hooks read is what carries the brand's
deep chrome rung. It checked that with a substring scan over the whole
compiled web.assets_backend, so any declaration anywhere tripped it.
viin_customizer declares both hooks to theme its own dark top bar:
`.customizer_container .customizer_navbar .o_main_navbar { ... }`. That
rule never applies to the regular web client navbar, so the brand rung
there is untouched, yet the scan reported it as core re-declaring the
hook and the test went red as soon as viin_customizer was installed.
The guard now collects only the declarations whose selector can reach
the regular navbar entries - the entry itself or any ancestor on the
NAVBAR_ANCESTORS chain, including class-less subjects such as :root.
Custom properties inherit, so an ancestor-level declaration counts; a
declaration under a context the navbar is not in does not. The check
cannot be left to the cascade resolution further down: that walks only
the entry, so a `.o_main_navbar` declaration inherited from above would
stay invisible to it.
Verified on 19.0 with viin_brand_web and viin_customizer installed:
the old guard fails with "'--NavBar-entry-backgroundColor--hover:'
unexpectedly found", the new one passes, and temporarily adding
`.o_main_navbar { --NavBar-entry-backgroundColor--hover: #00bbce }` to
the brand bundle still makes it fail.
Also reword the docstring of viin_backend_theme's
test_navbar_apps_icon_computes_cores_navbar_entry_colour. It said nothing
in the addons path declares --NavBar-entry-color, which stops being true
once viin_customizer is installed. It now says no rule that reaches the
regular navbar declares it, and that viin_customizer's declaration lives
only under its own .customizer_navbar scope, which the cascade resolver
excludes. Docstring only; that test class still passes with
viin_customizer installed.
Signed-off-by: David Tran <david.tran@tvtmarine.com>
Branch:
19.0
Age:
Up-time: