Skip to content

fix: @granite-js/lottie LottieView props - #239

Merged
heecheolman merged 6 commits into
mainfrom
fix-lottie-duration
Mar 26, 2026
Merged

fix: @granite-js/lottie LottieView props#239
heecheolman merged 6 commits into
mainfrom
fix-lottie-duration

Conversation

@jingjing2222

Copy link
Copy Markdown
Collaborator

Summary

This fixes duration in @granite-js/lottie so it affects playback as intended.

Previously, duration was exposed in the public API but was not actually used when building native props. As a result, setting duration did not change the animation playback length and only speed was applied.

Changes

  • read duration in LottieView
  • compute an effective playback speed from duration when the source is a JS animation object
  • pass the computed speed down to the native view

Result

  • duration now behaves consistently with the documented API
  • existing speed behavior is preserved when duration is not provided
  • no behavior change for call sites that do not use duration

Verification

  • yarn workspace @granite-js/lottie typecheck
  • yarn workspace @granite-js/lottie lint

@changeset-bot

changeset-bot Bot commented Mar 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2644139

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 26 packages
Name Type
create-granite-app Patch
babel-preset-granite Patch
@granite-js/blur-view Patch
@granite-js/cli Patch
@granite-js/cookies Patch
@granite-js/screen Patch
@granite-js/image Patch
@granite-js/jest Patch
@granite-js/lottie Patch
@granite-js/mpack Patch
@granite-js/native Patch
@granite-js/naver-map Patch
@granite-js/plugin-core Patch
@granite-js/plugin-env Patch
@granite-js/plugin-hermes Patch
@granite-js/plugin-micro-frontend Patch
@granite-js/plugin-router Patch
@granite-js/plugin-rozenite Patch
@granite-js/plugin-sentry Patch
@granite-js/react-native Patch
@granite-js/style-utils Patch
@granite-js/utils Patch
@granite-js/video Patch
@granite-js/deployment-manager Patch
@granite-js/forge-cli Patch
@granite-js/pulumi-aws Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Mar 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
granite-docs Ready Ready Preview, Comment Mar 26, 2026 3:07am

Request Review

@jingjing2222 jingjing2222 changed the title fix: @granite-js/lottie LottieView duration doesn't work fix: @granite-js/lottie LottieView props Mar 24, 2026
@jingjing2222
jingjing2222 marked this pull request as draft March 24, 2026 06:25
@jingjing2222
jingjing2222 marked this pull request as ready for review March 25, 2026 15:21
@heecheolman
heecheolman merged commit c5f1a07 into main Mar 26, 2026
7 checks passed
@heecheolman
heecheolman deleted the fix-lottie-duration branch March 26, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants