From af89b46c5b25ad8f5ee2cdbc3d2110b6f32320b3 Mon Sep 17 00:00:00 2001 From: "Dardenne Florent (dafl)" Date: Wed, 31 Aug 2022 11:38:59 +0000 Subject: [PATCH] [IMP] web: `DomainSelector`: enhance user experience MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The purpose of this commit is to improve the domain selector UX with multiple little changes: - The model field selector popover is now autofocused when opened - Removal of a div that appeared during a hover on "add leaf" and "ellipsis button" - Caret icon next to the root node selector - Minor CSS changes task-2861497 closes odoo/odoo#99321 Signed-off-by: Géry Debongnie --- .../domain_selector_branch_operator.js | 4 +++ .../domain_selector_branch_operator.xml | 20 +++++++------- .../domain_selector_leaf_node.xml | 2 +- .../domain_selector_root_node.xml | 2 +- .../model_field_selector.js | 1 + .../model_field_selector_popover.js | 4 +++ .../model_field_selector_popover.xml | 2 +- .../web/static/src/core/popover/popover.scss | 8 ++++++ .../src/legacy/scss/domain_selector.scss | 26 +++---------------- .../tests/core/model_field_selector_tests.js | 7 ++++- 10 files changed, 40 insertions(+), 36 deletions(-) diff --git a/addons/web/static/src/core/domain_selector/domain_selector_branch_operator.js b/addons/web/static/src/core/domain_selector/domain_selector_branch_operator.js index 539ed130048..71f724b9eb5 100644 --- a/addons/web/static/src/core/domain_selector/domain_selector_branch_operator.js +++ b/addons/web/static/src/core/domain_selector/domain_selector_branch_operator.js @@ -17,4 +17,8 @@ DomainSelectorBranchOperator.template = "web.DomainSelectorBranchOperator"; DomainSelectorBranchOperator.props = { node: Object, readonly: Boolean, + showCaret: { + type: Boolean, + optional: true, + }, }; diff --git a/addons/web/static/src/core/domain_selector/domain_selector_branch_operator.xml b/addons/web/static/src/core/domain_selector/domain_selector_branch_operator.xml index 2d2a31ab6e6..35c3e67281c 100644 --- a/addons/web/static/src/core/domain_selector/domain_selector_branch_operator.xml +++ b/addons/web/static/src/core/domain_selector/domain_selector_branch_operator.xml @@ -3,23 +3,23 @@ -
- +
+ - All - Any - None + all + any + none - All - Any + all + any
- ALL - ANY - NONE + all + any + none diff --git a/addons/web/static/src/core/domain_selector/domain_selector_leaf_node.xml b/addons/web/static/src/core/domain_selector/domain_selector_leaf_node.xml index 492a5d93b63..642749ea63b 100644 --- a/addons/web/static/src/core/domain_selector/domain_selector_leaf_node.xml +++ b/addons/web/static/src/core/domain_selector/domain_selector_leaf_node.xml @@ -42,7 +42,7 @@
-