Skip to content

chore: first stage of rewriting animations #9892

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

Open
wants to merge 431 commits into
base: main
Choose a base branch
from

Conversation

farfromrefug
Copy link
Collaborator

This is a draft of rewriting the Animation system in N:

  • make Animation unaware of which properties can be animated
  • handle specific cases (rotate, translate, scale)
  • make virtually any property animatable on Android. This is done the same way as it is done for backgroundColor(which means going back to JS in every single animation step!)
  • make width/height properties correctly animate in layout and allowing handling of auto size
  • iOS: work in progress. Trying to stop handling animations differently if spring or not. Maybe move to UIViewPropertyAnimator. My issue right now is how to animate custom properties like text color.

TODO:

  • allow View subclass to define custom property animation handling
  • allow property to define animation handling?
  • merge CSSProperty and CSSAnimationProperty ? have to figure out the real difference between the 2 as there is no inheritance :s Merging would allow any prop to be animated through css

# Conflicts:
#	packages/core/color/color-common.ts
#	packages/core/color/index.d.ts
# Conflicts:
#	.eslintrc.json
#	packages/core/bundle-entry-points.ts
#	packages/core/ui/core/bindable/index.ts
#	packages/core/ui/styling/style-scope.ts
#	packages/core/xml/index.ts
#	packages/webpack5/src/configuration/base.ts
#	packages/webpack5/src/helpers/index.ts
allow Color constructor to take hsl/hsv
# Conflicts:
#	apps/automated/package.json
#	apps/toolbox/package.json
#	apps/ui/package.json
#	package.json
#	packages/core/application/index.android.ts
#	packages/core/application/index.ios.ts
#	packages/core/package.json
#	packages/core/platforms/android/native-api-usage.json
#	packages/core/platforms/ios/TNSWidgets.xcframework/Info.plist
#	packages/core/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets
#	packages/core/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets
#	packages/core/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist
#	packages/core/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets
#	packages/core/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets
#	packages/core/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets
#	packages/core/ui/text-base/text-base-common.ts
#	packages/webpack/package.json
#	packages/webpack/project.json
…an N parent

We can do this on both platforms. I could prevent memory leaks
# Conflicts:
#	packages/core/package.json
@NathanWalker NathanWalker added this to the 9.0 milestone Aug 16, 2022
farfromrefug and others added 12 commits August 25, 2022 10:26
It could prevent errors when the client would be called while the runtime is dead NativeScript/android#1667
…change/augment

delegates.
also unset delegates in disposeNativeView to prevent memory leak
# Conflicts:
#	packages/core/ui/animation/animation-common.ts
#	packages/core/ui/animation/index.ios.ts
#	packages/core/ui/core/view/index.ios.ts
#	packages/core/ui/gestures/index.ios.ts
#	packages/core/ui/page/index.ios.ts
#	packages/core/ui/styling/style-scope.ts
#	packages/core/ui/text-base/index.ios.ts
…_rebuilt

# Conflicts:
#	packages/core/ui/animation/index.android.ts
@vallemar
Copy link
Contributor

Hi team @NathanWalker @farfromrefug @rigor789 @triniwiz ! I comment here because one of the reasons why I use the fork is this. Animations work better in the fork than in nativescript core. I think this PR is important, since animations are important today. This PR seems to have been shelved and doesn't seem to be merging anywhere near. Could this be re-evaluated to be able to merge for a version that is not too late?

@farfromrefug
Copy link
Collaborator Author

@vallemar thanks for bumping. I honestly had forgotten about since it was there for so long
Though this PR is important (and some plugins now depend on it) i need to create a new PR because the core has changed too much since then.
Also looking at it s state right now there might even been an issue maybe when i updated it. It has commits not related to it. Might have pulled from my master.
Need to find the time to create a new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.