From b2f935efb5ff4cbc673e48f6460868d8996eadcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Wed, 5 Jul 2023 11:17:44 +0000 Subject: [PATCH] [FIX] mail: make message actions float in mailboxes on mobile Before this commit, message actions were floating on top-right corner only in chat windows. In mobile, most threads are shown in a (fullscreen) chat windows. Some exceptions are mailboxes and chatters in an Odoo view. As a result, lots of horizontal space is wasted for this action, so that messages take only half of the screen width. This commit fixes the issue by using floating visual of message action list when in chat window or in mobile. That way, when the width of thread is small, then messages take most of the container width thanks to actions being in floated layout. Task-3411797 closes odoo/odoo#127569 X-original-commit: fb100f848388d6e50029a81080e051c77cc057c2 Signed-off-by: Didier Debondt (did) --- addons/mail/static/src/core/common/message.js | 1 + addons/mail/static/src/core/common/message.xml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/mail/static/src/core/common/message.js b/addons/mail/static/src/core/common/message.js index 4624b6d8db5..214a6514e98 100644 --- a/addons/mail/static/src/core/common/message.js +++ b/addons/mail/static/src/core/common/message.js @@ -103,6 +103,7 @@ export class Message extends Component { this.attachmentService = useService("mail.attachment"); this.user = useService("user"); this.dialog = useService("dialog"); + this.ui = useState(useService("ui")); this.openReactionMenu = this.openReactionMenu.bind(this); useChildSubEnv({ alignedRight: this.isAlignedRight, diff --git a/addons/mail/static/src/core/common/message.xml b/addons/mail/static/src/core/common/message.xml index 7563ddabca7..7814202c2d4 100644 --- a/addons/mail/static/src/core/common/message.xml +++ b/addons/mail/static/src/core/common/message.xml @@ -105,9 +105,9 @@