#197: Intersection Observer review

Visit on Github.

Opened Sep 15, 2017

The WebPlat WG has just published the FPWD of Intersection Observer, triggering wide review. Thanks to its time in incubation, the spec already has good interop, so we're hopeful of moving to CR reasonably quickly.

We'd welcome a review by the TAG. Feedback no later than Friday 27th October would be appreciated, feedback earlier even more so.

Please file issues on the Intersection Observer repo. Thank you.

Discussions

Comment by @dbaron Sep 27, 2017 (See Github)

So one thing I need to investigate further is that it feels to me that intersection observer running before the animation frame callbacks seems wrong, I think it should run substantially after them, with a bunch of other stuff in between, since rAF is primarily a writing callback (so should be early, before the natural style/layout), whereas IntersectionObserver is primarily a reading callback (so should be late, after the natural style/layout). But I suspect that some of my concern there may be that I think where HTML describes the running of the animation frame callbacks being wrong. I think this requires a good bit of digging into (to see what current specs say, and how interoperable existing implementations are); it's related to our #72.

Comment by @plinss Sep 27, 2017 (See Github)

I have concerns about the rootMargin being a string based API. This should be using CSS Typed OM if not now, at least some point if the future. The spec should at a minimum have a note about a typed OM version of the margin.

Comment by @LJWatson Oct 19, 2017 (See Github)

Gentle ping to remind you that we're looking for issues to be filed by the end of next week. Thanks.

Comment by @slightlyoff Oct 31, 2017 (See Github)

Discussed on today's call. Sounds like the delivering timing needs a look.

/cc @szager-chromium

Comment by @torgo Dec 12, 2017 (See Github)

Discussed on today's telecon.

Comment by @dbaron Feb 1, 2018 (See Github)

I'd like to leave this open to monitor the progress on w3c/IntersectionObserver#263 and whatwg/html#3246 etc.

Discussed Mar 6, 2018 (See Github)

David: Wanted to follow-up on an rather involved issue--but haven't followed up yet.

Alex: fine with kicking down the road.

Peter: how long?

David: perhaps move to the F2F.

Discussed Sep 4, 2018 (See Github)

David: I think one of the problems was that they were inserting stuff into a list that different people interpreted this differently. The issue I believe is attempting to specify this better.

Alex: Probably worth checking across implementations...turns out there are several; Edge, Gecko, Blink.

David: The details that I mentioned might not be interoperable but not many may notice; but it would be good to have this interoperable

Peter: Next steps?

David: I'll look into this this week and revisit next wee

Comment by @slightlyoff Sep 11, 2018 (See Github)

Per today's F2F, now for me to discuss open issues with @szager-chromium

Discussed Sep 25, 2018 (See Github)

Alex: I have not discussed with Zager

Dan: Shall I bump this in that case?

Dan: It is sooo bumped! OK

Comment by @slightlyoff Oct 30, 2018 (See Github)

Pinged @szager-chromium; unclear where things are now. Will circle back.

Discussed Nov 28, 2018 (See Github)

David: some of this was to remind me to do stuff and i haven't done the stuff yet.

Peter: [bumping 2 weeks]

Kenneth: BTW this just landed in safari tech preview https://bugs.webkit.org/show_bug.cgi?id=159475

David: we just got a separate review request for v2

Comment by @szager-chromium Nov 30, 2018 (See Github)

I want to hopefully close the loop on the comment by @dbaron:

So one thing I need to investigate further is that it feels to me that intersection observer running before the animation frame callbacks seems wrong, I think it should run substantially after them, with a bunch of other stuff in between, since rAF is primarily a writing callback (so should be early, before the natural style/layout), whereas IntersectionObserver is primarily a reading callback (so should be late, after the natural style/layout).

You are quite right that IntersectionObserver should run after rAF callbacks; I just created a pull request for that change. The original language there was a mistake.

This sidesteps the issue of when exactly style/layout/paint gets updated, but that issue is better addressed in the separate spec issues you called out.

Comment by @dbaron Dec 18, 2018 (See Github)

Yep, that PR improves things, thanks.

Discussed Dec 19, 2018 (See Github)

David: Two remaining issues - one falls back to the task scheduling issue (72). The other one was Peter's concern about string based APIs.

Peter: i think they fixed the string based APIs issue..

Comment by @dbaron Dec 19, 2018 (See Github)

... but I think, as I mentioned in https://github.com/w3c/IntersectionObserver/issues/263#issuecomment-448418727, that the steps should be still later. I think this requires writing a bunch of tests to check what happens today, though...

Discussed Mar 26, 2019 (See Github)

David: punt 4 weeks

Comment by @LJWatson Nov 5, 2019 (See Github)

@szager @dbaron what is the state of this now?

Discussed Mar 23, 2020 (See Github)

Rossen: This is a shipped feature... what's remaining.

David: Specifying what's actually shipped and if it is interoperable. My concern was that the HTML event loop spec is not specified clearly enough and not very interoperable. So then, how intersection observer fits into all of this. I recall writing one event loop test and that failed everywhere. Don't think keeping the issue open is going to do anything else other than nag me to look at it.

Peter: Specifying the event loop has been a long time coming :) and not there still.

Rossen: So what's really remaining for TAG here?

David: I'm OK closing this one and file a separate issue for tracking the specific dependencies between intersection observer and the event loop

Comment by @dbaron Mar 25, 2020 (See Github)

We separated out the more general bits into #489, but we're perhaps still leaving this open to wait on w3c/IntersectionObserver#263.

Comment by @dbaron Sep 23, 2020 (See Github)

@plinss and I are looking at this in a breakout in our virtual "Cork" face-to-face.

So we were leaving this open for w3c/IntersectionObserver#263, which is in turn waiting on whatwg/html#3246, which is in turn waiting on w3c/csswg-drafts#5115. While it would be nice to fix that sequence of things, we probably don't need to leave this review open for it.

These are also all referenced from #489.

Comment by @dbaron Sep 24, 2020 (See Github)

OK, we discussed in mini-plenary and we're happy closing this issue at this point. Thanks for requesting TAG review... a long time ago. Sorry this took so long.

Comment by @LJWatson Sep 24, 2020 (See Github)

Thank you @dbaron and @plinss.