[YogaKit] Improved the objective-c and swift api #322

Closed
hartbit wants to merge 2 commits from improve-yogakit-api into master
hartbit commented 2017-01-05 15:23:39 -08:00 (Migrated from github.com)

Compared to what was planned, I added the overflow value which seemed missing. I had to modify the implementation a bit for all values which are backed by a YGValue, but we should probably enable the pixel dimensions in Objective-C and Swift somehow later.

Compared to what was planned, I added the `overflow` value which seemed missing. I had to modify the implementation a bit for all values which are backed by a `YGValue`, but we should probably enable the pixel dimensions in Objective-C and Swift somehow later.
emilsjolander (Migrated from github.com) requested changes 2017-01-06 01:39:58 -08:00
emilsjolander (Migrated from github.com) left a comment

Just a few comments. Mostly this looks very good and I'm pretty confident we can merge this later today. Thanks!

Just a few comments. Mostly this looks very good and I'm pretty confident we can merge this later today. Thanks!
@@ -0,0 +1,114 @@
/**
emilsjolander (Migrated from github.com) commented 2017-01-06 01:38:21 -08:00

This import seems unused, could you remove it?

This import seems unused, could you remove it?
@@ -0,0 +1,380 @@
/**
emilsjolander (Migrated from github.com) commented 2017-01-06 01:27:00 -08:00

UIView *view

UIView *view
emilsjolander (Migrated from github.com) commented 2017-01-06 01:38:07 -08:00

This function seems unused. Could you remove it?

This function seems unused. Could you remove it?
@@ -14,29 +14,29 @@
YG_EXTERN_C_BEGIN
emilsjolander (Migrated from github.com) commented 2017-01-06 01:36:08 -08:00

Could we make this generate something short (less duplicated) ? Maybe by creating our own YG_ENUM macro which expands to one of the two alternatives.

Could we make this generate something short (less duplicated) ? Maybe by creating our own YG_ENUM macro which expands to one of the two alternatives.
emilsjolander (Migrated from github.com) commented 2017-01-06 01:39:07 -08:00

Pulling this out into a separate file seems to not be needed for this PR. Could you revert this change?

Pulling this out into a separate file seems to not be needed for this PR. Could you revert this change?
hartbit commented 2017-01-06 06:08:34 -08:00 (Migrated from github.com)

I implemented all your suggestions 😄 Thanks 👍

I implemented all your suggestions 😄 Thanks 👍
emilsjolander (Migrated from github.com) approved these changes 2017-01-06 06:10:06 -08:00
d16r (Migrated from github.com) reviewed 2017-01-06 06:14:52 -08:00
d16r (Migrated from github.com) commented 2017-01-06 06:14:52 -08:00

We should change this to strong

http://nshipster.com/associated-objects/

We should change this to `strong` http://nshipster.com/associated-objects/
facebook-github-bot commented 2017-01-06 06:15:24 -08:00 (Migrated from github.com)

@emilsjolander has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@emilsjolander has imported this pull request. If you are a Facebook employee, you can view this diff [on Phabricator](https://phabricator.intern.facebook.com/D4386906).
d16r (Migrated from github.com) reviewed 2017-01-06 06:17:47 -08:00
@@ -0,0 +93,4 @@
- (instancetype)initWithView:(UIView*)view
{
if ([super init]) {
d16r (Migrated from github.com) commented 2017-01-06 06:17:47 -08:00

Nit, we should be assigning this to self, i.e.

self = [super init]

I know this isn't technically required, but I think it's good to keep the standard. More about that here: https://www.cocoawithlove.com/2009/04/what-does-it-mean-when-you-assign-super.html

Nit, we should be assigning this to `self`, i.e. `self = [super init]` I know this isn't *technically* required, but I think it's good to keep the standard. More about that here: https://www.cocoawithlove.com/2009/04/what-does-it-mean-when-you-assign-super.html
emilsjolander commented 2017-01-06 06:30:32 -08:00 (Migrated from github.com)

@hartbit Don't worry about it. I'll fix this while mergin

@hartbit Don't worry about it. I'll fix this while mergin
d16r commented 2017-01-06 06:47:36 -08:00 (Migrated from github.com)

Awesome job @hartbit!! I'm so excited to land this!

Awesome job @hartbit!! I'm so excited to land this!
ericvicenti commented 2017-01-09 02:45:20 -08:00 (Migrated from github.com)

It looks like the import of this commit into react-native causes CI tests to fail. Can somebody help fix this ASAP?

https://travis-ci.org/facebook/react-native/builds/190054212

It looks like the import of this commit into react-native causes CI tests to fail. Can somebody help fix this ASAP? https://travis-ci.org/facebook/react-native/builds/190054212
emilsjolander commented 2017-01-09 02:53:07 -08:00 (Migrated from github.com)

@ericvicenti looking now

@ericvicenti looking now
emilsjolander commented 2017-01-09 04:06:40 -08:00 (Migrated from github.com)

@ericvicenti Found issue. Pushing fix within next few hours

@ericvicenti Found issue. Pushing fix within next few hours
hartbit commented 2017-01-09 04:32:18 -08:00 (Migrated from github.com)

@emilsjolander What was the problem?

@emilsjolander What was the problem?
emilsjolander commented 2017-01-09 08:46:01 -08:00 (Migrated from github.com)
https://github.com/facebook/yoga/commit/0acb6201594739d069d8973ee8391dea9bfaf9c7
hartbit commented 2017-01-09 09:06:21 -08:00 (Migrated from github.com)

Ah, of course!

Ah, of course!

Pull request closed

Sign in to join this conversation.
No description provided.