-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add animation-range
support for ScrollTimeline
#153
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Conflicts: # test/expected.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
This PR adds support for
animation-range
for 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
normalizeAxis
into its own function, as the logic to determine that ended up being present 3 times in the source code.Fixes #151.