Summary:
Setting the module extension to .tsx overrode the defaults, meaning .js files were no longer being checked when imported.
This adds the defaults back to the extensions to be checked, including `.js`
It does seem to cause errors importing `.tsx` at the moment, but there aren't many so I've just $FlowFixMe'd them for now.
https://flow.org/en/docs/config/options/#toc-module-file-ext-string
Reviewed By: passy
Differential Revision: D16333800
fbshipit-source-id: 7bea92c038048234b4f634704f71c15d79ab3c63
Summary: Let's migrate one file to TS, this helps us to test our tooling and make sure, everything works as expected.
Reviewed By: bnelo12
Differential Revision: D16149514
fbshipit-source-id: 05055a1830f187c6812baa661e109ea67995253b
Summary:
This sometimes take *A LONG* time for me, so I want to
know if I'm an outlier or not.
Reviewed By: jknoxville
Differential Revision: D15939147
fbshipit-source-id: 9ebd3914efdd537eeadd49e522397acc97a6ff9c
Summary:
We're if-ing over an enum, so this should be a switch.
Also removed the edge case for the share sheet and
made the error handling part of the component so the
user actually sees it.
Reviewed By: jknoxville
Differential Revision: D15853056
fbshipit-source-id: 241ed0f2e042b08c4c157db9616175297b683ac3
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:
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:
Unified all imports of Logger. Some were called LogManager before.
Now the fb-stub and the fb variants use the same interface.
Constructor of Logger is no longer exposed so it can't be initialized twice, unless in the case you're explicitly using the fb variant, which has extra functionality.
Reviewed By: danielbuechele
Differential Revision: D14083929
fbshipit-source-id: 9b61a06e1264d5f142b5a9188465c99deaf18193
Summary:
Upgrading to flow 0.91, fixing a bunch of `$FloxFixMe`s that were introduced by upgrading to 0.86.
Also fixing some linting issues.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13900794
fbshipit-source-id: 5d0a1b62371f3b5d34b909bae0876583acb6f977
Summary:
This moves the version display from the updater component
to the titlebar itself, so it'll be shown even in dev mode.
This is already useful when using it on platforms like Linux
where the updater isn't supported, but will also help when
moving to the launcher model.
Reviewed By: jknoxville
Differential Revision: D13819139
fbshipit-source-id: cbc127b8ccdf932f823bc1f40319f296516dfc31
Summary:
Exposing a `<Sheet>` component to plugins. This allows plugins to create sheets, by returning something like this from their render function:
```js
return <div>
contents of my plugin
<Sheet>{() => <div>content of my sheet</div>}
</div>
```
Reviewed By: passy
Differential Revision: D13597251
fbshipit-source-id: 9da6ba6d2036243ddd2d05b73d392bf24be8d375
Summary: Adding a PluginDebugger that gives the user some information why a plugin might not be loaded.
Reviewed By: jknoxville
Differential Revision: D13465143
fbshipit-source-id: f5d7037850874ca9545ac1523fb4e0f18ede7273
Summary:
The sheet was only used for the bug-reporter before and we had an explicit boolean flag in the redux store to keep track if the bug reporter is shown.
Changing this it an `activeSheet` property, which allows us to show arbitrary sheets, while making sure to only show one at a time.
Reviewed By: jknoxville
Differential Revision: D13516985
fbshipit-source-id: 3e83f719e2b61d0b2229268ebfdc910123b403d2
Summary: this moves the `Sheet` into its own component, so it can be reused for other places than the bug reporter.
Reviewed By: passy
Differential Revision: D13468275
fbshipit-source-id: 5f6d07a54dda078bd08a4c4cd31a41c61b58a76f
Summary:
Redesigns the bug reporting dialog:
- show information from `package.json`'s `bugs` field, where we can link to support groups or name oncalls.
- adds show/hide animation
- uses new button style
Reviewed By: jknoxville
Differential Revision: D13417287
fbshipit-source-id: 2948794e9b1f42bbd895981d5e4b0578a9b8ee2e
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:
- Set userPrefferedPlugin for external deeplink
- Listen for deeplink in renderer process and navigate accordingly
Reviewed By: passy
Differential Revision: D10339035
fbshipit-source-id: 4de6249a0672f9ce02b0dfb78a4563302c308578
Summary:
Adds a test runner for jest test and adds three simple test cases:
- render the app
- start a server
- client connecting to the app
Test can be run using `yarn test`.
To make the test runner work, some changes needed to be made:
- remove the export of `init()` from `'flipper'`, because it was a cyclic dependency
- updating Button.js to the new ref-API
Reviewed By: jknoxville
Differential Revision: D10027078
fbshipit-source-id: 49107b0dd4dec666b92ecd841422fe7e6b3a7756
Summary: Adds tracking from opening the application to the interface being shown.
Reviewed By: passy
Differential Revision: D9239037
fbshipit-source-id: eba60a9e839f9cc2b7a3c8706c6b9d63acb854b4
Summary: The sidebar is now shown, even if no device is connected. This prevents the jumping layout when Flipper launches, but still has not connected to devices.
Reviewed By: passy
Differential Revision: D9263892
fbshipit-source-id: d5b96a8619393ee4002863a83d9024f00c6cb396
Summary:
Deselect plugin when app disconnects, but store the information that the users had the app selected. When the app conencts again, restore the user's selection.
This also stores the device seleced by the user and reselects the device if it connects.
Reviewed By: xiphirx
Differential Revision: D8833948
fbshipit-source-id: ad3ef54681550ae674bdd4e695d677aea5c14588
Summary: The redux store keeps a list of devices. For the active device, it stored the index in that list. This diff now stores a reference to the active device instead of the index in that array. This changes makes it easier to get the reference to the active device in a component.
Reviewed By: jknoxville
Differential Revision: D8767514
fbshipit-source-id: c740cf98d6039223ce8d5a47bcd277989fe70bc3
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
Summary: The `Client` and `Server` code was in one file, which was messy. This splits it into two separate files.
Reviewed By: emilsjolander
Differential Revision: D8186932
fbshipit-source-id: faa79d7dccd867d69ccd1bccd43a2cf85314b1b3
Summary:
At the moment, in sonar we have an error reporter and a Logger.
ErrorReporter can be encapsulated into Logger, so users don't have to decide between logging and reporting errors.
Reviewed By: danielbuechele
Differential Revision: D8531902
fbshipit-source-id: 3986f51ea163ac939f3baffd4db3ab968f2a0762