Summary: Adds UI to the select the plugin to export. It lists the plugins which has currently some data in the redux store and it also lists those plugins which has implemented `exportPersistedState` function, as it might happen that the redux store may not have the data for a plugin but it will still export the data by calling `exportPersistedState`, which will ping the mobile client to get the data at point while we export the flipper trace.
Reviewed By: jknoxville
Differential Revision: D16468408
fbshipit-source-id: 452a7caf7199dd2b8df330bbb10d0a90008e92ec
Summary:
We in React VR were need newer Chrome DevTools version to make our plugin work properly. Chromium version with required fixes were shipped in electron 5.0.0.
This diff bumps electron version and explicitly allows node integration (accessing require, process and other node related functions from window object in index.html), because it was disabled by default in 5.0.0.
Reviewed By: jknoxville
Differential Revision: D15693539
fbshipit-source-id: 4f71a07b2afaa489aec46940c924f4ad30ad0413
Summary: Previously "Create your own plugin" in welcome screen and "Create Plugins" in menu were directing to a URL https://fbflipper.com/docs/create-plugin.html which doesn't exist anymore. So pointing the URL to page for plugin creation tutorial https://fbflipper.com/docs/tutorial/intro.html
Reviewed By: jknoxville
Differential Revision: D15362962
fbshipit-source-id: 82a9dedb21911607f20884c9bb36e58d622e8431
Summary:
This diff shows an export sheet when one exports the Flipper data in a file. It also shows if any error happens.
Look at the video in test case.
Reviewed By: danielbuechele
Differential Revision: D14624194
fbshipit-source-id: dea0179a83e626e49593e5dde1d5ff128048db02
Summary: Exposes Import/Export feature to open source. This diff also makes sure that, "Shareable Link" option doesn't show up, as it is specific to fb's infrastructure.
Reviewed By: passy
Differential Revision: D14526634
fbshipit-source-id: 3aeb97c91bc00a9c5f01c74c34a5690ec3b5739d
Summary:
This diff aims to make the selected device a little clearer, the button now shows different icons depending on the selected devices: physical, emulators and archived devices.
The dropdown now is grouped in these sections, depending on their availability:
- Connected Devices
- Running Emulators
- Imported Devices
- Launch Android emulators
- Open File...
"Open File..." allows to import a file the same way as File -> Open File...
Reviewed By: jknoxville
Differential Revision: D14460789
fbshipit-source-id: 8d6edff0d90d5e02e4ef5976af5680ab8eaf77b4
Summary: Should also fix the build.
Reviewed By: jknoxville
Differential Revision: D14477777
fbshipit-source-id: 01fcfb2321c9b7a12acdf079473d91b6805d4dda
Summary:
Uploading the Flipper data could take some while. With the current implementation the user didn't know what was happening. This is why this diff immediately shows a sheet with a spinner, until the upload is finished.
The URL is still copied to the clipboard and a notifications is displayed. Additionally the user can copy the URL from the sheet.
Reviewed By: priteshrnandgaonkar
Differential Revision: D14441759
fbshipit-source-id: c853526a7da76e2dea5e1aaf6b6eff21e4268789
Summary: Looks like a left over debug log
Reviewed By: danielbuechele
Differential Revision: D14086508
fbshipit-source-id: 6bf3ef40746d8d248ed38071107cae00ba3040f9
Summary: This diff imports and exports data in a `.flipper` file extension. This diff also adds the support to open flipper app by double clicking on the `.flipper` file.
Reviewed By: danielbuechele
Differential Revision: D14042846
fbshipit-source-id: 17e6b55bf2796d9abdf985411fce799600f7792b
Summary: This diff adds support to specify custom location to save the flipper data to be exported
Reviewed By: passy
Differential Revision: D13916944
fbshipit-source-id: cfe816d07eb505d99c00f7798f3a97a2093ab265
Summary:
This diff adds the feature to import the exported flipper data. It has the following features
- Dialog to select the file
- Merges the data with an existing store.
Reviewed By: danielbuechele
Differential Revision: D13901944
fbshipit-source-id: 1b9755735419732a34254bdc39d911bcb51ad8fe
Summary:
This diff adds the capability to export the flipper data to a file. With this diff you can click on the "Export Flipper" option from the "Edit" menu in menubar. It will export it in the file at this location
`~/.flipper/MessageLogs.json`
We do not exactly export the store, but just the important part of it. We export in the following format
```
{
fileVersion: '1.0',
device: {
os: 'iOS',
title: 'iPhone 7',
serial: '',
deviceType: 'physical',
},
clients: [
{
query: {
app: 'Facebook',
},
d: '12345678'
},
{
query: {
app: 'Instagram',
},
id: '12345678'
}
],
store: {
pluginState: {},
notifications: {}
}
}
```
In next diff I will add the capability to select the folder to export the file too.
Reviewed By: danielbuechele
Differential Revision: D13751963
fbshipit-source-id: 7d3d49c6adf8145b2181d2332c7dbd589155cec3
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
Summary:
* move CPU and Logs plugin to plugins directory, set up package.json for them
* adjust plugins/index.js to expose device and client plugins in the same place, adding two new exports
Reviewed By: danielbuechele
Differential Revision: D10247606
fbshipit-source-id: 347bf8b3f9629987ad29d1d2ed025e0c88b9c967
Summary: rename all visible references of Sonar to Flipper. Changes endpoint URLs to the new repo address.
Reviewed By: passy
Differential Revision: D9082100
fbshipit-source-id: 2ab8b680a19c23d80050e8e768379c29d66acfca
Summary: Adding a flowtype library definition for electron 3 and fixing related type errors
Reviewed By: passy
Differential Revision: D9124758
fbshipit-source-id: e09cb5b05ba952e7f95f68f9043edc586f81ae83
Summary:
There are 3 sources where plugins can be loaded from:
* `src/plugins`
* `src/fb/plugins`
* any path specified in `~/.sonar/config.json`
Plugins found in the first two directories are bundled with the app when building.
Reviewed By: jknoxville
Differential Revision: D8636061
fbshipit-source-id: 2064090d43d11695ffd99df195e5b594559fe087
Summary:
Refactors the plugin architecture of Sonar:
- Before plugin rendering had it's own implementation of the react lifecycle. This means the `render`-function was not called by react, but rather by the application it self. In this diff, the render method is now called from react, which enables better debugging and allows react to do optimizations.
- Business logic for querying emulators is moved away from the view components into its own dispatcher
- All plugin handling is moved from `App.js` to `PluginContainer`.
- The sidebar only shows one selected device. This allows us to add the screenshot feature as part of the Sonar main app and not a plugin.
- This also fixes the inconsistency between the devices button and the sidebar
Reviewed By: jknoxville
Differential Revision: D8186933
fbshipit-source-id: 46404443025bcf18d6eeba0679e098d5440822d5