lightning-js / blits

The Lightning 3 App Development Framework
Apache License 2.0
58 stars 9 forks source link

Rename ‘function’ key in transition object to ‘easing’ #76

Closed michielvandergeest closed 4 months ago

michielvandergeest commented 4 months ago

Currently the transition object can have a ‘function’ key to specify a custom timing function. In retrospect this name isn’t as descriptive as I wanted it to be. Also, using the key ‘function’ in the template can throw off the code highlighting in the VS code plugin.

In order to address these 2 issues, we should rename the key ‘function’ to ‘easing’

Before:

<Element :y.transition=“{v: $y, function: ‘ease-in-out’}” />

After:

<Element :y.transition=“{v: $y, easing: ‘ease-in-out’}” />

This will be a breaking change. As we are in beta, I don’t think we need to follow a full deprecation path. But we should log a descriptive error when the old ‘function’ key is used in a transition object, to make it straightforward to make the necessary fixes in the app code.

sandeep-vedam commented 4 months ago

This issue is addressed with #78 . Hence closing this.