thymeleaf / thymeleaf-docs

Thymeleaf documentation
Apache License 2.0
44 stars 54 forks source link

Smooth scrolling in the docs gets in the way of reading the docs #54

Closed lourish closed 6 years ago

lourish commented 6 years ago

Would it be possible to ditch the javascript scrolling behaviour in the docs, please (http://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html), as it is pointlessly annoying. For example it takes 6 seconds (I timed it) for me to get to the docs for lists when it could (should) be instantaneous.

The docs are there to be consulted by developers; I cannot imagine a single developer who would prefer waiting seconds for a fancy scroll to finish over getting the information he/she came to the site to read.

ultraq commented 6 years ago

6 seconds? Cripes 😮 The use case for the addition was that on mobile, where the Table of Contents appears as a toggled overlay instead of alongside the content on a tablet-sized screens and larger, selecting an item made it look like nothing happened at all because the change of the content was obscured.

Anyway, I'll do something about it this weekend: maybe remove it, or make it target only mobile viewports.

Out of curiousity, can you think of anything that would make the transition take so long, whether it's browser, extensions, or hardware? I ask because this scrolling behaviour, as far as I know, is only available on Firefox without modification (http://caniuse.com/#feat=css-scroll-behavior), on which my own testing the transition is less than 1 second. I'd like to be able to replicate the situation, see if I can learn anything about it, so that the mobile scenario is still catered for without it impacting your (or others on similar configurations) experience.

lourish commented 6 years ago

It's faster on Firefox (takes around a second). On my mac and windows 7 machines with Chrome (Version 61.0.3163.100 (Official Build) (64-bit)) it's around the same time of 6 seconds. It's just as slow incognito without addons.

Disabling the scroll-behaviour css on content-wrapper in the Chrome dev tools sorts it out.

On Fri, 3 Nov 2017 at 20:26 Emanuel Rabina notifications@github.com wrote:

6 seconds? Cripes 😮 The use case for the addition was that on mobile, where the Table of Contents appears as a toggled overlay instead of alongside the content on a tablet-sized screens and larger, selecting an item made it look like nothing happened at all because the change of the content was obscured.

Anyway, I'll do something about it this weekend: maybe remove it, or make it target only mobile viewports.

Out of curiousity, can you think of anything that would make the transition take so long, whether it's browser, extensions, or hardware? I ask because this scrolling behaviour, as far as I know, is only available on Firefox without modification ( http://caniuse.com/#feat=css-scroll-behavior), on which my own testing the transition is less than 1 second. I'd like to be able to replicate the situation, see if I can learn anything about it, so that the mobile scenario is still catered for without it impacting your (or others on similar configurations) experience.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thymeleaf/thymeleaf-docs/issues/54#issuecomment-341817287, or mute the thread https://github.com/notifications/unsubscribe-auth/ACjP7b2QYVfu50aM0LBT0Qw1IJgprfZ8ks5sy3bpgaJpZM4QRDFS .

ultraq commented 6 years ago

Sweet, thanks for testing and sharing how it is between Firefox and Chrome. I've pulled up Chrome (and had it update - haven't used it in a while), and it's as horrendous as you say. Glad they finally came to the party with smooth-scrolling via CSS properties, but can't say I'm a fan of the implementation.

Given that, I'll more likely start by straight-up removing the smooth scrolling while I rethink how we present the Table of Contents and the transition to different parts of the doc for mobile users.

lourish commented 6 years ago

Great, thanks Emanuel. I guess one browser's smooth is another's smoooooooooooooooooooooooooooooooooooooooooooth!

On Fri, 3 Nov 2017, 22:21 Emanuel Rabina, notifications@github.com wrote:

Sweet, thanks for testing and sharing how it is between Firefox and Chrome. I've pulled up Chrome (and had it update - haven't used it in a while), and it's as horrendous as you say. Glad they finally came to the party with smooth-scrolling via CSS properties, but can't say I'm a fan of the implementation.

Given that, I'll more likely start by straight-up removing the smooth scrolling while I think about how we present the Table of Contents and the transition to different parts of the doc for mobile users.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thymeleaf/thymeleaf-docs/issues/54#issuecomment-341841539, or mute the thread https://github.com/notifications/unsubscribe-auth/ACjP7WclqZkWm6krow8ovCu3KK43er5-ks5sy5HpgaJpZM4QRDFS .

ultraq commented 6 years ago

Smooth-scrolling removed, might need to refresh your browser to get the updated CSS.

I've raised a separate issue to revisit the mobile use case in the future. Thanks for your report! 👍

lourish commented 6 years ago

Works perfectly now, thanks for the quick turnaround