Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-11-15 08:10:40 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-11-20 14:18:15 +0300
commite96d9d19d9346854cad24dbc8993dae5f63f200b (patch)
tree103be67c32ea306197a9dec056c0413f0d8e6c97 /templates
parenta76f6d64d0f192cb8e42ae4c912ee461b3c60ba5 (diff)
Use VirtualList for the message list in the chat view
The virtual list requires that its internal wrappers use an absolute position. Due to that absolute position the padding of the container does not affect the wrappers, so the desired padding must be applied through its left and right position. As the virtual list keeps only a subset of its elements in the DOM the ":first-child" pseudo-selector no longer refers to the actual first child element, but to the first one currently in the DOM; it would be necessary to apply the CSS rules using a specific CSS class set only in the desired element. However, as the first comment always includes the date separator, which already has a top margin, the top padding is not really needed in the first comment, so it was simply removed. Moving the message list between the main view and the sidebar changes its size, and thus it is necessary to reload the virtual list; when the virtual list is reloaded it is ensured that the last visible element will still be visible after the reload, so the chat view no longer needs to explicitly handle that. In a similar way, the message list also needs to be reloaded when the window is resized, or when the chat view is in the main view and the sidebar is opened or closed, as those actions change the size of the main view. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/index-public.php1
-rw-r--r--templates/index.php1
2 files changed, 2 insertions, 0 deletions
diff --git a/templates/index-public.php b/templates/index-public.php
index 562200b03..f85a7326f 100644
--- a/templates/index-public.php
+++ b/templates/index-public.php
@@ -32,6 +32,7 @@ script(
'views/roomlistview',
'views/sidebarview',
'views/tabview',
+ 'views/virtuallist',
'richobjectstringparser',
'simplewebrtc',
'webrtc',
diff --git a/templates/index.php b/templates/index.php
index d56c20ff2..0263073cd 100644
--- a/templates/index.php
+++ b/templates/index.php
@@ -31,6 +31,7 @@ script(
'views/roomlistview',
'views/sidebarview',
'views/tabview',
+ 'views/virtuallist',
'richobjectstringparser',
'simplewebrtc',
'webrtc',