Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

[android] Upgrade css-layout to yoga library#476

Closed
sospartan wants to merge 4 commits into
apache:0.15-devfrom
sospartan:android-feature-yoga
Closed

[android] Upgrade css-layout to yoga library#476
sospartan wants to merge 4 commits into
apache:0.15-devfrom
sospartan:android-feature-yoga

Conversation

@sospartan
Copy link
Copy Markdown
Contributor

@sospartan sospartan commented Jun 27, 2017

Related issue : https://issues.apache.org/jira/browse/WEEX-34
Upgrade css-layout to yoga.

This is a huge PR, better reviewing by commits.

Notable changes:

WXDomObject now inherit YogaNode, which is wrapper for object in jni.
minSDKVersion change to 15, the yoga library required. I’ve make a PR to yoga, and it accepted by yoga. So yoga will change minSDKVersion to 14. After that, we can change it back to 14 too.
Spacing from old css-layout library will stay, because the ImmutableDomObject use it.
Clean css-layout code will in another seperate commit.
Some new rule:

  • 'Only leaf nodes with custom measure functionsshould manually mark themselves as dirty
  • 'Cannot add child: Nodes with measure functions cannot have children'
    Measure Function in Weex are modified according these rules.
    The ‘clone’ method from WXDomObject is deprecated. Use a ‘asResult’ to return the data object need by components.

@sospartan sospartan changed the title Android feature yoga [android] Upgrade css-layout to yoga library Jun 28, 2017
WXDomObject now inherit YogaNode, which is wrapper for object in jni.
minSDKVersion change to 15, the yoga library required. I’ve make a PR to yoga, and it accepted by yoga. So yoga will change minSDKVersion to 14. After that, we can change it back to 14 too.
Spacing from old css-layout library will stay, because the ImmutableDomObject use it.
Clean css-layout code will in another seperate commit.
Some new rule:
- 'Only leaf nodes with custom measure functionsshould manually mark themselves as dirty
- 'Cannot add child: Nodes with measure functions cannot have children'
Measure Function in Weex are modified according these rules.
The ‘clone’ method from WXDomObject is deprecated. Use a ‘asResult’ to return the data object need by components.
New YogaNode use jni, in junit it's hard to mock with tiny modification. Disable temporarily, fix junit by another PR.
@sospartan sospartan force-pushed the android-feature-yoga branch from 9e38821 to 92f2cb5 Compare June 28, 2017 03:17
@netputer
Copy link
Copy Markdown

Any progress?

@sospartan sospartan closed this Sep 22, 2017
@gurisxie
Copy link
Copy Markdown
Contributor

weex will not use yoga,so close this pr .thanks @sospartan

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants