Title: Fix timeline() to account for animation iterations in duration calculations by Copilot · Pull Request #36 · bQuery/bQuery · GitHub
Open Graph Title: Fix timeline() to account for animation iterations in duration calculations by Copilot · Pull Request #36 · bQuery/bQuery
X Title: Fix timeline() to account for animation iterations in duration calculations by Copilot · Pull Request #36 · bQuery/bQuery
Description: timeline() was ignoring KeyframeAnimationOptions.iterations, causing incorrect duration calculations and scheduling when animations repeat. A timeline with a 100ms animation set to iterations: 3 would incorrectly calculate 100ms duration instead of 300ms, breaking relative step positioning and at calculations. Changes Updated normalizeDuration() to compute total duration as (baseDuration × iterations) + endDelay Validates iterations is non-negative per Web Animations spec (treats negative as 0) Handles iterations: Infinity by returning MAX_SAFE_INTEGER to prevent NaN/Infinity in scheduling logic Added test coverage for iterations with relative step scheduling, endDelay, delay, and edge cases (0, negative, Infinity) Example const tl = timeline([ { target: el1, keyframes: [{ opacity: 0 }, { opacity: 1 }], options: { duration: 100, iterations: 3 }, // Now correctly computes 300ms at: 0, }, { target: el2, keyframes: [{ opacity: 0 }, { opacity: 1 }], options: { duration: 100 }, // Now correctly starts at 300ms (after el1's 3 iterations complete) }, ]); tl.duration(); // Returns 400ms (not 200ms) 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Open Graph Description: timeline() was ignoring KeyframeAnimationOptions.iterations, causing incorrect duration calculations and scheduling when animations repeat. A timeline with a 100ms animation set to iterations: 3 wo...
X Description: timeline() was ignoring KeyframeAnimationOptions.iterations, causing incorrect duration calculations and scheduling when animations repeat. A timeline with a 100ms animation set to iterations: 3 wo...
Opengraph URL: https://github.com/bQuery/bQuery/pull/36
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e6db866a-cba4-7d68-f069-d36e7323b1ad |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9920:BAE90:E2104:1240AB:6A4ECE86 |
| html-safe-nonce | 803cf783f63f0233ca1bf999c4643aaf57620e6671448afbe2710e6869eec128 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTIwOkJBRTkwOkUyMTA0OjEyNDBBQjo2QTRFQ0U4NiIsInZpc2l0b3JfaWQiOiI0MDAwMDU1NTI0NDc3MjkyMTY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 10c0d5dc8cd34a41c7589c4981be8af7cfd0c0692d8c634c44d7524eb9e830fc |
| hovercard-subject-tag | pull_request:3228196334 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/bQuery/bQuery/pull/36/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | timeline() was ignoring KeyframeAnimationOptions.iterations, causing incorrect duration calculations and scheduling when animations repeat. A timeline with a 100ms animation set to iterations: 3 wo... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/bQuery/bQuery git https://github.com/bQuery/bQuery.git |
| octolytics-dimension-user_id | 256381806 |
| octolytics-dimension-user_login | bQuery |
| octolytics-dimension-repository_id | 1139284244 |
| octolytics-dimension-repository_nwo | bQuery/bQuery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1139284244 |
| octolytics-dimension-repository_network_root_nwo | bQuery/bQuery |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width