-
Notifications
You must be signed in to change notification settings - Fork 7
adds ScrollerLottie #359
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
adds ScrollerLottie #359
Conversation
|
|
@pkd2512 @MinamiFunakoshiTR While I fix TS issues, what do you guys think of naming this one? Although it's not a scroller per se and we mostly use it as a Scroller, keeping it simpler can help us avoid complexity for using it as a standalone Lottie. If we go for making it a scroller-default, it'll add another prop - scrollerHeight and wrap it inside another sticky container. |
|
I'm reviewing this PR. I'll let you know once I've gone through it. |
|
Hey @SudevKiyadaTR, I'm still reviewing this PR -- I'll make a PR for you to review that will merge into this branch -- but have a few questions.
|
@MinamiFunakoshiTR, do you think we should have a height prop and wrap the existing component inside a div or scrollerBase? Though this might take away the possibility of having a static Lottie animation that doesn't act 'sticky'. If not, am leaning towards ScrollerLottie to follow the other components' convention (ScrollerXYZ) and also a bit easier to make sense on what goes inside ScrollerBase? On the other questions,
|
On second thought -- now that I've played around with all the demos more, I think we should just name this
That makes sense, have a go and see if it fixes it. The native Svelte |
|
Will do that. Should I wait for a PR from your side before I tackle these or safe to make the changes? |
|
Go ahead and make those changes and commit them to this PR. I'll deal with any merge conflicts that might pop up in my upcoming PR. |
|
Actually, I ended up renaming ScrollerLottie to Lottie while working on my PR so don't worry about making that change. Go ahead with the other changes, though. |
|
@MinamiFunakoshiTR much thanks for reviewing the code. Those changes look good! I made the changes you requested. I don't think there's a workaround to the canvas getting stretched on resize. I have added pause-resume logic but the canvas would anyway get stretched. Another option is to hide-show on resize but not sure if we want that. Also, looping @hobbes7878, there's a WASM inclusion in the code for perf gains. But I think |
Thanks. What if we set the lottie container width instead of height, and make height auto? |
Would be fine for standalone animation but may cause issues when used with ScrollerBase and the animation doesn't match the window aspect ratio. Maybe we keep the prop but init it with Having a prop would allow users a bit of flexibility in terms of what size they want to render. I mean would give that flexibility more priority over window resize. |
Got it. can you play around with the |
|
Hi! Just wanted to check in on where we're at with this. Do you need anything from me? |
Nope, we good. I just made some changes and removed wasm support. Users can still opt-in for wasm support by using |
MinamiFunakoshiTR
left a comment
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.
if everything looks good after a final check, go ahead and merge this with a changeset. thank you for all your hard work!
What's in this pull request
adds ScrollerLottie component. Closes #280.
Before submitting, please check that you've ...