Commit Graph

20 Commits

Author SHA1 Message Date
Pascal Hartig
259ae35284 Fix ESLint issues
Summary: Accepted the Phabricator suggestions but looks like they weren't actually applied ...

Reviewed By: danielbuechele

Differential Revision: D13958095

fbshipit-source-id: 58f3a374fc76a6e3ebccb87732af0abd0ccd52f8
2019-02-05 09:29:16 -08:00
Pascal Hartig
74a726aaf9 Use yargs for non-headless Flipper args parsing
Summary:
This seems like a better approach than ad-hoc lookup in
`electron.remove.argv`. Left a note to a task to provide
a better interface to this.

I also need this in order to ensure we're starting
Flipper through the launcher which needs to happen
before we start the Electron runtime.

Reviewed By: jknoxville

Differential Revision: D13881355

fbshipit-source-id: 69c70d71035a47084f789ddb4dc969b45ba4648b
2019-02-05 04:49:38 -08:00
Pascal Hartig
dc412ce0bc Replace ad-hoc home dir expansion with package
Summary:
Instead of replacing the tilde with home-dirs on an incomplete, ad-hoc
basis, let's use a package for this. It also supports `~USER` resolution
which someone might reasonbly expect to work if `~/DIR` is working.

Reviewed By: jknoxville

Differential Revision: D13940956

fbshipit-source-id: 5bfa9b8b2540fed8c05c856ff736e48e925f985d
2019-02-04 04:42:18 -08:00
Daniel Büchele
e02d823e5f split setup
Summary:
`static/index.js` is called by Electron's main process, it does the setup required to run Flipper. However, some of this setup is electron specific, other is not. This moves all non-Electron specific code into `setup.js` which later can be called from node, too. All Electron specific stuff is still in `static/index.js`.

On a side note, this remove the renaming from `.sonar` to `.flipper` config folder, as I think most users should have been migrated by now, users that are not yet migrated will lose their settings, which isn't too much of an issue as our settings are very minimal anyways.

Reviewed By: passy

Differential Revision: D13638253

fbshipit-source-id: 22ab2a65ffec87b40bd86899630d582d9dc5d05c
2019-01-25 12:19:07 -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
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
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
Pritesh Nandgaonkar
4f914a655e Register flipper: scheme for deeplink
Summary: This diff adds a basic setup of deeplink, with this diff whenever the link is entered in the browser the flipper app is opened and the corresponding.

Reviewed By: passy

Differential Revision: D10149797

fbshipit-source-id: ddff3d794aec66f9e878abcf4c81e87dfadca070
2018-10-17 06:21:01 -07:00
Daniel Büchele
3b6526eb07 create .flipper folder
Summary: When no config folder exists, a folder named `.sonar` was created. Instead `.flipper` should be created.

Reviewed By: hning

Differential Revision: D9754717

fbshipit-source-id: 89a7f5c80a9202f448a6bafcf461c941b656c15e
2018-09-11 07:28:31 -07:00
Ullrich Schäfer
661d5a8f5b Enabling fullscreen mode on macos (#259)
Summary:
I wanted to use Flipper/Sonar in a fullscreen/split screen environment end was surprised the feature was disabled. When I checked the blame it looks like it's been like this from the get go, so there might not even be a real reason to have it disabled. Please correct me if I'm wrong.

The default value for `fullsreenable` is true. Removing setting the
parameter reenables the feature.

- Flipped the switch, saw it go fullscreen
- Also works in split screens
Pull Request resolved: https://github.com/facebook/flipper/pull/259

Reviewed By: danielbuechele

Differential Revision: D9630068

Pulled By: passy

fbshipit-source-id: 650e54895dc596090e2edcf2802bb0020f207ecc
2018-09-03 07:57:16 -07:00
Daniel Büchele
f7606c8d59 rename ~/.sonar to ~/.flipper
Summary: renames config folder from sonar to flipper

Reviewed By: jknoxville

Differential Revision: D9541803

fbshipit-source-id: ef378c46fcbb14e76e99fb0743a99f24c536a434
2018-08-29 02:43:00 -07:00
Daniel Büchele
6f2a7dcb05 clean up console
Summary: The console was pretty spammy. This fixes some issues that were logged and changes many log statements to `console.debug` which are not shown by default.

Reviewed By: passy

Differential Revision: D9303011

fbshipit-source-id: 1102f4f8814152a45f155cb43488a515c2d4eee4
2018-08-14 03:12:54 -07:00
Daniel Büchele
8b8ffaa7a0 missing UI renames
Summary: Rename app title and update notification to "Flipper"

Reviewed By: passy

Differential Revision: D9270088

fbshipit-source-id: 4e49e8d553fdd6b98da599be3ce18b4daf412cb6
2018-08-10 09:57:38 -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
9c239c23c9 add spotlight comment with old name
Summary:
To make the transition from the old to the new name as smooth as possible, we want to allow people to launch the app using its old name via Spotlight.
Therefore, we set a comment on the executable with the old name. These comments are indexed by Spotlight and the app can be launched with the old name.

Reviewed By: passy, priteshrnandgaonkar

Differential Revision: D9149323

fbshipit-source-id: b812776350b3fc57dc3a193bcd96c343a13a039f
2018-08-07 06:41:38 -07:00
Daniel Buchele
5163f8b9a3 fbshipit-source-id: c71048dfea2a03cf83650b55aa9d1e463251920c 2018-07-04 07:19:44 -07:00
Daniel Büchele
0d5c98341a allow tilde in pluginPaths
Summary: `~` is not supported by node's `fs` functions. So we are replacing it manually.

Reviewed By: priteshrnandgaonkar

Differential Revision: D8658889

fbshipit-source-id: 36c9885a00a7e07e54ab416d6fda3b29bbda73b6
2018-07-03 10:05:00 -07:00
Daniel Büchele
5edb8bd770 clean up dynamic plugin loading
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
2018-06-26 07:17:39 -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