Commit graph

138 commits

Author SHA1 Message Date
Travis Ralston
0a6f54da33 Label and use UNSAFE_componentWillMount to minimize warnings
These TODO comments are expected to be fixed ASAP, but until that happens let's minimize the errors in the console for development.

For https://github.com/vector-im/riot-web/issues/12877

These all aren't using componentDidMount because they do something which causes application instability if componentDidMount were used. Much of these calls are expected to move into constructors once they are converted to real classes.
2020-03-31 14:15:23 -06:00
Michael Telatynski
44b0aa2d88 Remove remainders of gemini-scrollbar and react-gemini-scrollbar
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-17 10:31:45 +00:00
Bruno Windels
3e39cebb8f also use relative scrolling when eh ... doing relative scrolling 2020-03-03 15:44:59 +01:00
Bruno Windels
223956a206 add comment how offset from bottom is calculated 2020-03-03 15:42:44 +01:00
Bruno Windels
f9d2d45b24 use relative scrolling to compensate when changing height 2020-03-03 15:42:22 +01:00
Michael Telatynski
604e244265 Attempt to fix Safari + VoiceOver misunderstanding the timeline list 2020-01-23 14:53:41 +00:00
Travis Ralston
fde32f13a5 [CONFLICT CHUNKS] Merge branch 'develop' into travis/sourcemaps-develop 2020-01-09 14:15:09 -07:00
Travis Ralston
344dac4fb9 Convert CommonJS exports to ES6-compatible exports
We use `export default` begrudgingly here. Ideally we'd use just `export`, though this entire SDK expects things to be exported as a default. Instead of breaking everything, we'll sacrifice our export pattern for a smaller diff - a later commit can always do the default export -> regular export conversion.
2019-12-22 21:01:02 -07:00
Michael Telatynski
d28a892bb0 Stop using KeyboardEvent.keyCode as it is deprecated 2019-12-16 17:14:03 +00:00
Michael Telatynski
d22985f12e Migrate string refs over to createRef
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-12-08 12:16:17 +00:00
Michael Telatynski
d4d51dc61f Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
Bruno Windels
9fa7990996 prevent error for empty list 2019-11-06 10:34:22 +01:00
J. Ryan Stinnett
3a428efb60 Abort scroll updates when already unmounted
This checks whether we're unmounted before updating scroll state, as we use
async functions and timeouts in this area.

Fixes https://github.com/vector-im/riot-web/issues/11150
2019-10-18 18:01:57 +01:00
Michael Telatynski
abf111ecbd Migrate away from React.createClass for non-auth structures. React 16 :D
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-30 10:34:59 +01:00
Bruno Windels
14caed62d0 make sure scrollpanel is mounted before checking scroll
have seen errors in this direction, so hope this will fix it,
as this is invoked from any EventTile's onHeightChanged callback,
which is often called after some async operation (by when the
timeline can be unmounted already).
doesn't hurt in any case.
2019-07-02 17:29:37 +02:00
Bruno Windels
fee8d79267 comment for PAGE_SIZE 2019-04-03 09:16:30 +02:00
Bruno Windels
86c13b97ce increase PAGE_SIZE so users can scroll up already while waiting for pag. 2019-04-02 17:54:14 +02:00
Bruno Windels
726e91101a allow fractional values for scrollTop above and below expected value 2019-04-02 17:53:53 +02:00
Bruno Windels
8e4a06db77 round scrollTop upwards to prevent never detecting bottom 2019-03-29 16:41:10 +01:00
Bruno Windels
1a264006f7 turn off debug logging 2019-03-28 18:42:49 +01:00
Bruno Windels
5d53913e35 fix filling conditions 2019-03-27 11:35:38 +01:00
Bruno Windels
f2f3661b7e more debug logging 2019-03-26 17:40:24 +01:00
Bruno Windels
46f5f872c4 implement scrolling to a token (best effort) 2019-03-26 15:51:02 +01:00
Bruno Windels
805539fdc7 remove timestamp logging in profiler 2019-03-26 13:44:39 +01:00
Bruno Windels
82a9b348c0 add some comments and initialization for async filling 2019-03-26 13:39:18 +01:00
Bruno Windels
18b5041ed2 try filling async instead of sync in scroll handler
see if that avoids jumps
2019-03-26 12:19:30 +01:00
Bruno Windels
8f7170a4a1 add timeline profiling markers when updateheight and onscroll run 2019-03-25 12:47:08 +01:00
Bruno Windels
c9c2519240 log scroll events 2019-03-22 15:47:04 +01:00
Bruno Windels
4bfdbe3094 fix jumping when unfilling the top while scrolling down 2019-03-22 15:23:21 +01:00
Bruno Windels
ab49bc4fcf fix comment typo 2019-03-21 15:37:35 +01:00
Bruno Windels
680afc5ce0 fix scrollToToken alignment 2019-03-21 15:37:06 +01:00
Bruno Windels
3e13a11372 restore scroll position after hiding typing notifs with checkScroll 2019-03-20 17:38:05 +01:00
Bruno Windels
02a5aa3b1f more logging cleanup 2019-03-20 17:15:43 +01:00
Bruno Windels
9da13fe430 small cleanup 2019-03-20 17:13:09 +01:00
Bruno Windels
a8b149cfbb cleanup scrollpanel logging 2019-03-20 17:12:49 +01:00
Bruno Windels
460f9a5959 comment typo 2019-03-20 17:10:38 +01:00
Bruno Windels
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
Bruno Windels
1e372aad47 only log when node was found 2019-03-20 11:10:04 +01:00
Bruno Windels
c306181fcd take into account that node might not be in DOM while updating height 2019-03-20 11:00:27 +01:00
Bruno Windels
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
Bruno Windels
2bcced72ad take (potentially clipped) content height into account for filling 2019-03-19 16:51:39 +01:00
Bruno Windels
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
Bruno Windels
71f6b08b26 first impl of new scrolling, still a bit broken 2019-03-19 13:42:22 +01:00
Bruno Windels
d84003ac44 dont break room directory and search 2019-03-18 14:05:56 +01:00
Bruno Windels
891e343df6 create ResizeNotifier to derive which areas of the app resize and emit 2019-03-15 10:16:21 +01:00
Bruno Windels
30d848b86e use AutoHideScrollbar in ScrollPanel 2019-03-15 10:16:21 +01:00
Bruno Windels
10496cd4e8 also remove disconnecting from ResizeObserver 2019-03-11 10:32:30 +01:00
Bruno Windels
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
Bruno Windels
89b044f5d8 clearer naming in ScrollPanel 2019-03-07 17:02:19 +01:00
Bruno Windels
66b9363466 clear min-height for typing notifs when the timeline viewport changes size 2019-03-05 16:14:38 +01:00