Profile

Scrapbook photo 1
Scrapbook photo 2
Scrapbook photo 3
Scrapbook photo 4
Scrapbook photo 5
Dimitri Glazkov
680,502 views
AboutPostsPhotosReviews

Stream

 
 
I'd like to soapbox about the need for rationality in the web platform, using position:sticky as a guinea-pig to explain my perspective.

The thing that bugs me about position:sticky is that is entangled with the magical nature of scrolling on the web. Per spec, the browser can scroll the page up and down without telling JS: you get a scroll event, but it happens after the scroll has actually happened.

Wat.

Here's the thing: this ability in browsers is super important, because scrolling is super duper important to get right for users. Without it, going to espn.com and scrolling is a really horrible user experience. On mobile, that poor site janks for a half second while it loads. I NEED MY SPORTS SCORES TO SCROLL AT 60FPS. The browser works around this by making scroll asynchronous. A simpler example is this: http://jankfree.org/examples/simple_jank.html : on mobile browsers, this scrolls smoothly, even though in devtools you'll see that the page is a cataclysm of jank.

Unfortunately, we've painted ourselves into a corner here, with regard to position:sticky and all other scroll coupled effects. If you try to polyfill sticky positioning, you get jitter. Typically, the user's scroll is immediately handled by the browser, drawn to the screen as fast as possible so it feels responsive. THEN the browser tells JS about it. The polyfill thus hears about the onscroll too late: it valiantly tries to update the sticky position, but the page has been sent to the screen with the movement already applied, so the user perceives a little jump in the next frame as the polyfill's reaction finally makes it onscreen. Designers get cranky, and you don't get to go to space.

Because of this, we have a promulgation of urgent-for-some spec needs: anytime a user wants a scroll-coupled effect, they need need new spec. That gets scary quickly, because lets face it, there's a ton of cool stuff you an do in response to scroll. We articulated this concern once for snap points, here: http://lists.w3.org/Archives/Public/www-style/2014Feb/0769.html 

Sticky positioning is in this space too. A common misconception is that position:sticky is an easily speccable, ready to go, kind of thing. In reality, there many many many variations on position:sticky-ish behavior out there for every simple use case, so speccing it is all about compromises and generalization. Even if we implement a common form of position:sticky, there will be corner cases we don't implement. Want your element to sing a sea shanty and then shrink to scale(0) as it falls offscreen? Sorry, please wait for Level 2 version, tentatively titled "position: even-more-sticky."

So, what to do?

As some might recall, +Dimitri Glazkov wrote a great essay on our need for a rational web platform a while back (https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/4jBAnIVwrt0). In it, he points out that we must first and foremost "explain the magic" behind our browser.

I submit that much of the sticky positioning debacle is fallout from the browser being magical about scroll. First and foremost, in this space, we need to explain the magic to the page: that way when the magic isn't quite right, you can get around it to do things your way.

What form should this particular fix to the magic take? Not sure, yet! Maybe we need to explain browser-side scrolling using some new APIs. Or maybe we need to allow content to opt-out of this magic. +Rick Byers has some much more formed ideas on how this might be done.

Important for me is embracing the idea of layering and accidental magic, recognizing that the lack of layering can take a basic feature request and turn it into a much bigger problem.

Consider: if we had a web that had an opt-out for magical scrolling, then we'd have plenty of content out there today doing position:sticky effects. Sure, there'd be the odd incurably janky page out there that wanted sticky, too. And there'd be people asking for sticky effects to be easier to author.

Both are great feature requests. With the immediate "I CANT IMPLEMENT THIS" fires resolved, we can then work through those goals at a normal and healthy web platform pace.

So, here's to identifying layers in the web platform, and fixing the bugs that cause layering to go wonky. And, here's to picking a subset of the most commonly occurring cases on the web and making those easy (https://code.google.com/p/chromium/issues/detail?id=231752).
1
1
Matt Dragon's profile photo
Add a comment...
 
There goes my money.
 
Welcome to the Native Instruments Google+ channel. This page will be updated with key information from the world of NI.

Don't forget to add +TRAKTOR , +MASCHINE and +KOMPLETE  to your circles for even more focused and detailed info about the future of sound.
4
Greg Simon's profile photoHongchan Choi's profile photo
2 comments
 
I have always wondered why NI does not build a real host app when they are completely capable of that. Loved what they did with MASCHINE!
Add a comment...

Dimitri Glazkov

Shared publicly  - 
 
Had a rough day? Need a boost of positive energy? I made a song for you. Love you peeps.
dglazkov
Valentines 1
6
Greg Simon's profile photo
 
"keep moving forward."  - Walt Disney
Add a comment...

Dimitri Glazkov

Shared publicly  - 
 
We love you too, +Google Shopping Express!
10
Add a comment...

Dimitri Glazkov

Shared publicly  - 
 
Crystal Method did well on this. The whole album is solid work. I particularly like Difference, the fascinating cross between Dan Henley and Skrillex that actually works.
3
Peter Kasting's profile photo
 
I was so disappointed in Divided By Night -- a couple of great songs and the rest of the album shockingly weak.

Will check this album out, but my hopes are not high.
Add a comment...

Dimitri Glazkov

Shared publicly  - 
 
Started noodling around with music again. Wow, so much have changed since back then. So much to learn. So many new mistakes to make.
dglazkov
Happy New Year 4
6
Add a comment...
 
On Valentine's Day, we Blink folk sent our colleagues on WebKit team a chocolate cake. Today, WebKit folks reciprocated with a cake of their own -- a gorgeous White [1] cake.

Make of it what you want, but it's a beautiful story, really. Where in the end, everybody is happily munching on sweets :)

[1] http://en.wikipedia.org/wiki/White_Day
39
7
Greg Simon's profile photoJun Mukai's profile photoSverre Rabbelier's profile photoTakashi Toyoshima's profile photo
2 comments
 
"as an expression of love, courtesy, or social obligation". Well well. 
Add a comment...

Dimitri Glazkov

Shared publicly  - 
 
Just because I love you people, here's another reminder to turn on 2-Step Verification on your account. This is important. One day you'll be like, "oh, I wish I acted on Dimitri's reminder". But it will be too late. And you'll be like, "aw jerks". Sooo... Don't be too late, brah.
14
2
Ernesto Alejo's profile photoGreg Simon's profile photoShane Menshik's profile photo
2 comments
 
Truth. I sleep soo much better having it on my private gmail account.
Add a comment...

Dimitri Glazkov

Shared publicly  - 
 
Purchased some boxed software (!!) on a DVD (!!!). It's exhilarating to reconnect with your history.
7
2
Dimitri Glazkov's profile photoAbdellah Garmali's profile photoWildman M.'s profile photoIan Fette's profile photo
4 comments
 
That's almost as big as a floppy disc. How many MBs is it? Hopefully not more than 5.25. Otherwise, I'm going back to Windows 7.
Add a comment...

Dimitri Glazkov

Shared publicly  - 
 
The one where I ruminate of layers, platforms, cabbages, and kings.

cross-posting from blink-dev
16
16
Sam Carecho's profile photoDavid Davida's profile photoMalte Ubl's profile photoMike Fotinakis's profile photo
5 comments
 
> HTML is a UI toolkit

i feel very uncomfortable with that statement. i do understand where the author is coming from though...
Add a comment...
Basic Information
Gender
Male
Work
Occupation
Blink Man at Google
Links
Nice place for folks who have dietary restrictions, especially those who need to stay away from dairy. Intriguing and tasty dishes at nearly fast-food prices. However, meat-eaters -- skip the burger. You will be disappointed.
Food: Very goodDecor: Very goodService: Very good
Public - a year ago
reviewed a year ago
1 review
Map
Map
Map