Skip to content

[Feature] Make the lifecycle methods async ⚠️ #502

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

Merged
merged 4 commits into from
Aug 2, 2024

Conversation

titouanmathis
Copy link
Contributor

@titouanmathis titouanmathis commented Aug 2, 2024

🔗 Linked issue

No issue.

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This PR makes the $mount, $update, $destroy and $terminate method async. With the introduction of the non-blocking queue in #427, making these methods async will help us wait or not for the end of the different lifecycle action.

📝 Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.
  • I have updated the changelog.

Copy link

github-actions bot commented Aug 2, 2024

Export Size

@studiometa/js-toolkit

Name Size Diff
withBreakpointManager 1.15 kB +31 B (+2.76%) 🔺
createApp 419 B +6 B (+1.45%) 🔺
BASE 7.4 kB +59 B (+0.80%) 🔺
Base 7.32 kB +55 B (+0.76%) 🔺
FRAMEWORK 11.74 kB +68 B (+0.58%) 🔺
withMountWhenPrefersMotion 372 B +2 B (+0.54%) 🔺
ALL 16.62 kB +73 B (+0.44%) 🔺
DECORATORS 6.38 kB +28 B (+0.44%) 🔺
withScrolledInView 1.88 kB +3 B (+0.16%) 🔺
withBreakpointObserver 1.32 kB +2 B (+0.15%) 🔺
HELPERS 1.33 kB -4 B (-0.30%) 🔽
withMountOnMediaQuery 336 B -2 B (-0.59%) 🔽
withMountWhenInView 311 B -20 B (-6.04%) 🔽
Unchanged

@studiometa/js-toolkit

Name Size Diff
addClass 226 B -
addStyle 238 B -
animate 2.71 kB -
boundingRectToCircle 154 B -
clamp 67 B -
clamp01 87 B -
collideCircleCircle 99 B -
collideCircleRect 159 B -
collidePointCircle 112 B -
collidePointRect 103 B -
collideRectRect 99 B -
createEaseInOut 116 B -
createEaseOut 71 B -
createRange 90 B -
damp 78 B -
debounce 92 B -
domScheduler 296 B -
ease 435 B -
easeInCirc 68 B -
easeInCubic 59 B -
easeInExpo 80 B -
easeInOutCirc 141 B -
easeInOutCubic 130 B -
easeInOutExpo 134 B -
easeInOutQuad 128 B -
easeInOutQuart 133 B -
easeInOutQuint 152 B -
easeInOutSine 151 B -
easeInQuad 63 B -
easeInQuart 61 B -
easeInQuint 62 B -
easeInSine 77 B -
easeLinear 49 B -
easeOutCirc 115 B -
easeOutCubic 103 B -
easeOutExpo 112 B -
easeOutQuad 103 B -
easeOutQuart 100 B -
easeOutQuint 103 B -
easeOutSine 121 B -
endsWith 88 B -
getAncestorWhere 91 B -
getAncestorWhereUntil 119 B -
getClosestParent 178 B -
getComponentResolver 138 B -
getDirectChildren 183 B -
getInstanceFromElement 90 B -
getInstances 146 B -
getOffsetSizes 159 B -
hasWindow 62 B -
historyPush 499 B -
historyReplace 503 B -
importOnInteraction 573 B -
importOnMediaQuery 236 B -
importWhenIdle 223 B -
importWhenPrefersMotion 275 B -
importWhenVisible 589 B -
inertiaFinalValue 142 B -
isArray 70 B -
isBoolean 78 B -
isDefined 86 B -
isDev 72 B -
isDirectChild 212 B -
isEmpty 207 B -
isEmptyString 93 B -
isFunction 72 B -
isNull 72 B -
isNumber 84 B -
isObject 105 B -
isString 86 B -
keyCodes 100 B -
lerp 57 B -
map 71 B -
matrix 106 B -
mean 91 B -
memoize 189 B -
nextFrame 162 B -
nextMicrotask 111 B -
nextTick 134 B -
noop 39 B -
noopValue 49 B -
objectToURLSearchParams 302 B -
Queue 226 B -
randomInt 80 B -
randomItem 232 B -
removeClass 222 B -
removeStyle 238 B -
round 56 B -
saveActiveElement 56 B -
scrollTo 1.91 kB -
SERVICES 3.24 kB -
SmartQueue 411 B -
startsWith 87 B -
throttle 101 B -
toggleClass 225 B -
transform 321 B -
transition 916 B -
trapFocus 366 B -
tween 1.34 kB -
untrapFocus 45 B -
useDrag 1.61 kB -
useKey 630 B -
useLoad 373 B -
usePointer 841 B -
useRaf 682 B -
useResize 722 B -
useScheduler 290 B -
useScroll 800 B -
useService 254 B -
UTILS 6.67 kB -
wait 79 B -
withDrag 1.76 kB -
withExtraConfig 135 B -
withFreezedOptions 140 B -
withIntersectionObserver 285 B -
withLeadingCharacters 88 B -
withLeadingSlash 107 B -
withName 81 B -
withoutLeadingCharacters 86 B -
withoutLeadingCharactersRecursive 124 B -
withoutLeadingSlash 93 B -
withoutTrailingCharacters 98 B -
withoutTrailingCharactersRecursive 129 B -
withoutTrailingSlash 103 B -
withRelativePointer 997 B -
withResponsiveOptions 1.98 kB -
withTrailingCharacters 96 B -
withTrailingSlash 120 B -

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.06%. Comparing base (7126859) to head (73d8446).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #502      +/-   ##
===========================================
- Coverage    97.09%   97.06%   -0.04%     
===========================================
  Files          114      114              
  Lines         4137     4155      +18     
  Branches      1079     1082       +3     
===========================================
+ Hits          4017     4033      +16     
- Misses         120      122       +2     
Flag Coverage Δ
unittests 97.06% <100.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@titouanmathis titouanmathis force-pushed the feature/async-lifecycle branch from 55e644a to 73d8446 Compare August 2, 2024 13:33
@titouanmathis titouanmathis changed the title [Feature] Make the lifecycle methods async [Feature] Make the lifecycle methods async ⚠️ Aug 2, 2024
@titouanmathis titouanmathis force-pushed the feature/async-lifecycle branch from 73d8446 to 1e5100c Compare August 2, 2024 13:40
@titouanmathis titouanmathis marked this pull request as ready for review August 2, 2024 13:41
@titouanmathis titouanmathis merged commit e282668 into develop Aug 2, 2024
12 checks passed
@titouanmathis titouanmathis deleted the feature/async-lifecycle branch August 2, 2024 13:44
@titouanmathis titouanmathis mentioned this pull request Jan 16, 2025
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.

1 participant