Commit graph

21 commits

Author SHA1 Message Date
Bruno Windels
75cbc1dc07 Adjust IndicatorScrollbar to not rely on AutoHideScrollbar for overflow 2020-03-26 11:17:35 +01:00
Michael Telatynski
4db8ef4d89 Correct case of propTypes property in ES6 React Components. React 16
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-06 14:27:33 +01:00
J. Ryan Stinnett
00dfdfe7f1
Fix linter warning 2019-06-28 15:16:44 +01:00
Matthew Hodgson
3873dc724a stupid linter >:( 2019-06-26 21:47:55 +01:00
Matthew Hodgson
7fc5d229d6 fix stuff as per review 2019-06-26 21:13:17 +01:00
Matthew Hodgson
3d11eb430b oops, remove old code 2019-06-26 18:38:46 +01:00
Matthew Hodgson
debcafd760 if on trackpad, don't mess with horizontal scrolling.
trackpad heuristic is 'if 15 minutes of no horizontal scrollwheel events, assume user may have switched to mousewheel'
2019-06-26 18:38:03 +01:00
Travis Ralston
7b00d29ea6 Don't boost trackpad users in breadcrumbs
Fixes https://github.com/vector-im/riot-web/issues/10005
2019-06-25 16:08:11 -06:00
Travis Ralston
8c414a9333 Counteract smooth scrolling on breadcrumbs
Smooth scrolling browsers (Firefox) use the relative area to determine how much scroll to apply. Because breadcrumbs are short vertically, the scroll amount is minimal (3 units) in the Y direction. On browsers which don't smooth scroll the units are usually much higher (100 in Chrome on Win 10). Users seem to expect the scrolling to be quicker due to the horizontal space on breadcrumbs, so we add a bit more power to their scroll when it looks small.

Fixes https://github.com/vector-im/riot-web/issues/9394
2019-06-02 23:59:02 -06:00
Travis Ralston
f7ba8ffbd0 Translate scroll movement if the deltaX is the same as the threshold
Because the threshold is zero and the X movement is zero, we were not translating vertical movement to horizontal scrolling. 

Fixes https://github.com/vector-im/riot-web/issues/9804
2019-05-22 10:19:38 -06:00
Travis Ralston
934ca6908f Remove breadcrumb scroll tolerances and use sensible defaults
Fixes https://github.com/vector-im/riot-web/issues/9394
Fixes https://github.com/vector-im/riot-web/issues/9400

Numbers chosen based on user feedback. The setting has also been removed because it isn't really needed anymore.
2019-04-11 11:07:31 -06:00
Travis Ralston
aa96fd27cc Add some tolerances to breadcrumb scrolling
See https://github.com/vector-im/riot-web/issues/9400
See https://github.com/vector-im/riot-web/issues/9394

Tolerances are defined as a device-only setting to give advanced users an option to override the values. No UI is exposed for this. 

The default values are picked for assumptions on comfort, however as people change the tolerances themselves the defaults may need to change.
2019-04-08 10:56:44 -06:00
Travis Ralston
6a8b98eb71
Merge pull request #2877 from matrix-org/travis/breadcrumbs/scroll-left
Translate vertical scrolling to horizontal movement in breadcrumbs
2019-04-05 09:51:13 -06:00
Travis Ralston
04b521c48b Scroll breadcrumbs to the left when they change
Fixes https://github.com/vector-im/riot-web/issues/9355
2019-04-04 17:03:06 -06:00
Travis Ralston
138fd4ec87 Translate vertical scrolling to horizontal movement in breadcrumbs
Fixes https://github.com/vector-im/riot-web/issues/9314
2019-04-04 16:43:04 -06:00
Travis Ralston
87ca3069bb Misc code cleanup 2019-03-28 10:43:01 -06:00
Travis Ralston
9b64dd0cd7 Support horizontal scrolling on breadcrumbs
Fixes https://github.com/vector-im/riot-web/issues/8714
Fixes https://github.com/vector-im/riot-web/issues/8890
Fixes https://github.com/vector-im/riot-web/issues/9034
Fixes https://github.com/vector-im/riot-web/issues/8954

This turned out to be much more complicated than it needed to be. We use an IndicatorScrollbar to do all the math for us and some minor changes have been made so it can flag left/right overflow. The complicated part is the css changes which make the gradients work: unlike the RoomSubList, we have to calculate the offset of the indicators (gradients) on our own because position:sticky doesn't work horizontally.

The changes to the css (well, mostly pointer-events:none) make it so the gradient doesn't interfere with the room avatars. 

9034 and 8954 are fixed by this because they represent an overflow-x:none style breakage where browsers won't let you scroll without a scrollbar. The gradient offset problem is also demonstrated in 8954.
2019-03-27 17:52:05 -06:00
Bruno Windels
3ce2309ae2 get scrolltop and scrollevent out of autohide/indicator scrollbar 2019-02-13 14:49:14 +01:00
J. Ryan Stinnett
989227d435 Fix line length lint warnings
I am about to run some code replacements that might make lines too long, so with
this change I know we're starting from 0 line length warnings.
2019-01-17 22:06:49 -06:00
Bruno Windels
e67d9c6d4f forward checkOverflow to AutoHideScrollbar, fix over/underflow detection
the overflow/underflow events are not always reliable in nooverlay
browsers (FF), so forward the checkOverflow call we need anyway
for the scroll indicator gradients to see if we need to do the
margin trick for the on-hover scrollbar we use in nooverlay browsers.

this fixes on hover jumping in a subroomlist
2018-12-18 14:29:42 +01:00
Bruno Windels
0f226853f5 add scroll indicator gradients to top and bottom of room sub list 2018-11-12 12:57:21 +01:00