From 40dea12b02ebb82a0350cf1b4416c5e93bbe89be Mon Sep 17 00:00:00 2001 From: Brieuc-brd Date: Mon, 22 May 2023 11:59:24 +0000 Subject: [PATCH] [FIX] mail: remove unnecessary css in chatter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes the css that was creating two layout issues : [1] When the chatter was rendered under the form view with the `isInFormSheetBg` class, it added an unwanted background and border. [2] When an attachment was uploaded and created a preview (eg. in approvals), it created an unwanted border. This commit fixes these issues. task-3334866 Part of task-3326263 closes odoo/odoo#123095 X-original-commit: 5171b0bb2054f4755d0ba70b6820806c5253774d Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/attachments/attachment_view.scss | 1 - addons/mail/static/src/views/form/form_compiler.js | 2 +- addons/mail/static/src/views/form/form_renderer.scss | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/mail/static/src/attachments/attachment_view.scss b/addons/mail/static/src/attachments/attachment_view.scss index 259eca6f276..6d88167eab7 100644 --- a/addons/mail/static/src/attachments/attachment_view.scss +++ b/addons/mail/static/src/attachments/attachment_view.scss @@ -4,7 +4,6 @@ flex: 1 0 auto; overflow: hidden; width: $o-mail-Chatter-minWidth; - border-left: 1px solid map-get($grays, '400'); > .o-mail-Attachment { position: relative; diff --git a/addons/mail/static/src/views/form/form_compiler.js b/addons/mail/static/src/views/form/form_compiler.js index 70b648ea0fc..7accd14c205 100644 --- a/addons/mail/static/src/views/form/form_compiler.js +++ b/addons/mail/static/src/views/form/form_compiler.js @@ -112,7 +112,7 @@ patch(FormCompiler.prototype, "mail", { "t-if": `__comp__.hasFileViewer() and __comp__.uiService.size >= ${SIZES.XXL}`, }); const sheetBgChatterContainerHookXml = chatterContainerHookXml.cloneNode(true); - sheetBgChatterContainerHookXml.classList.add("o-isInFormSheetBg"); + sheetBgChatterContainerHookXml.classList.add("o-isInFormSheetBg", "w-auto"); setAttributes(sheetBgChatterContainerHookXml, { "t-if": `__comp__.hasFileViewer() and __comp__.uiService.size >= ${SIZES.XXL}`, }); diff --git a/addons/mail/static/src/views/form/form_renderer.scss b/addons/mail/static/src/views/form/form_renderer.scss index c68de30488e..c26f76e736f 100644 --- a/addons/mail/static/src/views/form/form_renderer.scss +++ b/addons/mail/static/src/views/form/form_renderer.scss @@ -26,8 +26,8 @@ } &.o-isInFormSheetBg { - background-color: $white; - border-top: 1px solid $border-color; + margin-left: calc(var(--formView-sheetBg-padding-x) * -1); + margin-right: calc(var(--formView-sheetBg-padding-x) * -1); } &:not(.o-aside):not(.o-full-width) .o-mail-Chatter {