Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates thu 28 may #1432

Merged
merged 45 commits into from
May 28, 2015
Merged

Conversation

tadeuzagallo
Copy link
Contributor

No description provided.

cpojer and others added 30 commits May 22, 2015 09:45
Summary:
@public
Previously, we had to use errors as a property on the result object because there was no way to pass custom props between
the child worker and the parent. This has been fixed in node-worker-farm (D2092153) and now we can use regular errors.
This also adapts the transformer to babel-specific errors. Generic errors, however, should still work and render readable
info.

Additionally, I deprecated, but maintained backwards compatiblity for people in OSS that are using custom transformers.

Test Plan:
1. `./runJestTests.sh`
2. `./runJestTests.sh PackagerIntegration`
3. open the playground app
4. Add a syntax error. Say `1=x` somewhere in the file
5. Reload and see error message 'SyntaxError <filename> description (line:col)'
6. Make sure that the stack trace is clickable and it attempts to open the editor to the location
Summary:
@public
Replaces jstransform with Babel. Additionally, stops (using the deprecated) passing an error property
back from the transformer, and instead passes an error in the first argument. This is because we were
able to update node-worker-farm to handle custom properties on errors.

Test Plan:
1. Export the oss project
2. npm install
3. Start the movies app
4. Make sure it works
5. Add a syntax error
6. Make sure the message is correct
Summary:
See http://www.w3.org/TR/XMLHttpRequest/#interface-xmlhttprequest
Closes facebook#1356
Github Author: Philipp von Weitershausen <philikon@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary:
This converts the existing JSEvaluateScript call for `require('<ModuleName>').<MethodName>.apply(null, <args>);` to native JSC C API methods which shaves off about 10-15% of invocation time on average, I used pretty primitive profiling methods to track the minimum, maximum and average invocation time so would appreciate any extra eyes on the performance.

If the argument count is zero the method is invoked directly with no arguments, if the argument count is 1 it's invoked directly with just that argument. If there is more than 1 argument then apply is used and the arguments are passed as the second parameter.

Ensured all existing tests pass and instruments leaks shows nothing is leaking.
Closes facebook#1037
Github Author: Robert Payne <robertpayne@me.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
…:] to _shadowQueue

Summary:
@public

Add `RCTAssertThread` to `RCTAssert.h` for convenience when checking the current/queue,
it accepts either a `NSString *`, `NSThread *` or `dispatch_queue_t` as the object to be checked

Also add a check to `-[RCTUIManager addUIBlock:]` - There was a discussion on github (facebook#1365)
due to the weird behavior caused by calling it from a different thread/queue (it might be added after `batchDidComplete` has been called
and will just be dispatched on the next call from JS to objc)

Test Plan:
Change `-[RCTAnimationExperimentalManager methodQueue]` to return `dispatch_get_main_queue()` and run the 2048 example,
it should dispatch with a helpful message (screenshot on the comments)
Summary:
HTTP headers are case-insensitive, so we should treat them that way when they're being set on `XMLHttpRequest`.
Closes facebook#1381
Github Author: Philipp von Weitershausen <philikon@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary:
With this in place, it's possible to upload a picture from the `CameraRoll` to Parse, for instance:

    xhr = new XMLHttpRequest();
    xhr.onload = function() {
      data = JSON.parse(xhr.responseText);
      var parseFile = new Parse.File(data.name);
      parseFile._url = data.url;
      callback(parseFile);
    };
    xhr.setRequestHeader('X-Parse-Application-Id', appID);
    xhr.setRequestHeader('X-Parse-JavaScript-Key', appKey);
    xhr.open('POST', 'https://api.parse.com/1/files/image.jpg');
    // assetURI as provided e.g. by the CameraRoll API
    xhr.send(new NativeFile(assetURI));

Closes facebook#1357
Github Author: Philipp von Weitershausen <philikon@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary:
This adds new development feature to React Native that provides information
about selected element (see the demo in Test Plan).

This is how it works:

App's root component is rendered to a container that also has a hidden layer called
`<InspectorOverlay/>`. When activated, it shows full screen view and captures all
touches. On every touch we ask UIManager to find a view for given {x,y} coordinates.

Then, we use React's internals to find corresponding React component. `setRootInstance`
is used to remember the top level component to start search from, lmk if you have a
better idea how to do this. Given a component, we can climb up its owners tree
to provice more context on how/where the component is used.

In future we could use the `hierarchy` array to inspect and print their props/state.

Known bugs and limitations:
* InspectorOverlay sometimes receives touches with incorrect coordinates (wtf)
* Not integrated with React Chrome Devtools (maybe in followup diffs)
* Doesn't work with popovers (maybe put the element inspector into an `<Overlay/>`?)

@public

Test Plan:
https://www.facebook.com/pxlcld/mn5k
Works nicely with scrollviews
Summary:
Looks like these options were handled as booleans when they should be handled as strings. Explicitly specify them as strings.

Closes facebook#1377
Github Author: James Ide <ide@jameside.com>

Test Plan:
 `packager/packager.sh --root A --root B` works. Also tested `packager/packager.sh --root A,B`.
Summary:
Just trying to [getCurrentPosition](https://github.com/facebook/react-native/blob/master/Libraries/Geolocation/Geolocation.js#L45) , and found the `errorBlock` of location request in timeout handler would cause red error like this:

```
2015-05-10 17:50:39.607 [warn][tid:com.facebook.React.JavaScript] "Warning: Cannot find callback with CBID 5. Native module may have invoked both the success callback and the error callback."
2015-05-10 17:50:39.610 [error][tid:com.facebook.React.JavaScript] "Error: null is not an object (evaluating 'cb.apply')
 stack:
  _invokeCallback  index.ios.bundle:7593
  <unknown>        index.ios.bundle:7656
  <unknown>        index.ios.bundle:7648
  perform          index.ios.bundle:6157
  batchedUpdates   index.ios.bundle:13786
  batchedUpdates   index.ios.bundle:4689
  <unknown>        index.ios.bundle:7647
  applyWithGuard   index.ios.bundle:882
  guardReturn      index.ios.bundle:7421
  processBatch     index.ios.bundle:7646
 URL: http://192.168.100.182:8081/index
Closes facebook#1226
Github Author: henter <henter@henter.me>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary:
[Origin Pull request](facebook#961) from [cmcewen](https://github.com/cmcewen)

All the work have been done by @cmcewen, I just rebased his work with the master.
Closes facebook#1337
Github Author: Stan Chollet <stanislas.chollet@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary:
As per discussion with @nicklockwood in facebook#875, make `RCTScrollView` check its sticky headers for hitTests first.

Closes facebook#1415
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan:
 Have a sticky header in a ScrollView with a Touchable onPress action, scroll a bit after it docks and try tapping, should respond to tap.
…ccessed concurrently from main and shadow queues
@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels May 28, 2015
Summary:
@public

Update RootView load check due to the updates to RCTText and the snapshot
reference images due to the updates to rendering

Test Plan: Run the UIExplorer tests
@tadeuzagallo tadeuzagallo force-pushed the Update_Thu_28_May branch 2 times, most recently from d0f501f to 3a79694 Compare May 28, 2015 03:51
tadeuzagallo and others added 3 commits May 27, 2015 20:41
The flow server is taking too long to start on the e2e tests in Travis and 3
retries are not being enough, increase it to 10.
@tadeuzagallo tadeuzagallo force-pushed the Update_Thu_28_May branch 3 times, most recently from 07818d5 to 7815b07 Compare May 28, 2015 05:37
Summary:
@public

After the refactor on RCTText, update the SampleApp's test to use the
accessibilityLabel instead of attributedText

Test Plan: Run the SampleApp tets
tadeuzagallo added a commit that referenced this pull request May 28, 2015
@tadeuzagallo tadeuzagallo merged commit 41859e5 into facebook:master May 28, 2015
@tadeuzagallo tadeuzagallo deleted the Update_Thu_28_May branch May 28, 2015 15:53
@ccheever ccheever mentioned this pull request May 29, 2015
tadeuzagallo added a commit to tadeuzagallo/react-native that referenced this pull request Jun 1, 2015
…eMakeUndefined

Summary:
@public

Use JSValueIsUndefined instead of caching an JSValueMakeUndefined to compare with
as suggested in facebook#1432 (comment)

Test Plan: Run the RCTContextExecutor tests
ayushjainrksh pushed a commit to MLH-Fellowship/react-native that referenced this pull request Jul 2, 2020
mganandraj added a commit to mganandraj/react-native that referenced this pull request Sep 29, 2022
* add pull yml

* match handleOpenURLNotification event payload with iOS (facebook#755) (facebook#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* [pull] master from microsoft:master (facebook#11)

* Deprecated api (facebook#853)

* Remove deprecated/unused context param
* Update a few Mac deprecated APIs

* Packing RN dependencies, hermes and ignoring javadoc failure,  (facebook#852)

* Ignore javadoc failure

* Bringing few more changes from 0.63-stable

* Fixing a patch in engine selection

* Fixing a patch in nuget spec

* Fixing the output directory of nuget pack

* Packaging dependencies in the nuget

* Fix onMouseEnter/onMouseLeave callbacks not firing on Pressable (facebook#855)

* add pull yml

* match handleOpenURLNotification event payload with iOS (facebook#755) (facebook#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* fix mouse evetns on pressable

* delete extra yml from this branch

* Add macOS tags

* reorder props to have onMouseEnter/onMouseLeave always be before onPress

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* Grammar fixes. (facebook#856)

Updates simple grammar issues.

Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Saad Najmi <saadnajmi2@gmail.com>
Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>

* remove boost-for-react-native

* remove more

* remove pull

* add back header search path

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.