w3c / css-houdini-drafts

Mirror of https://hg.css-houdini.org/drafts
https://drafts.css-houdini.org/
Other
1.84k stars 141 forks source link

[scrolling] Examples of interesting Scroll Effects #45

Open grorg opened 9 years ago

grorg commented 9 years ago

As part of understanding what we need for Compositing/UI Workers/Scroll API, it would be good to list the types of effects we're planning to enable. Rick and Ian have already mentioned:

Some real work examples that are pretty interesting are:

What are others?

grorg commented 9 years ago

Rubber banding

grorg commented 9 years ago

Hidey Bars

Advanced

grorg commented 9 years ago

Pull to refresh

This is one of the more tricky effects.

This means the effect has a number of inputs and outputs. input: the scroll value, the limit of the rubber band output: the final scroll position, control over the refresh drawing animation, the ability to move the content by a certain amount, the ability to cancel the effect

grorg commented 9 years ago

Parallax

frivoal commented 9 years ago

I've run into articles from the New York Times filled with excellent use cases for customizable scrolling. They've made a number of interesting effects, from simple snap scroll or sticky positioning, to parallax effects, fading in and out, videos sync with scrolling, and many others things.

http://www.nytimes.com/interactive/2014/09/19/travel/reif-larsen-norway.html (fading, snap points, video/animation sync)

http://www.nytimes.com/projects/2013/gun-country/ (snap points, video sync)

http://www.nytimes.com/projects/2013/the-jockey/ (fading, snap points, video/animation sync, sticky positioning...) Note the interesting pull quotes that combine it all.

http://www.nytimes.com/projects/2013/tomato-can-blues/ (parallax, sticky positioning, progressively-insert-and-move-things,

http://www.nytimes.com/projects/2012/snow-fall/ (automatic scrolling, fading, video/animation sync, sticky positioning)

tdresser commented 8 years ago

We should enable custom image carousels, such as those with 3D transforms, which preserve native scrolling physics.

Most examples on the web today feel somewhat awkward. This at least illustrates the idea.

RByers commented 8 years ago

This is great Dean, thanks! Perhaps we should convert this into a use-cases.md file we can host in the repo or something? In particular I'd like to make some edits to some of your use cases (eg. to elaborate on the tricky bits). I'll add some more here for now though to stick with your style.

RByers commented 8 years ago

Custom scrollers

RByers commented 8 years ago

Re-targeting scrolling

RByers commented 8 years ago

Linked scrollers

RByers commented 8 years ago

Disable scroll chaining

RByers commented 8 years ago

Custom scroll limit

RByers commented 8 years ago

Custom overscroll effect

RByers commented 8 years ago

Dean - some notes to add to pull to refresh (capturing some of the trickier details for a really great effect)

RByers commented 8 years ago

Some additional notes for hidey bars

RByers commented 8 years ago

Scroll header

RByers commented 8 years ago

By the way, there are a number of interesting non-scrolling compositor working uses cases too. We'll add those to the repo elsewhere (perhaps we should split the issue label to separate compositor worker from scroll customization?).

grorg commented 8 years ago

We should definitely move these into a text file that we can all edit.

RByers commented 8 years ago

As Rossen suggests on public-houdini, I'm moving these to the wiki here.

RByers commented 8 years ago

Ugh, apparently there are still permissions problems with the Houdini wiki (eg. @tdresser joined CSSWG just so he'd have the ability to edit the wiki, but still has been unable to get permission). This is silly - GitHub has the collaboration model right. Let's put the use cases in the repo instead.

I've created this in a fork here. Once a first version is done, I'll push it back here.

RByers commented 8 years ago

Ok, everything is now copied here and here, though it probably needs some more cleanup / organization. Should we close this issue, or keep it open for discussion of further updates?

SebastianZ commented 4 years ago

Another example of some sticky scrolling behavior is shown by the Theia Sticky Sidebar.

If the element is larger than the viewport, it will be sticky to the bottom of the viewport once you've reached the bottom of it when scrolling down. And when scrolling up it's the other way round, i.e. it will be sticky to the top of the viewport once you've reached the top of the element.

For reference, I was directed to the Houdini APIs for this by https://github.com/w3c/csswg-drafts/issues/2558.

Sebastian