Commit Graph

20 Commits

Author SHA1 Message Date
Lorenzo Blasa
4b915da47c Electron releases do not update indicator on the Navigation Bar
Summary: No need to show this for Electron releases. Also, this becomes important once we make the final Electron release.

Reviewed By: aigoncharov

Differential Revision: D50557052

fbshipit-source-id: 803a9c9ad21fbff39147ac06add74888b9ee4091
2023-10-24 05:51:06 -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
58fe45fc23 No update checkes
Summary: No need to check for updates on Electron builds.

Reviewed By: antonk52

Differential Revision: D49821903

fbshipit-source-id: d836e4254bbe793921bb4a627220fee961c1c402
2023-10-02 05:06:03 -07:00
Luke De Feo
5a6091f6f8 Left rail log in icon decided by atom, cache user profile
Summary:
Previously the left rail state was decided by prescense of user profile but we are moving to logged in state being based on the atom.

As a result we need to cache the user profile so we have something to display when user not on vpn on startup

Reviewed By: aigoncharov

Differential Revision: D44502477

fbshipit-source-id: 11462d24c773d6d364e844b4f606e124e5278348
2023-03-30 10:05:59 -07:00
Ranesh Saha
7a28ed1fe5 Pipe through --updater/--no-updater flag for flipper.exe (#4277)
Summary:
In our organization, Flipper is distributed in a version controlled way. As a result, we do not want users to manually update or receive prompts to update when a new version is available. There is already a `--updater` flag in the command line arguments for flipper.exe, but it isn't piped through. This change pipes it through and disables all update related UI when `--no-updater` is passed in.
## Changelog

Support --updater and --no-updater options for flipper.exe

Pull Request resolved: https://github.com/facebook/flipper/pull/4277

Test Plan: Ran `yarn build --win` in flipper/desktop, and launched flipper.exe from flipper/dist/win-unpacked with the `--updater`, `--no-updater` and no flags and ensured the proper behavior was observed (update UI shows by default or when `--updater` is specified, and doesn't show when `--no-updater` is specified).

Reviewed By: passy

Differential Revision: D41298321

Pulled By: mweststrate

fbshipit-source-id: 5ddfede2700954f0fdd6a111b20d0836fab25565
2022-11-15 03:23:55 -08:00
Luke De Feo
a520c422eb Improve waiting for new client for deeplinks
Summary:
There were some situations were we would hang waiting for new clients but one had connected.

Additionally the old approach would close and reopen the dialog every time a state update happened in the redux store which was a little jarring. Now the polling of the update is independant the dialog

The dialog still flashes  for other parts of the flow (when scanning for devices) and would be nice to fix this too in the future

Reviewed By: mweststrate

Differential Revision: D40477502

fbshipit-source-id: d1ff161f262493cf5b3fb74e22b49ed65de8c292
2022-10-24 08:07:01 -07:00
Luke De Feo
c6dbfc87a4 Wait for client to initliaze on startup deep link
Summary: We were incorrectly assuming a client did not support a plugin because it was not fully initialized. This issue was only apparant on start deep links

Reviewed By: mweststrate

Differential Revision: D40477503

fbshipit-source-id: 5fd9db765f559b8eb80cc3680ee694dfd2cf9a37
2022-10-24 08:07:01 -07:00
Luke De Feo
71ed2f6e25 Fix deeplinks when flipper desktop is closed
Summary: Previously opening a deep link would always fail with flipper thinking the plugin did not exist.  In this diff we wait for plugins to be initialized

Differential Revision: D40142275

fbshipit-source-id: 7894fc60a6df57e13395e05263b0905847b11ad3
2022-10-07 02:52:43 -07:00
Ken Yee
fa9ba6f2d0 Adds a notifyAvailableUpdate flag to config.json to disable update (#3992)
Summary:
We would like to version control Flipper and some of our custom plugins that are installed on developers' systems.
Flipper by default prompts users to upgrade so they sometimes do the update and then all our custom plugins break because they were compiled for an older version.
See https://github.com/facebook/flipper/issues/3947 for feature request info.

## Changelog

Adds notifyAvailable flag to config.json to disable prompting for users that "an update is available"

Pull Request resolved: https://github.com/facebook/flipper/pull/3992

Test Plan:
Tested by running locally.
Had to comment out the isProduction() check to confirm this it worked properly because this flag is false on dev versions.
Couldn't figure out how to manually test the handleOpenPluginDeeplink.tsx change but made a similar change there; happy to test that if you can tell me how to exercise that path.

Reviewed By: antonk52

Differential Revision: D39654481

Pulled By: antonk52

fbshipit-source-id: cef6b48d870915c48f620269c42d24b8ef1f4c29
2022-09-21 09:47:44 -07:00
Andrey Goncharov
650ff4bcfb Remove plugin bundling
Summary: Remove the notion of bundled plugins

Reviewed By: lblasa

Differential Revision: D39308888

fbshipit-source-id: aa88ddbf2801ad1da95f89e4c761259b697b0d66
2022-09-15 10:02:19 -07:00
Andrey Goncharov
17ab7a86ef Use getRenderHost from flipper-frontned-core in flipper-ui-core
Summary: See D37139129

Reviewed By: lblasa

Differential Revision: D37236435

fbshipit-source-id: 927e9f741bfedb65165f5d24f0acfb775925cdc7
2022-06-20 12:18:40 -07:00
Andrey Goncharov
fd380a4c1e Use BaseDevice from flipper-frontend-core in flipper-ui-core
Summary: Use BasDevice definition from flipper-frontend-core in flipper-ui-core and remove the redundant definition from flipper-ui-core

Reviewed By: lblasa

Differential Revision: D37234785

fbshipit-source-id: 6e768090a197c1d2c49cb1cd573acea12fb65d24
2022-06-20 12:18:40 -07:00
Andrey Goncharov
ef5fa275a3 Use AbstractClient from flipper-frontend-core in fliper-ui-core
Summary: This stack attempts to start using flipper-frontend-core from flipper-ui-core. Currently, flipper-frontend-core contains lots of copy-pasted code from flipper-ui-core.

Reviewed By: lblasa

Differential Revision: D37139198

fbshipit-source-id: 042db7492c550e10ea72c32fd15001c141bf53f9
2022-06-20 12:18:40 -07:00
Anton Nikolaev
37ff34390a Enable Marketplace for Flipper (#3491)
Summary:
This is PR on top of: https://github.com/facebook/flipper/pull/3473

It adds an option to Settings to allow distribution of marketplace plugins.

Also includes a simple fetch function to retrieve data from external API/server.

## Changelog

Allow marketplace plugins

Pull Request resolved: https://github.com/facebook/flipper/pull/3491

Test Plan:
1. Enable marketplace
2. Provide custom marketplace server (it will serve the list of internal plugins with downloadURL)
3. Test if can see Available plugins and can download/remove the plugin
4. If new update for the plugin, it should also allow auto update

Reviewed By: antonk52

Differential Revision: D34586339

Pulled By: nikoant

fbshipit-source-id: c887982aa0f0f9abd3b5360f22e8692a2445d345
2022-03-07 02:49:49 -08:00
Anton Nikolaev
38c81ca159 Make internal plugin distribution code publicly available (#3473)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/3473

This diff is the first one which addresses https://github.com/facebook/flipper/issues/3320.

In this diff we are making a part of the code used for internal Flipper plugin distribution in Meta also available publicly for re-using in other orgs.

Some explanation on how plugin installation and updates is designed now:
1) We periodically poll for plugins available for download. API for retrieving available plugins list is abstracted and will be different between public and fb versions, however all other logic is re-used.
2) In addition to "Enabled" and "Disabled" plugins in the left panel Flipper shows "Detected in App" list. Plugins in this list are those which are known compatible with the currently selected device/app, but not yet installed.
3) User can install any of "Detected in App" plugins by clicking to "Download and install" button near them in the left panel similarly to enabling plugins in "Disabled" list.
4) If we detect that for some installed plugin we have a newer version available for download - we download it silently and store on disk.
5) If the plugin for which we have new downloaded version is disabled - we update it silently without any notifications by loading new version from the disk and unloading the previous version from cache.
6) If the plugin for which we have new downloaded version is enabled then we avoid updating it automatically (because we need to reset plugin state in such case) and instead show notification on top of the plugin and ask user to reload it to apply new version. On reloading we reset the plugin state.
7) On Flipper startup we always update all plugins to their latest versions available on the disk.

Reviewed By: aigoncharov

Differential Revision: D34380308

fbshipit-source-id: a94d724e42aa5ef78445af266fcd4c424226a703
2022-02-22 05:23:05 -08:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Michel Weststrate
fa67c21def Fix bug where client plugins weren't always started
Summary:
Changelog: Fixed issue where occasionally a plugin wouldn't open after starting Flipper

This fixes a long standing issue where rarely Flipper wouldn't show the selected plugin. This turned out to be a raise condition, that was easy to reproduce in the Flipper browser version; if a client register before all the plugins are loaded, the plugins that are enabled for that client, but not loaded yet, will not instantiate and hence not show up. This diff fixes that

Reviewed By: timur-valiev, aigoncharov

Differential Revision: D32987162

fbshipit-source-id: f3179cd9b6f2e4e79d05be1f2236f63acdf50495
2021-12-10 17:59:33 -08:00
Michel Weststrate
058785a509 Remove remaining process.env
Summary: Per title

Reviewed By: passy

Differential Revision: D32721205

fbshipit-source-id: 8e8a7fcac7d73f32d7fb59f852a8099cfe20e542
2021-12-08 04:30:56 -08:00
Michel Weststrate
52fca0859e Fix debug output in unit tests
Summary:
unit tests for deeplinks were logging full device / client objects instances, changed it to log the meta data only (description resp. query).

Since Jest buffers console output, this might even help test stability

Maybe console.debug shouldn't even be printed in Jest? See next diff

Reviewed By: passy

Differential Revision: D32557412

fbshipit-source-id: ff7fbf0cb5d8684d5333a62dac02fd5a59a6e358
2021-11-19 04:01:02 -08:00
Michel Weststrate
7e50c0466a Move app/src (mostly) to flipper-ui-core/src
Summary:
This diff moves all UI code from app/src to app/flipper-ui-core. That is now slightly too much (e.g. node deps are not removed yet), but from here it should be easier to move things out again, as I don't want this diff to be open for too long to avoid too much merge conflicts.

* But at least flipper-ui-core is Electron free :)
* Killed all cross module imports as well, as they where now even more in the way
* Some unit test needed some changes, most not too big (but emotion hashes got renumbered in the snapshots, feel free to ignore that)
* Found some files that were actually meaningless (tsconfig in plugins, WatchTools files, that start generating compile errors, removed those

Follow up work:
* make flipper-ui-core configurable, and wire up flipper-server-core in Electron instead of here
* remove node deps (aigoncharov)
* figure out correct place to load GKs, plugins, make intern requests etc., and move to the correct module
* clean up deps

Reviewed By: aigoncharov

Differential Revision: D32427722

fbshipit-source-id: 14fe92e1ceb15b9dcf7bece367c8ab92df927a70
2021-11-16 05:29:21 -08:00