Skip to content

Conversation

ptmt
Copy link
Owner

@ptmt ptmt commented Jan 28, 2018

Work in progress.

  • Migrate from UIExplorer to RNTester
  • Move to Circle CI
  • Check current projects

rafeca and others added 30 commits November 27, 2017 11:22
Reviewed By: mjesun

Differential Revision: D6415105

fbshipit-source-id: 51687fd20fc5958a3b18d704ffa100400d208057
…packing

Reviewed By: dcaspi

Differential Revision: D6413546

fbshipit-source-id: 9ae167ea2f816b070da29cf81f653af568aed01a
Reviewed By: tmikov

Differential Revision: D6365162

fbshipit-source-id: d1e13b0012528305506c368d5e60f3754a576df3
Summary:
fix bugs

please look at the code,u will know me.

fix tvOS file 'React/Base/RCTTVRemoteHandler*' included in subspec 'React/Core' iOS

[CATEGORY] [TYPE] [LOCATION] - MESSAGE
 [IOS] [BUGFIX] [React.podspec] - fix tvOS file 'React/Base/RCTTVRemoteHandler*' included in subspec 'React/Core' iOS
Closes facebook/react-native#16571

Differential Revision: D6418919

Pulled By: shergin

fbshipit-source-id: d05a1182314c9718447351c8d1a180ff61f21192
Reviewed By: emilsjolander

Differential Revision: D6267245

fbshipit-source-id: 823adcde0a53918116dbe497843913d7875164c4
Summary:
This feature was disabled for multiline textinputs in D3528202 ... seems without a good reason.
The broken autoscroll-to-cursor feature is terribly harmful and counter-intuitive in ALL cases.
I also add a contentSize tracking in the example app to make sure that it is unaffected by this change.

https://pxl.cl/9RHP

facebook/react-native#12799
facebook/react-native#15778

Special thanks to konradkierus!

Reviewed By: sahrens

Differential Revision: D6405985

fbshipit-source-id: 337a390a9db7b3528200ef66c4a079b87608294e
Reviewed By: achen1

Differential Revision: D6418192

fbshipit-source-id: 2186a6103d6542f5ced332d5cb083b1f58bfd43d
Reviewed By: rafeca

Differential Revision: D6405599

fbshipit-source-id: 2f3da971d55fae28fbd94ed9f60d3bc2be176d6a
Summary:
Suppresses the unused warnings on ```YGDefaultLog```. It uses a more generic macro which simply casts the variable to ```(void)```. This is the simples approach to make mutiple different compilers happy. Fixes #650
Closes facebook/yoga#651

Differential Revision: D6407999

Pulled By: emilsjolander

fbshipit-source-id: 19fd78dd8b84eafdbb48875dd003d506a98c4807
Summary:
Solves facebook/react-native#13034

Now the `ScrollView` mock has all the methods available.

React Native tests pass.

To test this specific part of the code,

```sh
$ react-native init Test
$ cd Test/
$ yarn add react-navigation
```

Then, add a simple project that uses `react-navigation`:

```js
import React from 'react';
import { Text } from 'react-native';
import { StackNavigator } from 'react-navigation';

class HomeScreen extends React.Component {
  static navigationOptions = {
    title: 'Welcome',
  };
  render() {
    return <Text>Hello, Navigation!</Text>;
  }
}

const SimpleApp = StackNavigator({
  Home: { screen: HomeScreen },
});

export default SimpleApp
```

Run the default render tests:

```js
$ npm run test
```
Closes facebook/react-native#13048

Differential Revision: D4746028

Pulled By: shergin

fbshipit-source-id: cb1791978d15be7f5d14b7b22979388066ad6caa
Reviewed By: zahanm

Differential Revision: D6432397

fbshipit-source-id: 163319c3c02976bcb49be3f0a54ce2928d0395f3
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Removing the `react-addons-perf` reference since now RN relies on React 16, and it's not [supported anymore](https://reactjs.org/docs/perf.html).

Nothing to test.

[DOCS] [BUGFIX] [Performance.md] removing old reference in the doc.
<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes facebook/react-native#17004

Differential Revision: D6434107

Pulled By: hramos

fbshipit-source-id: 7080c8054072ffb3e2ea58dcb89997585a5d5833
Reviewed By: davidaurelio

Differential Revision: D6413420

fbshipit-source-id: f13184b8157de2c3aeaa7f2647becc175f62cdbb
Reviewed By: arcanis

Differential Revision: D6435529

fbshipit-source-id: a9549dc5900025fcc798ccb92b49e96c982c2e1e
Reviewed By: cpojer

Differential Revision: D6435801

fbshipit-source-id: b8fae475040a64b62a73fbf337cafdaa637cbdef
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Viewing RNTester on my iPhone X hurts my eyes

Opened RNTester on iPhone 7/X simulators as well as my physical X and visually confirmed the header was correctly rendered:

<img width="914" alt="simulator-screenshot" src="https://user-images.githubusercontent.com/1398555/33237093-4bc932ac-d237-11e7-9238-aed8c059fd5f.png">

[IOS] [ENHANCEMENT] [RNTester] - Update iOS RNTester header to utilize SafeAreaView

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes facebook/react-native#16981

Differential Revision: D6436215

Pulled By: hramos

fbshipit-source-id: 14f5361a365429e61c37b0b5e52b4adfb026bd60
Summary:
$FlowFixMe suppressed type validation on _listRef. Add appropriate typing to let Flow succeed when $FlowFixMe is removed.

Not sure what this project's philosophy around ref types is. In some places I've seen them annotated as any rather than trying to get a more granular type to match. I'm open to suggestions.

`yarn flow`

[INTERNAL] [ENHANCEMENT] [FlatList.js] - Remove $FlowFixMe from FlatList
Closes facebook/react-native#16882

Differential Revision: D6386479

Pulled By: hramos

fbshipit-source-id: bed14f2c7071525cb46425ab14214771de0277f3
Reviewed By: flarnie

Differential Revision: D6436328

fbshipit-source-id: 370b862c23c9804bd6df72812d08baceaebfca78
Reviewed By: javache

Differential Revision: D6432476

fbshipit-source-id: fd02b686cf8bc70a4dfcc02d3bbfdf01c611f351
Differential Revision: D6354300

fbshipit-source-id: 3fd4c86ef1d190fb544f2c6fccb638ffe3ced378
Summary:
Not ready but want to start conversation.  (i.e. not sure if to change key name to `urls` from `url`)

I want to be able to share more than 1 image at a time, the current code only lets one use one url, but the API allows for much more.

Some places already make this an issue:

react-native-share/react-native-share#85

And I also need to be able to email/send on iMessage, etc with multiple URL resources.
Closes facebook/react-native#15475

Differential Revision: D6437807

Pulled By: hramos

fbshipit-source-id: 336c696c5633c0080904ca9306a38120e27f9173
Summary:
WIP: Starting point insofar as I'm not sure if there should be an Android equivalent.

My application needs me to delete photos from the photos in iOS.

I have tested this in my application and it works, have a screenshot from iOS asking as well and it does successfully delete the photos from the global Photos app.

Related to facebook/react-native#15253, it kind of continues using the deprecated assets-library framework, but that does need (and will be an bigger and bigger issue coming up) of assets-library URLs being used.

I also assume RN prefers error handling at the JS level? Are the URLs starting with `asset-library`, etc.
Closes facebook/react-native#15481

Differential Revision: D6438016

Pulled By: hramos

fbshipit-source-id: 47512140f62f458c14ad2ade2b358846e168c964
Reviewed By: sahrens, kassens

Differential Revision: D6426829

fbshipit-source-id: b10e33117cf4adf6bb39fc95a9ffa1e268e7c835
Reviewed By: mzlee, dinhviethoa

Differential Revision: D6439498

fbshipit-source-id: ec847595afdd79434e48652d237d2533bbd2cad2
Summary:
`metro-bundler` looks for `.native.js` files ([see here](https://github.com/facebook/metro-bundler/blob/master/packages/metro-bundler/src/node-haste/DependencyGraph/ModuleResolution.js#L458)). Packages such as `react-navigation` rely on this functionality ([see here](https://github.com/react-community/react-navigation/blob/master/src/PlatformHelpers.native.js)). This PR makes it so you can `react-native init`, `yarn add react-navigation`, and `flow` successfully!

1. `react-native init`
2. `yarn add react-navigation`
3. `flow`

[CLI] [MINOR] [Flow] - Tell template app .flowconfig to look for .native.js files
Closes facebook/react-native#16816

Differential Revision: D6445363

Pulled By: shergin

fbshipit-source-id: c0ce7ed27a8a3291deaa09d98e822362f93929c8
Summary:
New super simple abstraction in RCTUIManager.
Nothing really changed and RCTUIManager became shorter.

Reviewed By: rsnara

Differential Revision: D5990342

fbshipit-source-id: b38397b789a999168ac14625585065eda73d328f
Summary:
Fix min/max percentage constraints on measured nodes. Currently we passed in the available size instead of the parent size.
Fixes #611
Closes facebook/yoga#649

Reviewed By: priteshrnandgaonkar

Differential Revision: D6408019

Pulled By: emilsjolander

fbshipit-source-id: 18be5056dbc0dc179970ec231ab8b4e2cdba65c5
Reviewed By: gaearon

Differential Revision: D6448731

fbshipit-source-id: 8c8c6ff393e452c863f54c83c2e4394fd535dfc5
Summary:
Integration testing with Appium on iOS is slow. Profiling with Instruments.app points to `RCTView`'s `accessibilityLabel` method being a hot point in React Native, due to the `RCTRecursiveAccessibilityLabel` function.

I did a baseline benchmark by using Appium's `find_element(accessibility_id: <label>)` call on our application 10 times and got a baseline result of 0.6s for one of our primary screens.

After implementing the change and performing the same call 10 times, I got 0.48s for the same call, for a 20% performance increase in `find_element`.

[iOS] [View] - Improve performance of `RCTView` `accessibilityLabel`

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes facebook/react-native#17022

Differential Revision: D6459462

Pulled By: shergin

fbshipit-source-id: 3de7e5dc075281e35e62b4d4234d3f7fac5aae23
Summary:
`import com.facebook.react.bridge.Callback;` is needed to be able to use `Callback` as a parameter.

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Thought it needed to be clearer that you need to import `Callback` as it's not a native Java type.

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes facebook/react-native#17015

Differential Revision: D6464454

Pulled By: hramos

fbshipit-source-id: dfb57f4176483c4e95539c5db03a86f01892e587
@ptmt
Copy link
Owner Author

ptmt commented Mar 1, 2018

If someone is willing to help with this PR, it will be highly appreciated. I know that it's probably not the most exciting project and this approach is going to change, but highly unlikely before WWDC. So would be nice to release this version (with the later lightweight separate update for React 16.3).

  1. TextInput controls always have been long behind RN, but now they practically unusable. I left the legacy implementation instead of the new one from RN, with an abstracted component for both SingleLine and MultiLine controls. As a result, it doesn't work well. This needs refactoring, and if someone willing to try this, and rewrite UIKit implementation with AppKit one - welcome.

  2. Travis setup and fix a bunch of tests that are failing. I did this numerous times, just can't focus enough on this routine. Also, turns out that Circle is not free, so probably will need to get back to Travis. There is one difficult task though: setting up snapshot tests (basically, comparing two images). Let me know if you could help with this, I"ll give you all permissions.

That being said, I decided to get extra motivation and push it to npm, to use all new React features right now. I published it as 0.16.0-alpha.

@Pagebakers
Copy link
Collaborator

This is great, thank a bunch! I'm going to upgrade my project later this week and look into fixing 1 if I find the time.

@Pagebakers
Copy link
Collaborator

@ptmt I installed it but somehow i seem to miss most of the scripts in react-native-macos/scripts so it won't run :(

So I installed from git.
Then references to ios-install-third-party.sh instead of macos-install-third-party.sh are still in React.xcodeproj

And after changes this i get the following error in mutex.h:
#include "config.h" config.h file not found

Unfortunately don't have more time to dive into it now

@Pagebakers
Copy link
Collaborator

Pagebakers commented Mar 30, 2018

Managed to get it running with changes in #191

However the metro bundler has issues, hopefully you can shed some light on this.

error: bundling failed: Error: Unable to resolve module `AccessibilityInfo` from `/Users/eelco/Sites/vpnapp/node_modules/react-native-macos/Libraries/react-native/react-native-implementation.js`: Module does not exist in the module map

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
  1. Clear watchman watches: `watchman watch-del-all`.
  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
  3. Reset Metro Bundler cache: `rm -rf $TMPDIR/react-*` or `npm start -- --reset-cache`.  4. Remove haste cache: `rm -rf $TMPDIR/haste-map-react-native-packager-*`.
    at UnableToResolveError (/Users/eelco/Sites/vpnapp/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:772:5)
    at ModuleResolver.resolveDependency (/Users/eelco/Sites/vpnapp/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:311:1719)
    at ResolutionRequest.resolveDependency (/Users/eelco/Sites/vpnapp/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:96:16)
    at DependencyGraph.resolveDependency (/Users/eelco/Sites/vpnapp/node_modules/metro/src/node-haste/DependencyGraph.js:269:4352)
    at /Users/eelco/Sites/vpnapp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:201:36
    at next (native)
    at step (/Users/eelco/Sites/vpnapp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:306)
    at /Users/eelco/Sites/vpnapp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:536
    at /Users/eelco/Sites/vpnapp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:217
    at addDependency (/Users/eelco/Sites/vpnapp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:92)
    at /Users/eelco/Sites/vpnapp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:237:9

@ptmt
Copy link
Owner Author

ptmt commented Apr 5, 2018

Thanks to @Pagebakers, I fixed that issue for projects created with init command. Check [email protected]. Be sure you have 96dc15e#diff-9483f625c762d10b2f8d7c8c76d1cc1a file now in your local project, it should appear on all fresh projects.

Going to continue test this fork on my side project. Sorry guys, I know it's a pity and soon might be outdated due to availability of other frameworks, but I think we should finish this version at least.

@Pagebakers
Copy link
Collaborator

Awesome man! updating and adding "babel-plugin-module-resolver": "^3.1.1", to my project fixed the issues.

@avdept
Copy link

avdept commented May 21, 2018

Any plans on merging this to master?

@Pagebakers
Copy link
Collaborator

Pagebakers commented Jun 1, 2018

~~@ptmt Did you get ART working on MacOS before?~~~

See #198

@ptmt
Copy link
Owner Author

ptmt commented Jun 1, 2018 via email

@ptmt
Copy link
Owner Author

ptmt commented Jun 2, 2018

@Pagebakers this is a proof of worked ReactART example, just in case https://twitter.com/potomushto/status/770346194778415104

Thanks for PR, by the way, I added you as a collaborator, in case you want to make another PRs.

@ptmt
Copy link
Owner Author

ptmt commented Jun 12, 2018

This will live in master and publised as alpha (you can always check npm show react-native-macos versions latest version).
I also removed CircleCI. Too expensive to pay for macOS plan. Going back to Travis

@ptmt ptmt merged commit f9c9b3d into master Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.