Commit Graph

693 Commits

Author SHA1 Message Date
Pascal Hartig
9f59497913 Use Gradle 5.0RC1 with HTTP retry (#317)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/317

This could save our collective sanity. There's now
built-in support for HTTP retries: 0904f9d136

Reviewed By: jknoxville

Differential Revision: D12906015

fbshipit-source-id: 6030bfb6b914cfda186d92d20f3b15e693b1710c
2018-11-02 17:21:04 -07:00
Pascal Hartig
1045a195d6 v0.11.1-SNAPSHOT
Summary: Back to snapshots.

Reviewed By: jknoxville

Differential Revision: D12902343

fbshipit-source-id: 3e519e1348ff901c7dbdb42e82ec4b662739dd28
2018-11-02 11:25:59 -07:00
Pascal Hartig
43e7acd07f Use jellyfish for release script
Summary: Arcanist is deprecated and slow. Let's not use it.

Reviewed By: jknoxville

Differential Revision: D12905244

fbshipit-source-id: c966df5e58ac8942bdb6b66f71e1eb7652477348
2018-11-02 11:16:08 -07:00
Rafael Oleza
afd3e5e6a2 Bump react-deep-force-update
Summary: This diff should make HMR work again with the latest version of React

Reviewed By: yungsters

Differential Revision: D12900009

fbshipit-source-id: f9d4dad3ccb4e236f0545983534c167c8fcfbf31
2018-11-02 10:34:27 -07:00
Pritesh Nandgaonkar
2e9489d426 Remove unwanted import (#315)
Summary:
- [ ] Solves the broken travis
Pull Request resolved: https://github.com/facebook/flipper/pull/315

Reviewed By: jknoxville

Differential Revision: D12903152

Pulled By: passy

fbshipit-source-id: c349e451fd62f50d07814b86ff3e52cc5bdda10f
2018-11-02 09:59:54 -07:00
Pascal Hartig
a7fd546f0e Add basic integration test
Summary:
Just a quick startup test that can save you the time of manually
opening the app.

I don't have any plans of hooking this up in Circle, but it's
still kinda useful to have.

Reviewed By: jknoxville

Differential Revision: D12901590

fbshipit-source-id: a16a1814574d9f27770dcf98c6b238517c589930
2018-11-02 07:09:51 -07:00
Pascal Hartig
d54fb3a21a Flipper Release: v0.11.0
Summary: Including a fix for OkHttp issues, contributed by NightlyNexus: https://github.com/facebook/flipper/pull/313

Reviewed By: jknoxville

Differential Revision: D12883196

fbshipit-source-id: e17b43b33694f46a2bd949eafc008a772777f83e
2018-11-02 06:57:47 -07:00
Dimple Jethani
aa979b8abd Added NTSubDescriptor files and SKSubDescriptor interface
Summary: Added NTSubDescriptor file which implements the SKSubDescriptor interface to pass all NT specific data to the Layout Component Descriptor.

Reviewed By: jknoxville

Differential Revision: D12840392

fbshipit-source-id: bff295e13e8531456428424b7e073aefe7e1ced4
2018-11-01 14:43:48 -07:00
Eric Cochran
c6aed22a25 Fix OkHttp Interceptor closing response on IOException. (#313)
Summary:
The returned response body should not be closed, so that users can read the response body.

Before, when [this call](db833d36e9/android/src/main/java/com/facebook/flipper/plugins/network/FlipperOkhttpInterceptor.java (L94)) threw an exception, the body would be closed, and then [this](db833d36e9/android/src/main/java/com/facebook/flipper/plugins/network/FlipperOkhttpInterceptor.java (L54)) would return a closed response.
Pull Request resolved: https://github.com/facebook/flipper/pull/313

Reviewed By: jknoxville

Differential Revision: D12881111

Pulled By: passy

fbshipit-source-id: e76a732af6bdb527be6b90bbb02b3a5f45a1ec10
2018-11-01 09:35:07 -07:00
Pritesh Nandgaonkar
1dd5a72ab6 Update metro (#311)
Summary:
- [ ] Solve failing JS travis job
Pull Request resolved: https://github.com/facebook/flipper/pull/311

Reviewed By: jknoxville

Differential Revision: D12822934

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 2cc47372a3dde3500119e1e183aa97111cfe7f6a
2018-11-01 04:47:14 -07:00
John Knox
db833d36e9 Add max rsocket payload size
Summary:
We're seeing some crashes when attempting to send payloads larger than are supported by rsocket.
Instead of crashing, skip the message, but log it so we can see what it's containing.

This is where the failure occurs: https://github.com/rsocket/rsocket-cpp/blob/master/rsocket/framing/FramedDuplexConnection.cpp#L64

Reviewed By: passy

Differential Revision: D12857616

fbshipit-source-id: 2b02d7f5dd6499ba81783d3f8aefcbb64d9d408a
2018-10-31 11:14:56 -07:00
John Knox
b3f9bd9ee1 Remove adb reverse from test setup
Summary:
The bash file was running adb reverse on the oneworld devices.

Switching to use the real code to do this instead.

--forceExit is needed because the dispatcher keeps an open handle on the adb connection, and it doesn't expose a close() method to stop it. I'm not sure of the best way to fix that, but it's out of scope for this diff anyway.

Reviewed By: passy

Differential Revision: D10868563

fbshipit-source-id: fb44ff1353d5050bb7967cb6c4fa18c2e5d0d149
2018-10-31 08:54:42 -07:00
Jiyue Wang
f88aa99d2a Show the streaming response correctly in Flipper
Summary: make Sonar network tab work nicely with GraphQL streaming response

Reviewed By: danielbuechele

Differential Revision: D12841335

fbshipit-source-id: efcae3428c42957cbce27d467180ccbc10dc2ae9
2018-10-31 08:07:54 -07:00
Zac Sweers
62b913d844 Remove guava dependency (#309)
Summary:
It's only used in `JavascriptSessionTest`, and seems fine to keep it in tests

Resolves #172
Pull Request resolved: https://github.com/facebook/flipper/pull/309

Reviewed By: passy

Differential Revision: D12840362

Pulled By: jknoxville

fbshipit-source-id: 4ead5a4bf0c08d792abcadef713f907930a3e4e7
2018-10-31 07:50:45 -07:00
Ian Childs
f3833a6e5a More prep for ComponentContext not extending Context
Summary: Per title

Reviewed By: astreet

Differential Revision: D12839032

fbshipit-source-id: c69805fd68a6530d1e56edad3bb5edf4089ee98a
2018-10-31 07:29:32 -07:00
Pascal Hartig
81ef493a23 yarn fix
Summary: Fix style in master.

Reviewed By: jknoxville

Differential Revision: D12838697

fbshipit-source-id: 0d0d59d6d073c13e4a8c926d3a52329c3dc2381f
2018-10-31 04:48:30 -07:00
Pascal Hartig
0a6dbfcf3e Bump flow version
Reviewed By: priteshrnandgaonkar

Differential Revision: D12839991

fbshipit-source-id: 1dcca0a0bc682bf24430c7313d4af14b87cfc44d
2018-10-30 17:04:50 -07:00
Pascal Hartig
5ec2add066 Bump Litho version (#312)
Summary:
0.20.0 has been released.
Pull Request resolved: https://github.com/facebook/flipper/pull/312

Reviewed By: jknoxville

Differential Revision: D12838684

Pulled By: passy

fbshipit-source-id: 33b4f82dc65f8d8e21ea659d711a620ad12de4ee
2018-10-30 08:16:02 -07:00
Dimple Jethani
f153eedd3e add xhp tags on nt primitives
Summary: Adding xhp tags of <:nt:object> to reduction trace elements

Reviewed By: priteshrnandgaonkar

Differential Revision: D12818285

fbshipit-source-id: 4729ecc84dd1c31242c48fc6195ba05cdbb58e59
2018-10-29 12:04:06 -07:00
Dimple Jethani
e19489fbcb parsing JSON string for NTData subsections
Summary: Added separate subsections for ntData in objc - json string will be parsed on ios into correct subsections

Reviewed By: priteshrnandgaonkar

Differential Revision: D12817695

fbshipit-source-id: e1480303e121ceb537c47e6c30d328654ab91b8a
2018-10-29 11:29:28 -07:00
Pritesh Nandgaonkar
2ee2dfacfe Back out "[DO NOT LAND until Litho open source version includes rerenderForAccessibility] add litho accessibility rendering to Flipper accessibility mode [2/2]"
Summary: Original commit changeset: 000a7413fcbe

Reviewed By: passy

Differential Revision: D12821473

fbshipit-source-id: 5fa369cc48f074414b04e4786d5bd634158598a6
2018-10-29 06:20:47 -07:00
Pritesh Nandgaonkar
c938931b4f Add compiler flag for OSS builds
Summary: Currently we don't have a flag in iOS setup which lets us know if the code is going to be compiled in Open source or internally. Till now we didn't have a use case for it. But NT team is hacking a componentkit descriptor which is open sourced. This flag will come in handy for us to keep the open source setup build successfully.

Reviewed By: jknoxville

Differential Revision: D10854300

fbshipit-source-id: ac5da6f239b2066b6d7f0680cbfc1b7062ae0f36
2018-10-29 03:56:35 -07:00
Brett Lavalla
21c0b3ad0e add litho accessibility rendering to Flipper accessibility mode [2/2]
Summary: Completes D9667222 to allow force rendering of accessibility in litho when an accessibility service is not actually running.

Reviewed By: ikenwoo

Differential Revision: D9720987

fbshipit-source-id: 000a7413fcbe775a525ca3aca64443c3669cdf9e
2018-10-27 23:35:50 -07:00
Dimple Jethani
a2c4c98feb Added nt stack trace param in SKComponentLayoutDescriptor
Summary: Added stack trace param in layout node descriptor

Reviewed By: priteshrnandgaonkar

Differential Revision: D10850248

fbshipit-source-id: 0d647c773528f40a349b6738ecfafed0f22df193
2018-10-26 18:53:25 -07:00
John Knox
e418a810e6 Apply oneworld-fix patch before testing connectivity
Summary:
Making the runner apply the necessary oneworld fix patch before running the tests.

This can't be a long term solution, but at least means not getting that breaking change landed doesn't stop our tests from running.

Since that change is only necessary for the tests, maybe we'll get away with fixing the update process before having to land it.

Reviewed By: priteshrnandgaonkar

Differential Revision: D10852110

fbshipit-source-id: b53a6d0ae9cb51e62cafc0c0f2cfe359ee6aff46
2018-10-26 06:42:32 -07:00
Hilal Alsibai
c6244054e0 Fix view accessibility path key
Summary: Was set to view previously and blocked the ability to edit view attributes.

Reviewed By: sjkirby

Differential Revision: D10865495

fbshipit-source-id: 8db043bdc8725b2b56f037d7d8467233db524f5e
2018-10-26 01:15:33 -07:00
Pascal Hartig
c3e4f16188 Restructure modules to reduce import-time side effects
Summary:
`flipper` does a lot of stuff at import time. I copied the `styled` reexport
to the UI module, so it's possible to just depend on that.

`remote` is another one of those pot holes that can easily ruin your journey
if you aren't careful navigating around it. Added some defensive fallbacks here
which ultimately allows the lint test to run (and pass) without Electron.

Reviewed By: danielbuechele

Differential Revision: D10507655

fbshipit-source-id: 6dad5665ba15b5cb73caa4ea46262cf337173eb8
2018-10-25 12:56:42 -07:00
Pascal Hartig
2f307b8b4f Avoid import-time side effects for application
Summary:
`INITIAL_STATE` is defined at import-time and relies on `remote.getCurrentWindow()`, which means that any import from the `flipper` module will require a display server + electron running.

Happy to take alternative suggestions to make this look a bit less intrusive.

Reviewed By: danielbuechele

Differential Revision: D10507539

fbshipit-source-id: 62b6bff0b4fd40638e54328613de4d3821b69dd6
2018-10-25 12:56:42 -07:00
John Knox
1be54ebee1 Add optional debug log switch
Summary:
This won't affect runtime, but is useful when debugging issues with flipper itself.
Setting this flag means all state changes will be output in logcat.

Reviewed By: passy

Differential Revision: D10231148

fbshipit-source-id: 7ddd490290ad973fc339b2f5f93a6f9a1fab4577
2018-10-25 04:14:37 -07:00
John Knox
57752533a6 Reconnect after desktop fails during cert exchange
Summary:
The code here is quite complicated so here's whats happening:

There's a disconnect hook, that waits and reconnects, so flipper never stops, except for the case where the desktop itself fails.

This makes some sense, but not total sense, as the client should really keep connecting, in case there's a different desktop that won't fail, or even if it was a transient failure.

Explicitly disconnecting, by setting the client to null, will trigger the disconnect hook and carry on the connect loop.

Reviewed By: passy

Differential Revision: D10231241

fbshipit-source-id: 90d823dce2221b1fb6501bd2797871dc1fb9770a
2018-10-24 10:37:16 -07:00
John Knox
d1a1c299dc Reconnect when adb server gets killed
Summary:
Flipper tracks devices on an adb connection. If the adb server gets killed, it deletes all devices, but doesn't attempt to reconnect.
This gets it to rety after 500ms.

Reviewed By: priteshrnandgaonkar

Differential Revision: D10526974

fbshipit-source-id: a2101067f2245b728f458fc5e06dc68833c5e772
2018-10-24 08:13:43 -07:00
John Knox
bd25e5e97c Re-use adb client
Summary: This class already has an adb client. Instead of creating new ones, should just use that.

Reviewed By: passy

Differential Revision: D10231152

fbshipit-source-id: c9426a12f0f6baf94026da51a79131d07e58053c
2018-10-24 04:31:03 -07:00
Pritesh Nandgaonkar
ff6b1790cb Adds Diagnostics screen in sample app
Summary: Adds Diagnostics screen in sample app

Reviewed By: danielbuechele

Differential Revision: D10509941

fbshipit-source-id: 9d0a8244dc93528cfdb06ae70d51c2a408f3e3be
2018-10-23 10:39:08 -07:00
Pritesh Nandgaonkar
12d2af38f7 Added screens in sample app for notification
Summary:
Added a basic communication flows and a button to trigger notification
{F142016937}

Reviewed By: jknoxville

Differential Revision: D10492428

fbshipit-source-id: b65fc46b3be695852f9197771a253d9e8596f328
2018-10-23 09:12:57 -07:00
Pritesh Nandgaonkar
74c1a24b86 Add example plugin
Summary: Added example plugin for iOS, similar to android

Reviewed By: jknoxville

Differential Revision: D10492429

fbshipit-source-id: d639edc7a47ab240bb172516c2f38b8e2a9f285c
2018-10-23 09:12:57 -07:00
Pascal Hartig
da37326a14 v0.10.1-SNAPSHOT
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/308

Reviewed By: priteshrnandgaonkar

Differential Revision: D10505464

Pulled By: passy

fbshipit-source-id: 7c44730b4086e983db05f666463e8ca62b57220c
2018-10-23 07:35:50 -07:00
John Knox
4eaf76ecf2 Fix isSearchActive crash in wilde
Summary:
This responder was added to android but not iOS, and was always being called during layout init.
Fixing by implementing it in iOS too.

Reviewed By: priteshrnandgaonkar

Differential Revision: D10489411

fbshipit-source-id: ef711dc5f54f52dd76db1245d07f9007fc846532
2018-10-23 05:54:25 -07:00
Pascal Hartig
66790e12e6 Bump build tools
Summary: This is actually the new minimum required version for the gradle plugin we use.

Reviewed By: jknoxville

Differential Revision: D10505346

fbshipit-source-id: ce331851b74997369325f27f050efae07e4bf00c
2018-10-23 04:44:52 -07:00
Pascal Hartig
f75a90bf78 Remove overloaded ErrorReportingRunnable class
Summary:
This masks this fact that `mConnection` must be `non-null` for
very little convenience in return. Let's keep this explicit.

Reviewed By: danielbuechele

Differential Revision: D10505205

fbshipit-source-id: d8187cc8e79d4508babe281ff88b3ba75c0baa1f
2018-10-23 04:44:52 -07:00
Pascal Hartig
bc0e5b3a11 Broaden notification message type definition
Summary:
Let's the notification render any React node.
Particularly useful when including links or wanting to
format messages.

Reviewed By: jknoxville

Differential Revision: D10488157

fbshipit-source-id: 06d3c6b4477c78e8bef78e3a3dc0e05bc67a2ef4
2018-10-22 15:47:49 -07:00
John Knox
f0262d91f0 Oneworld connectivity test
Summary:
Gets a oneworld device (just android for now), installs an app. Checks it connects and stays connected for 5s.

The app installed is in an array, we just need to add more targets for further tests.

Reviewed By: danielbuechele

Differential Revision: D10231083

fbshipit-source-id: c33fb091c1b7914a33690398a79fd700c445c06c
2018-10-22 11:38:36 -07:00
John Knox
764cdfe127 Move async work out of the Server constructor
Summary:
I feel like doing async stuff here isn't a good idea in general.
But more pressingly, it means you can't immediately call server.close() after new Server(), because the things to close haven't been created yet.

Reviewed By: danielbuechele

Differential Revision: D10488301

fbshipit-source-id: 76ebe91e0c09f353e0bdb9f2e4116757e757abb2
2018-10-22 11:38:36 -07:00
Daniel Büchele
086ab0188b rename fill attribute
Summary:
We were using `fill={true}` as an attribute to make flexbox containers fill the entire available space.

However, `fill` is an HTML attribute (see: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill) This caused warnings printed to the console.

This diff renames the attribute to `grow` with is also more in line with the Flexbox terminology.

Reviewed By: priteshrnandgaonkar

Differential Revision: D10488389

fbshipit-source-id: ed8553c6203cdf6df94d26c731164ecec4c9fbd2
2018-10-22 09:54:59 -07:00
Pascal Hartig
2a179b9d3c @Nullable for example plugin
Summary: Per title.

Reviewed By: jknoxville

Differential Revision: D10464336

fbshipit-source-id: 84b572d9fddf62b8515183aff6bb64925772c719
2018-10-22 09:02:19 -07:00
John Knox
76d40e7ddf Use node's perf_hooks
Summary:
I tried switching Flipper to use the node.js module: https://nodejs.org/api/perf_hooks.html instead of electrons window.performance. But the module couldn't be found.

So instead, I'm just replacing it in the pure node tests.

This means tests without node can work without issues.

Reviewed By: danielbuechele

Differential Revision: D10302114

fbshipit-source-id: b3b8aa5fb350a8246fcdfc2a80cc72daec2448d7
2018-10-22 09:00:38 -07:00
John Knox
87830ff106 Add transform for stubbing electron
Summary:
The idea behind this is to enable tests running in pure node, without electron, because electron requires display drivers and complicated things.

I've been lazy and only added the bare minimum electron api's for the connection test to pass.
It would be awesome to auto generate it properly.

Reviewed By: danielbuechele

Differential Revision: D10238132

fbshipit-source-id: d4a2da2baf5f8964184b532a581c3a75ee33ef06
2018-10-22 09:00:38 -07:00
Daniel Büchele
c8a7ce5cfb link to hub
Summary: Clicking on a notifications links to the Notification Hub highlighting the selected notification.

Reviewed By: jknoxville

Differential Revision: D10487822

fbshipit-source-id: ed907ec244bef970d1b30ddb719856949229d0c4
2018-10-22 06:59:52 -07:00
Daniel Büchele
7b9bd8560e update PluginContainer to new React API
Summary: React has a built in API for computing the state from props called `getDerivedStateFromProps`. So let's use this instead of our custom implementation.

Reviewed By: jknoxville

Differential Revision: D10484213

fbshipit-source-id: 4c434c5252dabfc2f6015cb6a50719b985c60446
2018-10-22 06:59:52 -07:00
Daniel Büchele
86c796a706 adding selectPlugin API to plugins
Summary:
Allow linking from one plugin to another. Adds a prop `selectPlugin` to the plugin that can be passed a pluginID and an optional `deepLinkPayload`.

The return value tells you if switching the plugin was successful.

```
selectPlugin: (pluginID: string, deepLinkPayload: ?string) => boolean,
```

Reviewed By: passy

Differential Revision: D10483925

fbshipit-source-id: 6f821277150b2db185b7d545c310214a11432eac
2018-10-22 06:59:52 -07:00
John Knox
b1c735c40d Modify recommended ios build commands (#296)
Summary:
This will make sure your local pods repo is up to date, so you won't be building against old dependencies.
Pull Request resolved: https://github.com/facebook/flipper/pull/296

Reviewed By: passy

Differential Revision: D10446899

Pulled By: jknoxville

fbshipit-source-id: 61c8832e8d5f7c54a43fc3e419347687756f4883
2018-10-22 03:40:51 -07:00