Commit Graph

736 Commits

Author SHA1 Message Date
Daniel Büchele
7747a0714d plugin redux
Summary:
Plugins were loaded in `/plugins/index.js` which was loaded once at launch of the app. This moves the list of available plugins to redux. This way, plugins can be dynamically added. The redux store keeps to Maps of plugins (devicePlugins and clientPlugins) with their ID as key:

```
  devicePlugins: Map<string, Class<FlipperDevicePlugin<>>>,
  clientPlugins: Map<string, Class<FlipperPlugin<>>>,
```

On launch of the app, all plugins bundled with the app and the one found in `pluginsPath` are dynamically added.

This changes now allows to add new plugins at any time. All components that need to know which plugins are available (e.g. the sidebar) are connected to the redux store. This way, they will automatically update, whenever a new plugin is added.

- add `plugins` to the redux store to keep the list of available plugins
- add a plugins dispatcher, responsible for loading the plugins on launch
- connecting all React components that imported `plugins/index.js` before to the redux store to get the plugins from there.
- moved the updating of the MenuBar to the plugins dispatcher as it needs to update whenever a new plugin is added.

Reviewed By: jknoxville, passy

Differential Revision: D12449236

fbshipit-source-id: 6ef3e243e2c80443614b901ccbfde485fcb4301c
2018-11-15 07:30:05 -08:00
Pritesh Nandgaonkar
e02420ac78 Make android project compile with new gradle and build tools
Summary:
If this is not done. I get
```
Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1).
Searched in the following locations:
    https://jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.jar
```
I follwed the suggestion given on [stack overflow](https://stackoverflow.com/questions/52944598/could-not-find-aapt2-proto-jar)

Reviewed By: jknoxville

Differential Revision: D12839581

fbshipit-source-id: aa02620c7e4c52899b2c2c4805fd8a6f168d946a
2018-11-15 06:37:55 -08:00
Felix Krause
01ef5c84d2 Fix Ruby Podfile code style in docs (#324)
Summary:
2 spaces, and space before and after the `+`
Pull Request resolved: https://github.com/facebook/flipper/pull/324

Reviewed By: jknoxville

Differential Revision: D13082547

Pulled By: priteshrnandgaonkar

fbshipit-source-id: b6053ebde16a1f7f953704e0791622d3d59cc962
2018-11-15 06:24:32 -08:00
John Knox
ff3977da77 Show connecting spinner
Summary:
First step in visualising the connection setup process.
Just a spinner while cert exchange is happening, so it doesn't look like nothing is happening.

Reviewed By: passy

Differential Revision: D13062514

fbshipit-source-id: a0692821025f42f4fe4af86faf059d4719008f25
2018-11-15 04:36:40 -08:00
John Knox
866cb72124 Put connection setup state in redux
Summary: Puts the connection state into redux so we have more visibility on what's happening in bug reports and in general allowing us to display it on screen.

Reviewed By: passy

Differential Revision: D13060455

fbshipit-source-id: c79b4b7d6a1155d86128a5d8d1174ead9e4514ae
2018-11-15 04:36:40 -08:00
Panagiotis Vekris
6362188563 Flow v0.86.0 in xplat/sonar
Summary: allow-large-files

Reviewed By: zertosh

Differential Revision: D13067587

fbshipit-source-id: f0122c8c6d602750289121d2ab2fdb09cbb033bc
2018-11-14 15:39:25 -08:00
John Knox
a48c680a40 Modify client id string and device serialisation
Summary:
This improves bug reports.
Adding serial into device.toJson() means you can now easily see which clients (apps) are from which device because they both contain the serial.
Changing client id to use # instead of - because the subcomponents of it already use -.

Reviewed By: passy

Differential Revision: D13058430

fbshipit-source-id: 02697ec623829423e667fd2acbd1abc369a6919b
2018-11-14 08:26:32 -08:00
John Knox
9f13e1422b Add 'Redux State' to bug reports
Summary:
Now the BugReporter has access to the logs and the redux store, to submit more useful bug reports.
This isn't currently used in open source, unless you override / replace this file.

Reviewed By: danielbuechele

Differential Revision: D13058210

fbshipit-source-id: e52a3cb528693ab171843080685e5342e0b6a393
2018-11-14 05:49:00 -08:00
Pascal Hartig
533c1ab59b Upgrade node-fs-extra
Summary:
Changes are mostly bug fixes, that shouldn't affect us. From the change log:

7.0.1 / 2018-11-07
------------------

- Fix `removeSync()` on Windows, in some cases, it would error out with `ENOTEMPTY` ([#646](https://github.com/jprichardson/node-fs-extra/pull/646))
- Document `mode` option for `ensureDir*()` ([#587](https://github.com/jprichardson/node-fs-extra/pull/587))
- Don't include documentation files in npm package tarball ([#642](https://github.com/jprichardson/node-fs-extra/issues/642), [#643](https://github.com/jprichardson/node-fs-extra/pull/643))

7.0.0 / 2018-07-16
------------------

- **BREAKING:** Refine `copy*()` handling of symlinks to properly detect symlinks that point to the same file. ([#582](https://github.com/jprichardson/node-fs-extra/pull/582))
- Fix bug with copying write-protected directories ([#600](https://github.com/jprichardson/node-fs-extra/pull/600))
- Universalify `fs.lchmod()` ([#596](https://github.com/jprichardson/node-fs-extra/pull/596))
- Add `engines` field to `package.json` ([#580](https://github.com/jprichardson/node-fs-extra/pull/580))

6.0.1 / 2018-05-09
------------------

- Fix `fs.promises` `ExperimentalWarning` on Node v10.1.0 ([#578](https://github.com/jprichardson/node-fs-extra/pull/578))

6.0.0 / 2018-05-01
------------------

- Drop support for Node.js versions 4, 5, & 7 ([#564](https://github.com/jprichardson/node-fs-extra/pull/564))
- Rewrite `move` to use `fs.rename` where possible ([#549](https://github.com/jprichardson/node-fs-extra/pull/549))
- Don't convert relative paths to absolute paths for `filter` ([#554](https://github.com/jprichardson/node-fs-extra/pull/554))
- `copy*`'s behavior when `preserveTimestamps` is `false` has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs ([#563](https://github.com/jprichardson/node-fs-extra/pull/563))
- Fix subdirectory detection for `copy*` & `move*` ([#541](https://github.com/jprichardson/node-fs-extra/pull/541))
- Handle case-insensitive paths correctly in `copy*` ([#568](https://github.com/jprichardson/node-fs-extra/pull/568))

Reviewed By: jknoxville

Differential Revision: D13023753

fbshipit-source-id: 1ecc6f40be4c8146f92dd29ede846b5ab56765ea
2018-11-14 04:09:15 -08:00
John Knox
d9a9439dfa Fix emulator launching bug
Summary:
I was getting the following error when trying to launch an emulator:
`PANIC: Missing emulator engine program for 'x86' CPU.`

It seems like emulator/emulator is more reliable than tools/emulator: https://stackoverflow.com/questions/26483370/android-emulator-error-message-panic-missing-emulator-engine-program-for-x86

So put them both on the path in that order.

Reviewed By: passy

Differential Revision: D13040325

fbshipit-source-id: 11e8b24b2a99e02955128d5fb7c17764b98388fa
2018-11-13 11:18:34 -08:00
John Knox
57235131fc Prevent overlay class from being target-selected
Summary:
We use this class to show an invisible overlay when using a sandbox. This shouldn't intercept hit tests.

Would be good to remove these FB-specific references from the OSS code, but since there's one already, will leave that for a separate diff.

Reviewed By: danielbuechele

Differential Revision: D13028248

fbshipit-source-id: df2eb83fd9c4b7547ede5dcb088e10a7d3d4f36b
2018-11-13 03:54:22 -08:00
Pascal Hartig
3150daf4fa Upgrade Metro to 0.49.0
Summary: Just keeping it up-to-date. Includes a fix for source maps which could be interesting.

Reviewed By: jknoxville

Differential Revision: D13023339

fbshipit-source-id: 4c68029bb3cef408e2a7b28a1cde39f246dc046d
2018-11-12 07:16:24 -08:00
John Knox
c76b524907 iOS - Use bundleId for app ID
Summary:
The appId field gets embedded into the certificate request, so flipper knows which app to provide the cert to.
In iOS this field is never used, so far, because the destination path uniquely identifies the app so this is redundant.

For physical iPhones however, knowing the bundle id lets you deploy files into the container, so we can use this value.

Reviewed By: passy

Differential Revision: D13000296

fbshipit-source-id: 9f21850b908a03f1be87dc204e59d616150cc7ec
2018-11-12 04:23:58 -08:00
Daniel Büchele
274d71cb2f update default filters
Summary: Searchbar didn't update the filters when new default filters were added. This adds the new filters when they are added to the searchbar. Existing filters are not touched.

Reviewed By: passy

Differential Revision: D12999885

fbshipit-source-id: 51d9a1579724be2098b54161b39a0769180fb343
2018-11-12 02:27:00 -08:00
Daniel Büchele
bf7c35387c Report notifications not useful
Summary:
* adds a button to hide notifications by category
* adds a quick action to report notifications as not helpful
* fixes type of network plugin's notifications to be string instead of number

Reviewed By: jknoxville

Differential Revision: D12999883

fbshipit-source-id: 32be5bde5931cca4a27ab1ad34418300196452cc
2018-11-12 01:49:48 -08:00
Daniel Büchele
bd03f891d0 notification category filters
Summary:
Allows filtering notification by category. Category filters are also persisted in redux.

Adds a test suite for notification reducer

Reviewed By: passy

Differential Revision: D12999884

fbshipit-source-id: 5f8d2357e52f091c17b726e1f89ed68f3b7294fb
2018-11-12 01:49:48 -08:00
Daniel Büchele
8cb715bb3a adding actions to notifications
Summary: This diff adds action buttons to the notifications. Notifications with actions can only be sent from the main process. This is why we need to send a message to the main process which then shows the notification. The action callbacks are sent back to the renderer process to handle the action and log the event.

Reviewed By: passy

Differential Revision: D12999886

fbshipit-source-id: b415fded3172582fad11d88cabf0cfc5b3b8d4f9
2018-11-12 01:49:48 -08:00
Brett Lavalla
4954d018d0 Add litho accessibility rendering to Flipper accessibility mode
Summary: This is a re-do of D9720987.  Now that the Litho version has been bumped to 20 in D12838684, this diff can land safely.

Reviewed By: danielbuechele

Differential Revision: D12969979

fbshipit-source-id: b12d14e3b292d8cd110967f84f770f3725a800de
2018-11-10 00:05:44 -08:00
Dimple Jethani
0bb0d69115 added clicking on urls
Summary: added clicking on links from www

Reviewed By: danielbuechele

Differential Revision: D12992945

fbshipit-source-id: 16444a0a64b8a6cc8b46d0f79b746cf56de25ed0
2018-11-09 12:18:14 -08:00
Pascal Hartig
d159e27224 Remove ws dependency
Summary: Is it too early for spring cleaning? We don't use websockets anymore, do we? Couldn't find any imports or `require()`s.

Reviewed By: jknoxville

Differential Revision: D12997868

fbshipit-source-id: c87c67ec98b925c4209b97bf00e91fce67215465
2018-11-09 07:44:00 -08:00
Pascal Hartig
be3fae85df Upgrade to rsocket 0.0.9
Summary: Let's stay up to date and get the latest improvements.

Reviewed By: jknoxville

Differential Revision: D12997456

fbshipit-source-id: 1d543aec032052d1115d627f0103e7b8f721d74c
2018-11-09 06:31:14 -08:00
Brett Lavalla
de016b8493 Added ability to change 'enabled' view property
Summary: In the accessibility inspector plugin, the "Enabled" view property was marked at mutable, but would not actually change the clicked.  This is because no case for changing this property was implemented.  This fixes the issue and allows the property to be mutable.

Reviewed By: jknoxville

Differential Revision: D12944810

fbshipit-source-id: 846547ba1baa481eca3fe1cd949cf252904677bc
2018-11-08 17:56:20 -08:00
Noah Gilmore
5ef39cbcad Fix a couple of Sonar references in FlipperKit.podspec (#321)
Summary:
Noticed these while looking through the podspec.
Pull Request resolved: https://github.com/facebook/flipper/pull/321

Reviewed By: passy

Differential Revision: D12963023

Pulled By: jknoxville

fbshipit-source-id: c4abc77d508f56bb7a1678ddf733b36a96f0b45b
2018-11-08 03:41:06 -08:00
Dimple Jethani
aa6d6ccb9b sending www string through ntsubdescriptor
Summary: took out dictionary implementation and passing string through NTSubDescriptor

Reviewed By: rohan-mehta

Differential Revision: D12961340

fbshipit-source-id: 73493b83b3b670eb3455148c0223972b0d25815a
2018-11-07 15:20:05 -08:00
Dimple Jethani
4a02041fa1 adding tree structure to layout inspector for NT subsection
Summary: Added JSON parsing to make tree structure for NT subsection in layout inspector

Reviewed By: danielbuechele

Differential Revision: D12938117

fbshipit-source-id: 43967d2e970ff2ce7e9b2e05a99d58a95a71b650
2018-11-07 12:45:40 -08:00
John Knox
bdc3abacbd Isolate BodyFormatter exceptions
Summary: If one throws an exception, we'd skip all the other ones. I don't think that's the behaviour we want.

Reviewed By: passy

Differential Revision: D12958926

fbshipit-source-id: dd82b750197b6fc1380496be4147fe63454d39da
2018-11-07 10:35:38 -08:00
Sveinung Bakken
a56d7d5d72 Add HTML formatter to Network plugin
Summary:
Currently HTML renders as a blank response panel which is not helpful for seeing erros.
Adding a formatter for `text/html` so we can see error responses, or other HTML responses, correctly.

Note, this adds the xml beautifier package from npm.

Reviewed By: danielbuechele

Differential Revision: D12883274

fbshipit-source-id: c49b60984f10bba471b5bbb8aabcb385a171d0d6
2018-11-07 08:51:45 -08:00
Daniel Büchele
8ab52839fb UI fixes
Summary:
This is a collection of small UI fixes for the network plugin:

- image maxWidth is set to 100% to not cause vertical scrolling
- Panels now have horizontal scrollbars, if their content overflows
- fixing missing icon for failed network requests
- removing position sticky from table headers as it was not used and causing some rendering issues and performance problems
- Adding a `label` and `grow` option to the `Select`-component which is used in the sidebar of the network plugin.

Reviewed By: passy

Differential Revision: D12956336

fbshipit-source-id: 6e7e9cf97c058a2ff626576d4afdc6df65007ea1
2018-11-07 06:27:33 -08:00
Daniel Büchele
4ff5c7294c don't update when nothing changed
Summary:
The QPL plugin is sending the current time on the device every second, this was causing state updates every second.

QPL: don't update the state, when we did not receive new traces.
Client: only dispatch the update event, when the new state is different from the current.

Reviewed By: passy

Differential Revision: D12956337

fbshipit-source-id: c006540097408ead8fb8c5aac3aaaa220c1a3951
2018-11-07 06:27:33 -08:00
Fabio Milano
9ee10392e1 Fixed missing code block container
Summary: A missing code block closing back tick cause the documentation's layout to be incorrect.

Reviewed By: jknoxville

Differential Revision: D12948908

fbshipit-source-id: 8e9496d2bac81a49b39aed3a2c97ff6a20c71241
2018-11-07 05:19:22 -08:00
Ian Childs
7b569a1692 Remove getBaseContext
Summary:
We have getAndroidContext() instead.

This will probably take a few iterations to land, but getting it out there so that I can try :)

Reviewed By: muraziz

Differential Revision: D12921523

fbshipit-source-id: 038ecf8c411fdbde6831051b219a43716007ac49
2018-11-07 04:20:13 -08:00
Daniel Büchele
db42e8e970 createTablePlugin using persistedState (fixes #310)
Summary:
Implementing persistedState for createTablePlugin, so it doesn't lose its data when switching back and forth between plugins. When `runInBackground` is set to true on the native side, createTablePlugins are now also capable of receiving new data in the background.

Adds a test suite for createTablePlugin, to make sure it:
- returns a FlipperPlugin
- ID, title and icon are set correctly
- the resetMethod clears the data
- the persistedStateReducer correctly adds new data

Reviewed By: passy

Differential Revision: D12939848

fbshipit-source-id: 30048f3ce2bb98c83b0c165e48df72c8e28eadcd
2018-11-07 02:44:35 -08:00
Hilal Alsibai
21a18d3e53 Pass real client to sidebar extension factory functions
Summary: This allows sidebar extensions to have more information as to whether they should be enabled or not

Reviewed By: danielbuechele

Differential Revision: D12930405

fbshipit-source-id: 649d3f01da1c535f7d60b7b525b012a888ea78e0
2018-11-06 11:30:35 -08:00
Ian Childs
3c3ef35bce Build against Litho snapshots
Summary: We need to be able to access `getAndroidContext()`.

Reviewed By: passy

Differential Revision: D12942049

fbshipit-source-id: 0d8eee272e7822d085ba70b2d3ce4767ceec9aa2
2018-11-06 10:11:22 -08:00
Daniel Büchele
2088153ffb make width of DetailsSidebar configurable
Summary:
The `DetailsSidebar` has a fixed width of 300px. For some plugins it makes sense to specify a larger width for the sidebar, to show more content in it.

Usage:
```
<DetailSidebar width={500}>...</DetailSidebar>
```

Reviewed By: passy

Differential Revision: D12924525

fbshipit-source-id: 889d799017a6d3d53f6d32510863b4838a928fba
2018-11-06 05:38:01 -08:00
Daniel Büchele
9fb3a56303 persist notification filter
Summary:
persist the state of the redux store of `blacklistedPlugins`, so we don't show notifications for them.

This also fixes a bug where defaultFilters were not shown in the filterbar.

Reviewed By: passy

Differential Revision: D12924356

fbshipit-source-id: ebc5d2f5d2d3acfb5ed63d4085b65b7a78a7b05a
2018-11-06 05:38:01 -08:00
Pascal Hartig
f7063448e2 Upgrade electron jest runner
Summary: `v0.1.0` was released recently.

Reviewed By: jknoxville

Differential Revision: D12922054

fbshipit-source-id: 4f5dd42ca9e897d21dee4cc03e37d77d1d23972b
2018-11-05 10:50:35 -08:00
John Knox
ad98ba3235 Never cache source files in dev mode
Summary:
Some times chrome caches the output from metro bundler, meaning when developing, it uses old source files and your changes have no effect.
This fixes that by adding dont-cache to the headers of all files served.

Reviewed By: danielbuechele

Differential Revision: D12922357

fbshipit-source-id: 2c3bdf8fb60e4ec64ace2c21f6b1e4656f885339
2018-11-05 10:48:34 -08:00
Pascal Hartig
a0800b079a v0.11.2-SNAPSHOT (#319)
Summary:
Per title.
Pull Request resolved: https://github.com/facebook/flipper/pull/319

Reviewed By: jknoxville

Differential Revision: D12922076

Pulled By: passy

fbshipit-source-id: 90440de77db25b27f5e3cda274713c381467743e
2018-11-05 07:14:16 -08:00
Daniel Büchele
95a7298d21 updating UI documentation
Summary:
adding documentation for more of our UI components.

Deleted some unused components, which were not working anyways.

Reviewed By: jknoxville

Differential Revision: D12896109

fbshipit-source-id: 959c7864240883869ad67283f80a3c189b94bf00
2018-11-05 03:12:23 -08:00
Daniel Büchele
640dee6645 auto generated UI docs
Summary:
Using `react-docgen` to automatically generate docs for our UI components.
React-docgen parses the files in `components/ui` and using comments and flowtypes to generate structured information about the UI components.

For higher-order-components `react-docgen` is not able to get the information. As we are using HOC often as part of emotion's styled-components, I added a custom parser for HOCs. Using babel/parser I am parsing the components and using their doc-comments to generate the structured description.

Then, the description generated by react-docgen and my custom parser is used to generate markdown which is added to the `ui-components.md` file of our docs.

Plus: Added some styling around the documentation of props, mostly table styles.

Reviewed By: jknoxville

Differential Revision: D12896110

fbshipit-source-id: 1337c924c06e10a5d3aa752579428fd2cc7b4743
2018-11-05 03:12:23 -08:00
Pascal Hartig
ac6575850e Fail build when plugins don't compile
Summary:
This adds an option to the compilePlugin function that
allows specifying whether or not to throw an exception
if compiling a plugin fails.

While this seems like a sensible default while development,
it seems like a pretty bad idea when building releases.

Reviewed By: jknoxville

Differential Revision: D12904570

fbshipit-source-id: aee365074af129296a9d493804b959cb9513f9cc
2018-11-04 04:36:09 -08:00
Pascal Hartig
870f6017ab Flipper Release: v0.11.1
Summary: Fixes Apple dependencies and QPL plugin, changes build to fail on error.

Reviewed By: jknoxville

Differential Revision: D12905241

fbshipit-source-id: 339ca920f958cdc36c4339976d11b2b50380e861
2018-11-03 06:26:51 -07:00
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