Add animation-range support for ScrollTimeline#153
Conversation
animation-range support for ScrollTimeline
|
Addressed the remarks (+ merge conflict), but am wondering: maybe I should also move the |
|
+1 for this issue – great to see the PR @bramus My usage includes viewport units which I can see aren't included in the PR, would that be straight-forward to introduce? I'm not asking you to do it, I'm happy to contribute if I can, I'm just unfamiliar with the codebase – I just figure the responsive nature of viewport units could be tricky if the values are evaluated on discovery rather than in 'real time'. |
|
@ryantownsend I once started a PR to add viewport units – #52 – but that one has stalled. Haven’t found time to further look into it, but feel free to pick it up. It’s quite an old PR, so does need a rebase … |
|
Hi Ryan, |
|
Thanks @bramus / @kevers-google – I'll see if I get some time over the next week or so. |
|
Converting to draft as I noticed a bug in the calculations … need to dig into that. |
|
FYI: I’m awaiting some of the refactors from @johannesodland’s PRs before picking this one up again. |
9a728ef to
83ae4c2
Compare
|
I think I re-landed the changes of the original branch on top of The tests, however, don’t seem to have made a huge jump: only 2 extra tests pass. Also seeing timeouts for the tests with the timeline-range … that needs to be looked into. |
Changes have been included while re-landing this commit.
be4645b to
bdc43e4
Compare
e83cca4 to
f011e3b
Compare
There’s a flaky test that fails when ran through test:simple but (sometimes) passes when ran through test:wpt
… non-standards methods
f011e3b to
a596e06
Compare
|
Addressed all remarks. Requesting a new review, @flackr @johannesodland |
# Conflicts: # test/expected.txt
This PR adds support for
animation-rangefor ScrollTimeline based SDAs. It is done by parsing the animation range (with a fallback to the defaults of 0% and 100%) and then calculating the relative ScrollTimeline position. This flow has been copied over from how ViewTimelines are being handled.It also includes a little refactoring that splits off
normalizeAxisinto its own function, as the logic to determine that ended up being present 3 times in the source code.Fixes #151.