diff --git a/addons/mail/static/src/components/message/message.xml b/addons/mail/static/src/components/message/message.xml index bae4fa036b2..00ed545ac01 100644 --- a/addons/mail/static/src/components/message/message.xml +++ b/addons/mail/static/src/components/message/message.xml @@ -148,7 +148,7 @@ 'w-100': !(messageView.message.isDiscussionOrNotification or messageView.message.message_type === 'sms') and !messageView.isInChatWindow, 'me-2': messageView.isInChatWindowAndIsAlignedLeft and !messageView.composerViewInEditing, 'ms-2': messageView.isInChatWindowAndIsAlignedRight and !messageView.composerViewInEditing, - 'p-3': messageView.message.prettyBody !== '' and !messageView.composerViewInEditing, + 'p-3': messageView.message.prettyBody !== '' and !messageView.composerViewInEditing and (messageView.message.isDiscussionOrNotification or messageView.message.message_type === 'sms'), 'p-2': messageView.composerViewInEditing, 'text-muted': messageView.message.is_note and messageView.message.message_type !== 'sms', }" @@ -160,7 +160,6 @@ 'rounded-end-3': !messageView.isInChatWindowAndIsAlignedRight and (messageView.message.isDiscussionOrNotification or messageView.message.message_type === 'sms'), 'rounded-start-3': messageView.isInChatWindowAndIsAlignedRight and (messageView.message.isDiscussionOrNotification or messageView.message.message_type === 'sms'), 'rounded-bottom-3 border': messageView.message.isDiscussionOrNotification or messageView.message.message_type === 'sms', - 'rounded-3 bg-100 opacity-50': messageView.message.is_note and messageView.message.message_type !== 'sms', 'o-isAuthorNotCurrentUserOrGuest border-info bg-info-light': !messageView.message.isCurrentUserOrGuestAuthor and !messageView.message.isHighlighted and (messageView.message.isDiscussionOrNotification or messageView.message.message_type === 'sms'), 'border-success bg-success-light opacity-25': messageView.message.isCurrentUserOrGuestAuthor and !messageView.message.isHighlighted and (messageView.message.isDiscussionOrNotification or messageView.message.message_type === 'sms'), 'border-warning bg-warning-light opacity-50': messageView.message.isHighlighted and (messageView.message.isDiscussionOrNotification or messageView.message.message_type === 'sms'), @@ -201,19 +200,20 @@ 'position-absolute top-0': !messageView.isInDiscuss, 'start-0 ms-3': messageView.isInChatWindowAndIsAlignedRight, 'end-0 me-3': messageView.isInChatWindowAndIsAlignedLeft || messageView.isInChatter, - 'mt-n4': messageView.isInChatter, - 'mt-2': (messageView.isInDiscuss and messageView.message.isDiscussionOrNotification), + 'mt-n4': messageView.isInChatter and (messageView.message.isDiscussionOrNotification or messageView.message.message_type === 'sms'), + 'mt-n5': messageView.isInChatter and !(messageView.message.isDiscussionOrNotification or messageView.message.message_type === 'sms'), + 'mt-2': messageView.isInDiscuss and (messageView.message.isDiscussionOrNotification or messageView.message.message_type === 'sms'), 'mt-n3': messageView.isInChatWindow, 'ms-2': messageView.isInDiscuss, }" t-attf-class="{{ messageView.isActive ? 'visible' : 'invisible' }}" > - + -
+
diff --git a/addons/mail/static/tests/qunit_suite_tests/components/chat_window_manager_tests.js b/addons/mail/static/tests/qunit_suite_tests/components/chat_window_manager_tests.js index 793efd9d45b..14126fd72b3 100644 --- a/addons/mail/static/tests/qunit_suite_tests/components/chat_window_manager_tests.js +++ b/addons/mail/static/tests/qunit_suite_tests/components/chat_window_manager_tests.js @@ -919,7 +919,7 @@ QUnit.test('chat window: scroll conservation on toggle discuss', async function const pyEnv = await startServer(); const mailChannelId1 = pyEnv['mail.channel'].create({}); - for (let i = 0; i < 10; i++) { + for (let i = 0; i < 100; i++) { pyEnv['mail.message'].create({ body: "not empty", model: "mail.channel", @@ -1373,7 +1373,7 @@ QUnit.test('chat window with a thread: keep scroll position in message list on f const pyEnv = await startServer(); const mailChannelId1 = pyEnv['mail.channel'].create({}); - for (let i = 0; i < 10; i++) { + for (let i = 0; i < 100; i++) { pyEnv['mail.message'].create({ body: "not empty", model: "mail.channel", @@ -1521,7 +1521,7 @@ QUnit.test('chat window with a thread: keep scroll position in message list on t const pyEnv = await startServer(); const mailChannelId1 = pyEnv['mail.channel'].create({}); - for (let i = 0; i < 10; i++) { + for (let i = 0; i < 100; i++) { pyEnv['mail.message'].create({ body: "not empty", model: "mail.channel",