Skip to content
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

feat(web): 🎸 add autoResize to render config #341

Merged
merged 11 commits into from
Sep 2, 2024
Merged

Conversation

theashraf
Copy link
Member

@theashraf theashraf commented Aug 28, 2024

Changes:

  • changes include porting the auto-resize canvas behavior from the wrappers to the core, with the feature disabled by default as it’s not yet stable, but can be enabled by the user if needed
  • debouncing resize calls to avoid unnecessary operations when triggered multiple times
  • and adding a single resize observer for all canvases on the page to improve memory usage

Copy link

changeset-bot bot commented Aug 28, 2024

🦋 Changeset detected

Latest commit: 0a06ab3

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

This PR includes changesets to release 6 packages
Name Type
@lottiefiles/dotlottie-web Minor
@lottiefiles/dotlottie-react Patch
@lottiefiles/dotlottie-solid Patch
@lottiefiles/dotlottie-svelte Patch
@lottiefiles/dotlottie-vue Patch
@lottiefiles/dotlottie-wc 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

@theashraf theashraf self-assigned this Aug 28, 2024
@theashraf theashraf marked this pull request as ready for review August 30, 2024 03:28
Copy link
Contributor

github-actions bot commented Aug 30, 2024

Coverage Report for @lottiefiles/dotlottie-web (packages/web)

Status Category Percentage Covered / Total
🟢 Lines 56.47% / 30% 580 / 1027
🟢 Statements 55.05% / 30% 604 / 1097
🟢 Functions 56.81% / 30% 150 / 264
🟢 Branches 59.1% / 30% 383 / 648
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/web/src/dotlottie.ts 73.01% 65.29% 69.76% 75.66% 136, 140-143, 168, 209-211, 213, 248, 262, 307, 330, 334, 415, 431, 435, 464, 479-480, 495, 517-520, 553, 558, 568, 596, 596, 598-601, 605, 610-613, 620, 620, 622-625, 629, 629, 631-634, 704, 704, 706-709, 713, 734, 769, 796, 800, 810, 820, 820, 822-828, 832, 842, 846, 848-850, 849, 852, 856, 858-860, 859, 862, 866-868, 870-872, 874-877, 881, 883, 887, 889, 893, 895, 899, 901, 905, 907, 911, 920, 922-928, 923-928, 925-928, 927, 930, 934, 934, 936, 938, 940-942, 940-941, 944, 948-974, 949, 951-953, 952, 955-957, 956, 959-961, 960, 963-965, 964, 967-969, 968, 971-973, 972, 989, 993-994, 996-999, 1003, 1007, 1011
packages/web/src/resize-observer.ts 88.46% 50% 100% 100% 13, 19, 39
packages/web/src/worker/dotlottie.ts 65.29% 63.04% 71.62% 70.61% 15, 245, 263, 324, 384, 389, 396, 403, 403, 405-406, 410, 424, 424, 426-427, 431, 450, 469, 469, 471-472, 476, 486, 493, 493, 495-496, 527, 534, 541, 541, 543-544, 548, 555, 555, 557-558, 574, 581, 591, 618, 642, 642, 644, 646, 648, 652, 652, 654, 656, 658, 662, 662, 664, 666, 668, 670, 674, 674, 676, 678, 682, 682, 684, 688, 688, 690, 694-696, 698-700, 702-705, 709, 711, 715, 717, 721, 723, 727, 729, 733, 735, 739, 743-769, 744, 746-748, 747, 750-752, 751, 754-756, 755, 758-760, 759, 762-764, 763, 766-768, 767
Generated in workflow #1306

Copy link
Contributor

github-actions bot commented Aug 30, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
@lottiefiles/dotlottie-web 38.78 KB (+0.86% 🔺) 776 ms (+0.86% 🔺) 552 ms (+59.58% 🔺) 1.4 s
@lottiefiles/dotlottie-web WASM 386.62 KB (0%) 7.8 s (0%) 0 ms (+100% 🔺) 7.8 s
@lottiefiles/dotlottie-react 41.88 KB (-0.58% 🔽) 838 ms (-0.58% 🔽) 483 ms (+11.78% 🔺) 1.4 s
@lottiefiles/dotlottie-vue 45.75 KB (+0.69% 🔺) 915 ms (+0.69% 🔺) 373 ms (+25.11% 🔺) 1.3 s
@lottiefiles/dotlottie-wc 46.18 KB (+0.76% 🔺) 924 ms (+0.76% 🔺) 353 ms (-63.31% 🔽) 1.3 s
@lottiefiles/dotlottie-svelte 46.28 KB (-0.07% 🔽) 926 ms (-0.07% 🔽) 655 ms (+96.48% 🔺) 1.6 s
@lottiefiles/dotlottie-solid 45.17 KB (-0.08% 🔽) 904 ms (-0.08% 🔽) 400 ms (+42.44% 🔺) 1.4 s

@theashraf theashraf merged commit 1900885 into main Sep 2, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants