Commit Graph

34 Commits

Author SHA1 Message Date
John Knox
7d3f05dae3 Re-enable flow module checking
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
2019-07-17 06:40:09 -07:00
Daniel Büchele
0a42558344 TitleBar
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
2019-07-12 04:24:33 -07:00
Pascal Hartig
eea7e1830b Track time for URL exports
Summary: Per title.

Reviewed By: jknoxville

Differential Revision: D15939231

fbshipit-source-id: edf6c854298b52d777cda56df14f268814fba9d2
2019-06-21 06:32:59 -07:00
Pascal Hartig
58c66a626d Track time for exports
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
2019-06-21 06:32:59 -07:00
Pascal Hartig
9c75ea7665 Refactor share sheet selection
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
2019-06-18 03:14:14 -07:00
Pritesh Nandgaonkar
45999a5292 Share sheet for the file export
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
2019-04-01 08:53:37 -07:00
Daniel Büchele
880327b61d sign in
Reviewed By: passy

Differential Revision: D14598657

fbshipit-source-id: 3ee6ee5ec7323616ac200243747e0b44b1ce65d4
2019-03-27 04:21:23 -07:00
Daniel Büchele
aad970defd UI for sharable URLs
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
2019-03-14 04:22:15 -07:00
John Knox
e33e2d4d06 Unify Logger interface usage
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
2019-02-14 09:23:41 -08:00
Pascal Hartig
09a93cd9e6 Upgrading flow and fixing lint errors
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
2019-02-01 06:51:01 -08:00
Pascal Hartig
2a0f0b3dde Always show Flipper version
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
2019-01-28 04:51:06 -08:00
Daniel Büchele
384529e97f Sheet component for plugins
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
2019-01-09 10:48:18 -08:00
Daniel Büchele
780ac863b8 Adding PluginDebugger sheet
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
2018-12-20 06:14:35 -08:00
Daniel Büchele
fa9b85b065 showing multiple sheets
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
2018-12-20 06:14:35 -08:00
Daniel Büchele
20e636865c generic Sheet component
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
2018-12-19 09:06:44 -08:00
Daniel Büchele
c9b982b182 revamp UI + show oncall/group
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
2018-12-18 09:34:52 -08:00
Panagiotis Vekris
e380fa7a08 Flow v0.86.0 in xplat/sonar
Summary: allow-large-files

Reviewed By: gabelevi, dsainati1

Differential Revision: D13105210

fbshipit-source-id: 462af926206a10618a725531f2e62da9f3291fc0
2018-11-19 12:14:51 -08:00
Panagiotis Vekris
b2b27b774e Back out "Flow v0.86.0 in xplat/sonar"
Summary: Original commit changeset: f0122c8c6d60

Reviewed By: avielg

Differential Revision: D13083312

fbshipit-source-id: 4b77fda5221feff5c721bb8a509b1350d60046d5
2018-11-15 08:24:00 -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
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
Pritesh Nandgaonkar
ce996ba8af Add listener in the renderer process for deeplink
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
2018-10-17 06:21:01 -07:00
Daniel Büchele
a455520ecb adding jest test setup
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
2018-09-28 06:42:08 -07:00
Daniel Büchele
e360654b28 TitleBar
Summary: rename `SonarTitleBar` to `TitleBar`

Reviewed By: passy

Differential Revision: D9851709

fbshipit-source-id: f4b420a70d251a0ca7a5b22b66748a238c5f410a
2018-09-18 07:01:16 -07:00
Daniel Büchele
66e77075be Rename package to 'flipper'
Summary:
- rename package `'sonar'` > `'flipper'`
- rename package `'sonar-static'` > `'flipper-static'`
- rename package export from `window.Sonar` to `window.Flipper`

Reviewed By: passy

Differential Revision: D9851181

fbshipit-source-id: 34d4447c3b287496b3d20ddb54471ce777ec74e1
2018-09-18 07:01:16 -07:00
Daniel Büchele
a9b8c3d2c9 startup time tracking
Summary: Adds tracking from opening the application to the interface being shown.

Reviewed By: passy

Differential Revision: D9239037

fbshipit-source-id: eba60a9e839f9cc2b7a3c8706c6b9d63acb854b4
2018-08-10 09:13:27 -07:00
Daniel Büchele
aace545ba6 move WelcomeScreen
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
2018-08-10 08:57:09 -07:00
Daniel Büchele
1f977f4844 Store use selected plugin after reconnect
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
2018-07-31 07:58:33 -07:00
Daniel Büchele
7ed154c510 selected device
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
2018-07-09 07:19:23 -07:00
Daniel Buchele
5163f8b9a3 fbshipit-source-id: c71048dfea2a03cf83650b55aa9d1e463251920c 2018-07-04 07:19:44 -07:00
Daniel Büchele
cbab597236 show only one device in sidbar
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
2018-06-25 10:04:00 -07:00
Daniel Büchele
0c2f4d7cff split Client/Server
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
2018-06-25 10:04:00 -07:00
Daniel Buchele
6fda334a00 fbshipit-source-id: 5d9ecf33fca19e4a6b8c979b879ec9dd82af1ef9 2018-06-25 04:33:04 -07:00
John Knox
54fa6aa8f2 Replace usages of ErrorReporter with Logger
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
2018-06-20 06:18:26 -07:00
Daniel Büchele
fbbf8cf16b Initial commit 🎉
fbshipit-source-id: b6fc29740c6875d2e78953b8a7123890a67930f2
Co-authored-by: Sebastian McKenzie <sebmck@fb.com>
Co-authored-by: John Knox <jknox@fb.com>
Co-authored-by: Emil Sjölander <emilsj@fb.com>
Co-authored-by: Pritesh Nandgaonkar <prit91@fb.com>
2018-06-01 11:03:58 +01:00