1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-21 07:42:09 +03:00
Commit Graph

123 Commits

Author SHA1 Message Date
fee8d79267 comment for PAGE_SIZE 2019-04-03 09:16:30 +02:00
86c13b97ce increase PAGE_SIZE so users can scroll up already while waiting for pag. 2019-04-02 17:54:14 +02:00
726e91101a allow fractional values for scrollTop above and below expected value 2019-04-02 17:53:53 +02:00
8e4a06db77 round scrollTop upwards to prevent never detecting bottom 2019-03-29 16:41:10 +01:00
1a264006f7 turn off debug logging 2019-03-28 18:42:49 +01:00
5d53913e35 fix filling conditions 2019-03-27 11:35:38 +01:00
f2f3661b7e more debug logging 2019-03-26 17:40:24 +01:00
46f5f872c4 implement scrolling to a token (best effort) 2019-03-26 15:51:02 +01:00
805539fdc7 remove timestamp logging in profiler 2019-03-26 13:44:39 +01:00
82a9b348c0 add some comments and initialization for async filling 2019-03-26 13:39:18 +01:00
18b5041ed2 try filling async instead of sync in scroll handler
see if that avoids jumps
2019-03-26 12:19:30 +01:00
8f7170a4a1 add timeline profiling markers when updateheight and onscroll run 2019-03-25 12:47:08 +01:00
c9c2519240 log scroll events 2019-03-22 15:47:04 +01:00
4bfdbe3094 fix jumping when unfilling the top while scrolling down 2019-03-22 15:23:21 +01:00
ab49bc4fcf fix comment typo 2019-03-21 15:37:35 +01:00
680afc5ce0 fix scrollToToken alignment 2019-03-21 15:37:06 +01:00
3e13a11372 restore scroll position after hiding typing notifs with checkScroll 2019-03-20 17:38:05 +01:00
02a5aa3b1f more logging cleanup 2019-03-20 17:15:43 +01:00
9da13fe430 small cleanup 2019-03-20 17:13:09 +01:00
a8b149cfbb cleanup scrollpanel logging 2019-03-20 17:12:49 +01:00
460f9a5959 comment typo 2019-03-20 17:10:38 +01:00
f164a78eaa reimplement typing notif timeline shrinking prevention
instead of setting a min-height on the whole timeline,
track how much height we need to add to prevent shrinking
and set paddingBottom on the container element of the timeline.
2019-03-20 17:10:30 +01:00
1e372aad47 only log when node was found 2019-03-20 11:10:04 +01:00
c306181fcd take into account that node might not be in DOM while updating height 2019-03-20 11:00:27 +01:00
88f039fe44 keep track of current updateHeight request outside of method
it's only called from one place
2019-03-20 10:59:55 +01:00
2bcced72ad take (potentially clipped) content height into account for filling 2019-03-19 16:51:39 +01:00
469511aa44 correctly calculate last node in viewport
these variables are now relative to bottom of timeline,
before it was the top
2019-03-19 16:50:55 +01:00
71f6b08b26 first impl of new scrolling, still a bit broken 2019-03-19 13:42:22 +01:00
d84003ac44 dont break room directory and search 2019-03-18 14:05:56 +01:00
891e343df6 create ResizeNotifier to derive which areas of the app resize and emit 2019-03-15 10:16:21 +01:00
30d848b86e use AutoHideScrollbar in ScrollPanel 2019-03-15 10:16:21 +01:00
10496cd4e8 also remove disconnecting from ResizeObserver 2019-03-11 10:32:30 +01:00
98a3f7db0f remove resizeobserver code
seems to cause more harm than good in some cases and we shouldn't need
it if we get our calls to onHeightChanged in order.
2019-03-07 17:22:27 +01:00
89b044f5d8 clearer naming in ScrollPanel 2019-03-07 17:02:19 +01:00
66b9363466 clear min-height for typing notifs when the timeline viewport changes size 2019-03-05 16:14:38 +01:00
37593c117a Revert "remove fix for old chrome bug"
This reverts commit ecb074862e.
2019-03-01 16:08:41 +01:00
0c06a702dc pr feedback 2019-02-28 16:05:55 +01:00
c920dd2e8a check top of node instead of bottom, since coming in from last
as we're approaching from the last node, if we're scrolled up,
the first node we encounter would be below the bottom of the viewport

change the logic to stop at the first node that has its top
above the viewport bottom.

When completely scrolled up, this was causing nodes way below
the viewport to be selected as the reference for the pixelOffset,
and when pagination came in, it would immediately try to apply
the big negative pixelOffset, scrolling to a negative scrollTop,
thus going to the top again, and triggering another pagination,
entering in an infinite pagination loop until you scrolled down.
2019-02-26 16:26:24 +01:00
ba5f16358f fall back to InteractionObserver for detecting timeline resizes
this is not nearly as smooth as using ResizeObserver, as the
callback rate is a lot lower, but seems to be quite a bit better
than what we have right now, without the 7% cpu hog that
the requestAnimationFrame polling fallback has.
2019-02-26 10:49:03 +01:00
3823642863 some cleanup 2019-02-26 10:49:03 +01:00
41ae618d0e only clear min-height on scroll & adding items (componentDidUpdate)
before we would clear it as soon as you were 1px away from
the bottom of the timeline, which would still create jumping as
the whitespace would around 36px. To play it safe, we only clear it
after moving 200px from the bottom.

Also include "local echo" scroll events, caused by setting scrollTop
2019-02-26 10:49:03 +01:00
03784e586c replace getBoundingClientRect() with offset/scrollTop & clientHeight
as they are an order of magnitude faster in most browsers,
getBoundingClientRect() tends to cause relayout.
2019-02-26 10:49:03 +01:00
ecb074862e remove fix for old chrome bug 2019-02-26 10:49:03 +01:00
b3e6cbfddd restore scroll state when timeline resizes using ResizeObserver
(only where supported, polyfill doesn't give good results)
2019-02-26 10:49:03 +01:00
9e260ad96b make sure we're at the bottom, although that seems to always be the case in this branch? 2019-02-14 16:19:58 +01:00
790e752b7a clear min-height on scroll 2019-02-14 16:11:38 +01:00
3d393b654b clear min-height on ScrollPanel::componentDidUpdate to catch all cases 2019-02-04 18:27:22 +00:00
5d45d5dfac formatting 2019-01-22 11:37:09 +01:00
018f3d2a5c use box-sizing: border-box to make clientHeight === actual height 2019-01-21 17:30:02 +01:00
c9d5c4903b set min-height of messagelist to current height when showing typing bar
this ensures the timeline never shrinks, and avoids jumpiness when
typing bar disappears again.
2019-01-18 18:53:54 +01:00