Commit Graph

376 Commits

Author SHA1 Message Date
Lorenzo Blasa
560a50485c Improve offline page
Summary:
The previous offline page suggested launching Flipper from terminal by running a command.

Although this works, guidance can be simplified by just instructing users to launch Flipper from within the Applications folder.

Reviewed By: aigoncharov

Differential Revision: D50833741

fbshipit-source-id: 5a41090a66ee62c30cfc35edd69de51ed9cbbab9
2023-10-31 04:45:33 -07:00
Lorenzo Blasa
34bbd41547 If unable to load main bundle, retry after 3 seconds
Summary: If we fail to load the main js bundle, retry after 3 seconds.

Reviewed By: aigoncharov

Differential Revision: D50732857

fbshipit-source-id: b19ea165776f8105d724e586b1bed20bf1f5178c
2023-10-27 10:19:33 -07:00
Lorenzo Blasa
da7917cefe No not delegate launch to Flipper Launcher
Summary: ^

Reviewed By: aigoncharov

Differential Revision: D50557385

fbshipit-source-id: d9571dda36520eae19f2d5fda4f52807f439a4e1
2023-10-24 07:18:43 -07:00
Lorenzo Blasa
94120d61aa RN-only build flag
Summary: Previously I had created a RN build, locally, with a few minor differences. That had to be reverted. Instead of reverting and re-applying changes, I'm introducing a flag that can be used in the interim to produce the RN-only builds.

Reviewed By: LukeDefeo

Differential Revision: D50555055

fbshipit-source-id: edface9a1587fb51e54eebe73724032baf985c83
2023-10-24 04:18:51 -07:00
Anton Kastritskiy
a978c96987 large fb icons only, no density
Summary:
Currently we download a bunch of FB icons and we normally use the smallest one available.

In this diff I change the download logic so we try to download from the largest to the smallest icon and use the first one available. One the client we no longer provide the icon of the same size that is requested, instead we provide the only one we have which will typically be larger than needed. This is a good thing because

1. flipper is a local application and we do not need to worry about icons take up broadband and downloading
2. People have high density displayed

I also stopped using density(rest of related code removed in the next diff) for icons as it the icons themselves did not support it.

Reviewed By: lblasa

Differential Revision: D50495194

fbshipit-source-id: f569c2f3b8ee424a67c6d21136e7e113868b8f6a
2023-10-20 07:23:34 -07:00
Andrey Goncharov
cc76a21d80 Add more tracking data for UI startup
Reviewed By: lblasa

Differential Revision: D50365803

fbshipit-source-id: b6a601e7bf987738400a86be6814de7cafd50d3d
2023-10-17 08:28:02 -07:00
Andrey Goncharov
ee7736caee Add a more complex logger to Flipper UI Browser
Reviewed By: passy, lblasa

Differential Revision: D50223987

fbshipit-source-id: 108e1753b555c7d7b32d3fc2408c2f8efcbadb4d
2023-10-16 09:27:50 -07:00
Pascal Hartig
d40ccc8786 Update flipper-runtime icon in server app bundle
Summary: Changelog: When requesting Keychain Access, you will now see "flipper-runtime" instead of a generic "node" process.

Reviewed By: lblasa

Differential Revision: D50261830

fbshipit-source-id: ef6fd7d5099c4ff7370f0401a5de3fde1659f1f3
2023-10-13 09:01:21 -07:00
Michel Weststrate
8f056646d9 Back out "auto start server"
Summary:
Original commit changeset: 2c11e80429a2

Original Phabricator Diff: D50074673

lblasa got reports it doesn't always work (possibly permission issues)

Reviewed By: lblasa

Differential Revision: D50259755

fbshipit-source-id: 1cd5f92c4e6e40a06340ecfebea01b899ac1cc85
2023-10-13 07:54:20 -07:00
Pascal Hartig
0134b66f37 Save node binary with name flipper-runtime
Summary:
As discussed with lblasa. This solves a few issues:

- Confusing names in `ps` and Activity Monitor related to Flipper.
- Permission requests for the Keychain from "node" lead users to deny it.
- Seeing "node" as allowed apps for an entry in Keychain is confusing.

Reviewed By: lblasa

Differential Revision: D50232337

fbshipit-source-id: 3bc92aae0ca31d1a80582fb8a794bbc64fc2f2e5
2023-10-13 03:31:11 -07:00
Michel Weststrate
0c701eeffb auto start server
Summary:
This will automatically invoke the "Start" button if Flipper detect it is offline, to automate that step. It will do so only once

(safe for the reload logic that also triggers on server errors, not sure if that was intentionally?)

Reviewed By: lblasa

Differential Revision: D50074673

fbshipit-source-id: 2c11e80429a2c4ed0e43e62cb2f6057fad5eb410
2023-10-11 11:46:23 -07:00
Lorenzo Blasa
36495fca34 Change style of button when clicked
Summary: Change style of the button once disabled.

Reviewed By: antonk52

Differential Revision: D49960254

fbshipit-source-id: 048fc3b8cc78d7f2a5b167bee30d664344cbe90d
2023-10-05 15:57:23 -07:00
Lorenzo Blasa
118e5edd24 Do not use preload response
Summary: Always use the server

Reviewed By: antonk52

Differential Revision: D49952286

fbshipit-source-id: 52d2141d5c082e11dfd991534c8213886f526c6a
2023-10-05 12:30:33 -07:00
Lorenzo Blasa
f21bb817e0 Change button title when clicked
Summary: Change the button title when clicked.

Reviewed By: mweststrate

Differential Revision: D49954493

fbshipit-source-id: 3d689effc0cc5587ab8a07901b66139577b21837
2023-10-05 08:04:34 -07:00
Lorenzo Blasa
4b078a4472 Revert RN-only
Summary: ^

Reviewed By: aigoncharov

Differential Revision: D49953166

fbshipit-source-id: b08a09b89e3b857f633e62bbc5b63064c3657aa4
2023-10-05 07:14:03 -07:00
Lorenzo Blasa
d9ad2a8932 Remove troubleshoot from here
Summary:
Simplify how messages (state updates) are shown in Flipper UI.

This main change was introduced as a way to show the 'Start' server button whenever we were in a disconnected state. This is not as simple as the server may be restarting or the client may be even have reset the WS connection. Hence you the experience where this UI is shown and immediately dismissed.

This UI is only ever shown if at one point the server was alive, period. So, in this case, either the server becomes available again OR the user quits the PWA/tab/browser and launches again.

IMHO, this is a better experience that totally assuming the server is dead.

In a next iteration, we can be more clever and have a timeout such that if after a set period of time the server doesn't become online, then we show a button to start (or force kill) the server.

Reviewed By: aigoncharov

Differential Revision: D49915698

fbshipit-source-id: 03fcc150ed1f1303d1d727c82a71eb32616208e8
2023-10-05 04:37:16 -07:00
Lorenzo Blasa
80fc8eb4ed Hide troubleshoot if a message needs to be shown
Summary: Also remove the suppress error usage as is it was never used.

Reviewed By: aigoncharov

Differential Revision: D49910876

fbshipit-source-id: 7267eaddadb73ab2b6e2aab0045157271ceed427
2023-10-05 04:37:16 -07:00
Lorenzo Blasa
40939e1ae5 Get MacOS dock icon
Summary:
The icon was not shown in the past as it was indefinitely bouncing on the dock.

This is fixed now by asynchronously initiating the Node server process and then waiting until it becomes ready.

Reviewed By: passy

Differential Revision: D49907976

fbshipit-source-id: cdeaa578be42d9f5308e2e0df50872858b8248c3
2023-10-04 05:37:12 -07:00
generatedunixname89002005306973
893584a5d3 Flipper Release: v0.223.0
Summary: Releasing version 0.223.0

Reviewed By: lblasa

Differential Revision: D49836323

fbshipit-source-id: 7f68b7e9716403a664a3839762ea05b7a583920c
2023-10-03 03:40:34 -07:00
Lorenzo Blasa
b4b2f93662 Use RN-only icon on Welcome screen
Summary: ^

Reviewed By: antonk52

Differential Revision: D49827650

fbshipit-source-id: 82e202137dd3e8365c4898e583226410b8ea3645
2023-10-02 08:14:41 -07:00
Lorenzo Blasa
526112a795 Update RN-only icon
Summary: Update asset

Reviewed By: antonk52

Differential Revision: D49827100

fbshipit-source-id: ead5774a3628a5ce2e5ac5d29ec3837386d8758e
2023-10-02 08:14:41 -07:00
Lorenzo Blasa
9b283bc729 Add RN-only icon
Summary: Not in use in this diff, but it will be for next diffs.

Reviewed By: antonk52

Differential Revision: D49823258

fbshipit-source-id: 364414d7c37a14c6a166b33b9229e6f874f7f146
2023-10-02 05:06:03 -07:00
Lorenzo Blasa
df8a68b7f1 Do not delegate to Launcher
Summary: For the last stable Electron version, do not delegate to Launcher.

Reviewed By: antonk52

Differential Revision: D49821835

fbshipit-source-id: 0a80627cd1da312447b7d98d0351aa8faf2bae89
2023-10-02 05:06:03 -07:00
Luke De Feo
708db9003a Fix broken icon
Summary: it isnt showing up in prod,

Reviewed By: lblasa

Differential Revision: D49639706

fbshipit-source-id: 952a4580ecb102f8a765d63c702e80ae384b88a7
2023-09-26 09:38:07 -07:00
generatedunixname89002005306973
6b9adfe130 Flipper Release: v0.222.0
Summary: Releasing version 0.222.0

Reviewed By: lblasa

Differential Revision: D49593015

fbshipit-source-id: 9fd4b4f42134f2fb244ddeabff6b83748151e36a
2023-09-25 06:30:50 -07:00
Lorenzo Blasa
f897203a32 Better name for showing troubleshooting steps
Summary: Better name for toggling troubleshoot/main UI

Reviewed By: antonk52

Differential Revision: D49411916

fbshipit-source-id: 1e5bd4e3e5742abef1fca41349bc8b16cf1229bf
2023-09-20 04:10:39 -07:00
Lorenzo Blasa
f1c88a464b Do not use window reload
Summary: Let's keep it simple, do not reload. Just show/hide the right content.

Reviewed By: antonk52

Differential Revision: D49377316

fbshipit-source-id: 9b2a47374da3e72f17e2d55c9290960b703fd43e
2023-09-18 12:03:09 -07:00
generatedunixname89002005306973
b06272344b Flipper Release: v0.220.0
Summary: Releasing version 0.220.0

Reviewed By: lblasa

Differential Revision: D49375501

fbshipit-source-id: 5efe6e1c47d566f0c8b1409cf14fa302fc4178d8
2023-09-18 11:49:40 -07:00
Lorenzo Blasa
342ef42114 Break connection loop
Summary:
Whenever there was a connectivity error, we would show an error message and setup a retry mechanism as to refresh the page as to make it transparent for engineers to have a working workspace again.

The problem is that there are two different channels:
- HTTP server
- WS server

If the HTTP server is healthy but there is a WS error, it is not entirely correct to try to reload the page. If the error conditions for the WS remain, then we end up in a loop.

Reviewed By: passy, antonk52

Differential Revision: D49373335

fbshipit-source-id: 4e0a08fe2384860db0bf92a22edc87402d41651c
2023-09-18 08:57:15 -07:00
Lorenzo Blasa
9e219b07d8 Fix Loading page
Summary:
The existing loading page was not behaving the way it was intended. The previous implementation triggered a page reload which made the whole retry mechanism useless.

Instead, a new endpoint was defined to expose whether the server is ready or not. Use this instead as a way of knowing whether we are good to reload the page.

Reviewed By: passy

Differential Revision: D49314749

fbshipit-source-id: eb67765d7deab8610fa5d31e710070da43a18c1c
2023-09-15 05:29:40 -07:00
generatedunixname89002005306973
879c57fb34 Flipper Release: v0.217.0
Summary: Releasing version 0.217.0

Reviewed By: lblasa

Differential Revision: D49227620

fbshipit-source-id: ac587ecb7f4821d55d123f99c16336e74e276fd4
2023-09-13 06:56:59 -07:00
Lorenzo Blasa
a5a3e0494a Better installation wizard
Summary: A few improvements to the installation wizard.

Reviewed By: antonk52

Differential Revision: D49145069

fbshipit-source-id: 1aadd85e1d187bd61983a0b4201b530cbdbf509a
2023-09-11 07:12:20 -07:00
Lorenzo Blasa
d4065aba12 Loading timeout set to a second
Summary: Push the timeout to one second. Users are not going to mind if we try to load after a second but they can mind if they see their tab attempt to reload several times a second.

Reviewed By: ivanmisuno

Differential Revision: D49054898

fbshipit-source-id: 132168a1d6d381f76500bcc9c0a00e05ef0c541b
2023-09-07 06:28:23 -07:00
Lorenzo Blasa
aec376a09a Open an existing window if there is one
Summary:
Before this change, opening deep-links or importing files would open new windows.

Instead, just use an existing window if there is one.

Documentation: https://developer.chrome.com/docs/web-platform/launch-handler/

Reviewed By: lawrencelomax

Differential Revision: D48865950

fbshipit-source-id: 80c3fb58f1fcc3b8ace00fd9241bf1e374c8345e
2023-08-31 06:04:32 -07:00
generatedunixname89002005306973
43db3d561d Flipper Release: v0.214.0
Summary: Releasing version 0.214.0

Reviewed By: lblasa

Differential Revision: D48834386

fbshipit-source-id: 74c46a0b57ae6dbf1a17fd7b9d958709868ee13a
2023-08-30 13:29:50 -07:00
Lorenzo Blasa
2858259497 Launch early, even if not ready
Summary:
Flipper Launcher downloads, unpacks, launches Flipper, and closes itself.

This is fine except for the fact that Flipper may be initiating and thus there's a gap of a few seconds until engineers see the main Flipper UI.

This change improves this by launching earlier, even if just showing a loading page until Flipper is actually ready.

Reviewed By: passy, aigoncharov

Differential Revision: D48824479

fbshipit-source-id: aa6147a09f313d80592c9b08d089660ba73773a4
2023-08-30 05:08:26 -07:00
generatedunixname89002005306973
27ebbbb951 Flipper Release: v0.213.0
Summary: Releasing version 0.213.0

Reviewed By: lblasa

Differential Revision: D48685726

fbshipit-source-id: 7726ff795d5d3c6609c3dbcaccd38964c6edf4d7
2023-08-25 09:21:17 -07:00
Lorenzo Blasa
aa327b1a46 Deep-link scaffolding
Summary:
This change adds the necessary scaffolding to enable deep-link for PWA.

1. Registers the protocol/scheme in the manifest.json
2. Add a skeleton handler that parses the received arguments

Notes for reviewers:

PWA cannot reuse the 'flipper://' scheme as is not allowed. PWA schemes are limited. The only extension point is 'web+...' which is the one that is used.

Reviewed By: antonk52

Differential Revision: D48562301

fbshipit-source-id: e191fcb1a6604d20a55c1acdadf6a8eb0194895b
2023-08-24 07:25:01 -07:00
Pascal Hartig
160b05a5bd Bump deps
Summary:
This updates minor and patch level dependencies. Frustratingly, I had to revert a bunch
of changes in that version range that still caused incompatibilities and test failures.

If I find time, I'll dig a bit deeper.

Reviewed By: ivanmisuno

Differential Revision: D48433210

fbshipit-source-id: 9ab12e774c1992d4f22cc1428d34f102ce820b75
2023-08-21 03:03:30 -07:00
generatedunixname89002005306973
cc9c26d214 Flipper Release: v0.212.0
Summary: Releasing version 0.212.0

Reviewed By: lblasa

Differential Revision: D48473694

fbshipit-source-id: 751e563523881120795bbfef83616d89dcaa5f45
2023-08-19 03:47:16 -07:00
Lorenzo Blasa
4ff9279a0b Offline troubleshoot when server disconnects
Summary:
If there server disconnects, we used to show a red box message on the lower left section of the screen. It didn't say much other than the server had disconnected.
If you are aware of what the server is, then you may try to manually restart it.

Instead of doing that, a much better experience is to show the no connection troubleshoot with the button to start the server or with instructions on how to achieve this.

Reviewed By: antonk52

Differential Revision: D48467308

fbshipit-source-id: 0ffded95789c7548d9f1e1a9127409e02e72ab8c
2023-08-18 07:59:51 -07:00
Lorenzo Blasa
ce13ee426f Open file import
Summary: This change only adds the PWA as capable of handling files with the ".flipper" extension.

Reviewed By: aigoncharov

Differential Revision: D48353437

fbshipit-source-id: fd78942ac4dffb7d26d5ca5be826290018465b93
2023-08-17 13:46:08 -07:00
generatedunixname89002005306973
f81eb544fa Flipper Release: v0.210.0
Summary: Releasing version 0.210.0

Reviewed By: lblasa

Differential Revision: D47994316

fbshipit-source-id: 24559a57d58a769f6e578cf344135522e4e7c9be
2023-08-02 09:48:04 -07:00
generatedunixname89002005306973
6962289ad9 Flipper Release: v0.208.0
Summary: Releasing version 0.208.0

Reviewed By: aigoncharov

Differential Revision: D47791662

fbshipit-source-id: 9a93f9d49c0fa9a3e1598e3f00f988a94cc1eea0
2023-07-26 04:32:34 -07:00
Luke De Feo
0e15dce033 New Tree design
Summary:
1. Add indent guidess to all tree depths
2. Monospaced font
3. cleaned up alignment of icons
4. Gave everything a bit more space to breathe

Changelog: UI Debugger Tree UI refresh, added indent guides and fixed alignment

Reviewed By: mweststrate

Differential Revision: D47626869

fbshipit-source-id: e4509621cda6c254f7dd5a7ec9b99c13efb577f4
2023-07-26 03:22:38 -07:00
generatedunixname89002005306973
503abd6d22 Flipper Release: v0.207.0
Summary: Releasing version 0.207.0

Reviewed By: lblasa

Differential Revision: D47629967

fbshipit-source-id: 625011003adde117d024754aab65327dc44e147a
2023-07-20 06:41:58 -07:00
Luke De Feo
2111067d01 Add icon for litho mountables
Summary:
Requested by litho team

Changelog: UIDebugger Add seperate icon for litho mountables

Changelog: UIDebugger Serialize all props using java.lang.toString

Changelog: UIDebugger show drawables mounted by litho

Reviewed By: lblasa

Differential Revision: D47295799

fbshipit-source-id: ce5b9384e4796a5c58080a289709ed9f7afdf329
2023-07-17 09:33:42 -07:00
generatedunixname89002005306973
64db93136c Flipper Release: v0.205.0
Summary: Releasing version 0.205.0

Reviewed By: lblasa

Differential Revision: D47439005

fbshipit-source-id: 85b299368111d48cee7be184a2745146e19bd835
2023-07-13 09:49:18 -07:00
Lorenzo Blasa
a165d37ab3 Grey icon for PWA
Summary:
Right now, both Launcher and PWA share the same icon.

As to make it easier to identify which one is which, PWA will have a greyed icon instead.

Reviewed By: antonk52

Differential Revision: D47436998

fbshipit-source-id: 69d4d273c35e327263fbbf02d4ac7a005013f1d9
2023-07-13 07:41:44 -07:00
Lorenzo Blasa
dac8c5b213 Usage track now internal to tracking
Summary:
Usage tracking comes from Electron's `main.tsx`. There's a timer that dispatches an IPC event every 60 seconds.

This is all good for Electron builds.

For non-electron builds, there's no such thing as IPC.

So, react to the IPC event whenever necessary but also handle the interval internally such that usage is tracked independently of explicit callers.

Reviewed By: antonk52

Differential Revision: D47053404

fbshipit-source-id: f17694e65eed18678b45a2e815813bafab69c3f1
2023-06-27 07:17:06 -07:00