From 0f6e28098e0f56e02b17c6cba5fc9fdc2ef4b96b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Tue, 1 Aug 2023 13:11:29 +0000 Subject: [PATCH] [FIX] mail: starred counter should have muted background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, all badge color matched the messaging menu color badge. Most badge counter in discuss show needaction counter, so it makes sense to have a catchy color scheme (e.g. white text on red background). For starred counter in discuss sidebar, the counter is meant to see at a glance how many messages are starred, without it being too catchy. This commit fixes the issue by introducing a `o-muted` modifier on `o-discuss-badge`, which displays a grey background for starred counter. Also fixes a bug in dark mode where badge background color was incorrect. closes odoo/odoo#130452 X-original-commit: de232c330140fd4156e7f416fddfce88b21e71c5 Signed-off-by: Didier Debondt (did) Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/core/common/core.dark.scss | 2 +- addons/mail/static/src/core/common/core.scss | 4 ++++ addons/mail/static/src/core/web/discuss_sidebar_mailboxes.xml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/mail/static/src/core/common/core.dark.scss b/addons/mail/static/src/core/common/core.dark.scss index a261430d7c8..f2f3f5d22de 100644 --- a/addons/mail/static/src/core/common/core.dark.scss +++ b/addons/mail/static/src/core/common/core.dark.scss @@ -1,3 +1,3 @@ .o-discuss-badge { - background-color: $primary; + --o-discuss-badge-bg: #{$primary}; // sync with --o-navbar-badge-bg } diff --git a/addons/mail/static/src/core/common/core.scss b/addons/mail/static/src/core/common/core.scss index 863218ac738..05605518b57 100644 --- a/addons/mail/static/src/core/common/core.scss +++ b/addons/mail/static/src/core/common/core.scss @@ -10,6 +10,10 @@ --o-discuss-badge-bg: #{$o-success}; // sync with --o-navbar-badge-bg color: $white !important; background-color: var(--o-discuss-badge-bg) !important; + + &.o-muted { + --o-discuss-badge-bg: #{$gray-400}; + } } .o-discuss-badge, .o-discuss-badgeShape { diff --git a/addons/mail/static/src/core/web/discuss_sidebar_mailboxes.xml b/addons/mail/static/src/core/web/discuss_sidebar_mailboxes.xml index 1649999687e..4a7c9b90173 100644 --- a/addons/mail/static/src/core/web/discuss_sidebar_mailboxes.xml +++ b/addons/mail/static/src/core/web/discuss_sidebar_mailboxes.xml @@ -30,7 +30,7 @@