From 4fa071339a8f381b1336fe326577c9decc04a1e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Tue, 21 Aug 2018 12:44:36 +0200 Subject: [PATCH] [FIX] mail: "is typing..." notification sticky top for DESC threads Before this commit, the 'is typing...' notification bar was sticky to the bottom of the thread, independently of the ASC or DESC mode order of threads. This is okay for ASC, but not for DESC: it should stick to the visible top of the thread for DESC. As a result, this notification bar was always at the top of the thread, without the 'sticky' behaviour: +--------[top]--------+ | X is typing... | | | | (newer messages) | | | |- - - - - - - - - - -| <---- visible top | | | ... | | message i + 1 | | message i | | ... | | | |- - - - - - - - - - -| <---- visible bottom | | | (older messages) | | | +------[bottom]-------+ With this commit, the 'is typing...' notification bar sticks to the visible top of DESC threads: +--------[top]--------+ | | | (newer messages) | | | |- - - - - - - - - - -| <---- visible top | X is typing... | | ... | | message i + 1 | | message i | | ... | | | |- - - - - - - - - - -| <---- visible bottom | | | (older messages) | | | +------[bottom]-------+ --- addons/mail/static/src/scss/thread.scss | 11 +++++++++-- addons/mail/static/src/xml/thread.xml | 15 ++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/addons/mail/static/src/scss/thread.scss b/addons/mail/static/src/scss/thread.scss index 227f3194937..13f73eb937e 100644 --- a/addons/mail/static/src/scss/thread.scss +++ b/addons/mail/static/src/scss/thread.scss @@ -3,7 +3,7 @@ text-align: center; } - .o_mail_thread_content_asc, .o_mail_thread_content_desc { + .o_mail_thread_content { display: flex; flex-direction: column; min-height: 100%; @@ -19,11 +19,18 @@ .o_thread_typing_notification_bar { flex: 0, 0, 20px; - @include o-position-sticky($bottom: 0px); @include o-transparent-background-color(0.75, white); padding: 5px; text-align: center; color: gray('600'); + + &.o_thread_order_asc { + @include o-position-sticky($bottom: 0px); + } + + &.o_thread_order_asc { + @include o-position-sticky($top: 0px); + } } .o_thread_tooltip_container { diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml index 3cfaa19cb3d..d88418ee921 100644 --- a/addons/mail/static/src/xml/thread.xml +++ b/addons/mail/static/src/xml/thread.xml @@ -167,7 +167,7 @@ ASC Order --> -
+
@@ -196,7 +196,7 @@ --> -
+
@@ -209,9 +209,14 @@ @param {mail.model.AbstractThread} thread --> -
-
-
+ +
+
+ + +
+
+