From 923ba830db13e4868a5f7351d67b5b3bfa248791 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Mon, 19 Jul 2021 08:54:01 +0000 Subject: [PATCH] [REF] web: dropdown: make "menu" the default slot The dropdown Component takes 2 slots: one for the toggler, and one for the actual dropdown content. Before this commit, the default slot was the toggler, and the other one was named "menu". However, as the toggler is actually optional, and the "menu" slot contains the central information about the dropdown, we decided to swap them. The content of the dropdown is now the default slot and the toggler can be specified with the "toggler" slot. --- .../web/static/src/core/debug/debug_menu.xml | 24 +++---- .../web/static/src/core/dropdown/dropdown.xml | 4 +- .../static/src/webclient/navbar/navbar.xml | 66 +++++++++---------- .../switch_company_menu.xml | 16 ++--- .../src/webclient/user_menu/user_menu.xml | 22 +++---- .../web/static/tests/core/dropdown_tests.js | 48 ++------------ 6 files changed, 72 insertions(+), 108 deletions(-) diff --git a/addons/web/static/src/core/debug/debug_menu.xml b/addons/web/static/src/core/debug/debug_menu.xml index 948caad0e78..309e61f5910 100644 --- a/addons/web/static/src/core/debug/debug_menu.xml +++ b/addons/web/static/src/core/debug/debug_menu.xml @@ -6,19 +6,19 @@ beforeOpen="beforeOpenDropdown" t-on-dropdown-item-selected.stop="onDropdownItemSelected" togglerClass="'btn btn-link'"> - - - - - - - - - - -