Sitelet https://web.archive.org/web/20260624173554/https://github.com/NativeScript/NativeScript/pull/7996
Skip to content

testing improvements on layout#7996

Closed
farfromrefug wants to merge 16 commits into
NativeScript:masterfrom
Akylas:layout_improvements
Closed

testing improvements on layout#7996
farfromrefug wants to merge 16 commits into
NativeScript:masterfrom
Akylas:layout_improvements

Conversation

@farfromrefug

Copy link
Copy Markdown
Collaborator

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!

farfromrefug and others added 7 commits July 25, 2018 10:59
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 vtrifonov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@farfromrefug

Copy link
Copy Markdown
Collaborator Author

@vtrifonov will try and do that as soon as possible

@farfromrefug

Copy link
Copy Markdown
Collaborator Author

@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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same here, maybe the parameter name should be calledFromChild

Suggested change
public requestLayout(calledFromParent?:boolean): void;
public requestLayout(calledFromChild?:boolean): void;

}

public requestLayout(): void {
public requestLayout(calledFromChild): void {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should have a default value here as in the view-base

Suggested change
public requestLayout(calledFromChild): void {
public requestLayout(calledFromChild = false): void {

// (undocumented)
_removeViewFromNativeVisualTree(view: ViewBase): void;
public requestLayout(): void;
public requestLayout(calledFromParent?:boolean): void;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this should be calledFromChild (as it is in the view-base.ts and view-common.ts files) but not calledFromParent

Suggested change
public requestLayout(calledFromParent?:boolean): void;
public requestLayout(calledFromChild?:boolean): void;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vtrifonov actually already changed that here. Need to pus hit!

vtrifonov
vtrifonov previously approved these changes Jan 16, 2020
@vtrifonov vtrifonov dismissed their stale review January 16, 2020 09:14

I've added a new one

@farfromrefug

Copy link
Copy Markdown
Collaborator Author

@vtrifonov as discussed with @vakrilov i will close that PR and open a new one as Draft PR.
This feature is a POC and needs a bit more work. We need to discuss this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants