testing improvements on layout#7996
Conversation
For now this PR only checks for auto in width or height. This is clearly not enough.
But the idea is to check if it is necessary to requestLayout on the parent. Most of the times it is not necessary.
In the case of a complex app the improvements is huge!. It makes apps using animations (not using {N} animation system which is too limited) far more snappier.
This is only a POC!
vtrifonov
left a comment
There was a problem hiding this comment.
Can you run npm run api-extractor in the root folder which to regenerate the NaitiveScript.api.md file as there is a change in the public API
|
@vtrifonov will try and do that as soon as possible |
|
@vtrifonov just pushed the update |
…mprovements # Conflicts: # tns-core-modules/ui/core/view/view.android.ts # tns-core-modules/ui/gestures/gestures.ios.ts
| * Invalidates the layout of the view and triggers a new layout pass. | ||
| */ | ||
| public requestLayout(): void; | ||
| public requestLayout(calledFromParent?:boolean): void; |
There was a problem hiding this comment.
The same here, maybe the parameter name should be calledFromChild
| public requestLayout(calledFromParent?:boolean): void; | |
| public requestLayout(calledFromChild?:boolean): void; |
| } | ||
|
|
||
| public requestLayout(): void { | ||
| public requestLayout(calledFromChild): void { |
There was a problem hiding this comment.
it should have a default value here as in the view-base
| public requestLayout(calledFromChild): void { | |
| public requestLayout(calledFromChild = false): void { |
| // (undocumented) | ||
| _removeViewFromNativeVisualTree(view: ViewBase): void; | ||
| public requestLayout(): void; | ||
| public requestLayout(calledFromParent?:boolean): void; |
There was a problem hiding this comment.
I guess this should be calledFromChild (as it is in the view-base.ts and view-common.ts files) but not calledFromParent
| public requestLayout(calledFromParent?:boolean): void; | |
| public requestLayout(calledFromChild?:boolean): void; |
There was a problem hiding this comment.
@vtrifonov actually already changed that here. Need to pus hit!
|
@vtrifonov as discussed with @vakrilov i will close that PR and open a new one as Draft PR. |
Related to this issue #7988
For now this PR only checks for auto in width or height. This is clearly not enough.
But the idea is to check if it is necessary to requestLayout on the parent. Most of the times it is not necessary.
In the case of a complex app the improvements is huge!. It makes apps using animations (not using {N} animation system which is too limited) far more snappier.
This is only a POC!