Summary:
Fixes required to be able to run Flipper in node.js:
* Adds checks if the `window`-object exists before using it, to allow running in node.
* Imports from within Flipper should directly reference the file they are requiring instead of `import from 'flipper'`. This was done in most of the places. Fixed a few occurrences where this wasn't the case. This is to prevent cyclic dependencies in node.
* shared packages (React, ReactDOM and Flipper) were exposed on the `window` before, changed this to `global` as this works in browser and node.
* Adds some missing methods to our electron stubs (used for testing and headless Flipper)
Reviewed By: passy
Differential Revision: D13786577
fbshipit-source-id: 145d560f1446e7d0bdec2acd8dd54dae983d7b36
Summary:
For all plugins:
- move static fields `title`, `id` and `icon` to `package.json`
- adds "bugs" field for all plugins containing links to support groups/oncalls.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13417286
fbshipit-source-id: 7b341176915f3ed7b473b95c1d879f21d7d634ef
Summary:
Adding the properties from a plugin's `package.json` as static properties to the class.
The name from `package.json` is used as it's `id`.
This allows us in the future to add meta information about a plugin to it's package.json and still use the data inside the app.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13417288
fbshipit-source-id: 3d0a62d4cb0115153cce1aaee677b9680fefebf4
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
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
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