Commit Graph

265 Commits

Author SHA1 Message Date
Michel Weststrate
f07d898a35 Use fragments instead of arrays when returning elements
Summary: Returning arrays from render kills react-reconciliation and produces missing key warnings. Turned all array rendering methods to use Fragments, where I could find them.

Reviewed By: jknoxville

Differential Revision: D21178253

fbshipit-source-id: 85ddf8adfa79732ccbe68409fdcf150399455983
2020-04-23 03:47:32 -07:00
Michel Weststrate
67412bfb43 Fix scrolling of query items and JSON details view
Summary: This diff fixes the tripple scrollbars in the graphQL plugin, and makes sure scrollbars for the detail panel are properly shown

Reviewed By: jonathoma

Differential Revision: D21177849

fbshipit-source-id: d40173d7e9a45064b608c8d953c7aea47a4acd0f
2020-04-23 03:47:31 -07:00
Michel Weststrate
4665bcf218 Introduced Layout component
Summary:
This diff introduces a Layout component.

Layout is now quite randomly build up by using panels, sidebars, flex columns, flexrow and view components. They all have slight different scrolling, overflow, and grow behavior. Which causes issues with areas not being srcollable, double scrollbars or simply the wrong area scrolling. Too make things worse to design, many components by default display hidden content, and show scrollbars automatically rather than deliberately.

To work towards a consist, and especially simple layout model, over time I want to build a consistent outside-in layout model, where always parents reserve space for children, and children fill the available space and device it even further.

Note that this approaches better how 'applications' typically organize their layout, which is opposite from the classic 'document', where the contents is allowed to grow and is used to push things down / aside where they want. However, such a model fits an application with toolbars, sidebars and scroll regions badly, and currently those two philosophies are mixed throughout the application.

This component is a very small first step to organizing our layout consistently. By using a new component there is less risk to break existing layouts. The `Layout` component takes up all available space, both horizontally and vertically, and gives the first child what it needs based on its own size (typically, a toolbar or (resizable) sidebar), and all the remaining space to the second child. By default the space is distributed vertically, but it can also be distributed horizontally. It can provide scrollbars as well if needed so that the main content doesn't need to provide that by itself.

Examples:

```
<Layout scrollable>
  <Toolbar />
  <LargePicture />
</Layout>

<Layout horizontal>
  <ResizableSidebar />
  <SomeContentTable />
</Layout>
```

Reviewed By: jknoxville

Differential Revision: D21178245

fbshipit-source-id: c2d2f167d1572278e51a5b66e1cbf13c42c3b898
2020-04-23 03:47:31 -07:00
Anton Nikolaev
1509180929 Fixed warning about using kebab-style for emotion styling
Summary: Just fixed warning that kebab-style properties are deprecated and camel-case should be used instead

Reviewed By: mweststrate

Differential Revision: D21178489

fbshipit-source-id: 9fba323b3c6ccfce7eb2acc97aa57526305e24ac
2020-04-22 14:03:08 -07:00
Michel Weststrate
18b88a7e03 Flipper Release: v0.38.0
Summary: Releasing version 0.38.0

Reviewed By: cekkaewnumchai

Differential Revision: D21155371

fbshipit-source-id: 554393fc357135cd8538c9b77eee023f8a3e1525
2020-04-21 13:10:56 -07:00
Timur Valiev
764ba546f7 Move ToolbarIcon to main ui components folder
Summary: there are two plugins which uses copy-pasted ToolbarIcon and at least one more where it will be helpful. Let's move it to components folder

Reviewed By: nikoant

Differential Revision: D21089290

fbshipit-source-id: a14dcd56633dd24016711e34308b94023fcb40ed
2020-04-21 09:23:46 -07:00
Michel Weststrate
60ddad7e08 Fix deeplink parsing issue and device plugin highlighting
Summary:
This diff fixes an issue where the selected device was not correctly updated when selecting a device plugin, causing the wrong plugin, or none at all, to be highlighted.

This diff fixes an issue where deeplinks were not correctly parsed if formatted as shown in the test plan of D20920587 (it was a different format in the recording, but after looking into it, using `plugin?params` instead of `plugin/?params` is the natural thing to do, so we now support both)

Reviewed By: jknoxville

Differential Revision: D21154190

fbshipit-source-id: c31132aaf7213ee1c3c188a6a1cf2b6bcc7b5b00
2020-04-21 06:33:25 -07:00
Anton Nikolaev
3ff2d3bf99 Add "id" field to Flipper plugin manifest
Summary:
Added "id" field to Flipper plugin manifest which is used to match native and desktop plugin parts. Before that, "name" field was used both as npm package name and as plugin id.

The problem is that currently there are a lot of plugins which has invalid values in "name", e.g. not starting with "flipper-package-", or containing upper cased letters.

Simple renaming of "name" field can be very problematic, so we need a new field to avoid any breaking changes and keep historical analytics data which is also bound to plugin id.

Reviewed By: mweststrate

Differential Revision: D21129689

fbshipit-source-id: efd143c82a6a802cc0b5438fd3f509bd99aded0e
2020-04-20 11:14:36 -07:00
Alexander Kawrykow
c0c96dcd3e Fix typing of graphQLQuery
Summary: This was being interpreted as returning `void` which was causing problems when trying to access the resolved value from the request. Fixing to slightly better type of `Promise<any>`

Reviewed By: passy

Differential Revision: D21105552

fbshipit-source-id: 76deb5a83b5220bafed8c12c3f56f339a5215c14
2020-04-20 09:31:08 -07:00
Anton Nikolaev
ca2d04a5da Versioning for plugin format
Summary:
Added versioning for plugin format.

The first version is where "main" points to source code entry and plugins are bundled by Flipper in run-time on loading them.

The second version is where "main" points to the already existing bundle and Flipper just loads it without bundling. The plugins of version 2 must be bundled using "flipper-pkg" tool before publishing.

Changelog: Support new packaging format for plugins.

Reviewed By: mweststrate

Differential Revision: D21074173

fbshipit-source-id: 7b70250e48e5bd5d359c96149fb5b14e67783c4d
2020-04-20 06:03:16 -07:00
shinpei_kim
ad6da949f7 Simplify RegExp (#995)
Summary:
## Changelog
Pull Request resolved: https://github.com/facebook/flipper/pull/995

Reviewed By: passy

Differential Revision: D21112956

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 14d79dd399970c49835aab7eeb7dbd69ee323ab9
2020-04-20 02:52:52 -07:00
Michal Zielinski
2d1870cf7d Add support for deleting a shared preference (#1018)
Summary:
This change makes it possible to remove preferences. I also added a `Delete` context menu option to `DataInspector` because I needed it to implement this feature. passy confirmed that it makes sense to add this because delete is a common action.

Fixes https://github.com/facebook/flipper/issues/451
Pull Request resolved: https://github.com/facebook/flipper/pull/1018

Reviewed By: jknoxville

Differential Revision: D21086308

Pulled By: passy

fbshipit-source-id: 551ff0908d5e6c93f58d6012b42e1ee3531de997
2020-04-17 09:01:04 -07:00
Michel Weststrate
a5e5ed5b7b Added some additional error handlers to get a better grip on connection issues
Summary: I think it is good to have error handlers where-ever possible, so that there is historical data in our monitoring when we need it, and can track from which point of the code it originates :)

Reviewed By: jknoxville

Differential Revision: D21040059

fbshipit-source-id: 1c07fbfa65379739554bc98f83761ae97870ba82
2020-04-17 05:02:34 -07:00
John Knox
2d68006e3f Use device name instead of Web Browser
Summary: Unity is using this, and I noticed it was showing up as Web Browser which is a bit misleading.

Differential Revision: D21067698

fbshipit-source-id: 93d6a598824e61490e0eadd1b2c9fb3ebc12d01c
2020-04-17 03:10:15 -07:00
Michel Weststrate
8b75e81da5 Make background plugin stats consumable from Scuba
Summary:
I was trying to plot some graphs based on our background plugin stats, grouped per plugin, but discovered that we can't exploded or group on json object keys, so separated the data into separate `plugin-stats-plugin` events, as is done with the `time-spent` event.

Also fixed:
* grouping stats per plugin, rather than per plugin method, which was to fine-grained
* added `bytesReceived` field to the cumulative event `plugin-stats`

Reviewed By: jknoxville

Differential Revision: D21046016

fbshipit-source-id: 1043612064921cf6427d5b3bbee10b76776df39e
2020-04-16 03:20:44 -07:00
Shaheen Gandhi
f4b0898de5 Refactor command execution fallback for both push and pull
Summary:
D20920582 was unfortunately not enough to fix ability for Flipper to connect to packages that are running as services without an `<application>` tag in the manifest.

The issue there is that the push of `sonarCA.crt` succeeded due to erroneous changes to the target package.

This change ensures both pull and push are covered.

Reviewed By: jknoxville

Differential Revision: D21024673

fbshipit-source-id: cad86ba9ae3b02a99187d3f6bd3b500d2a4b971a
2020-04-15 11:26:37 -07:00
Pritesh Nandgaonkar
adebae54fa Added spinner while submitting bug report
Summary:
Solves this T65385916.
Before this diff the bugreporter showed a disabled UI while waiting for the upload to finish. Its confusing for the user as, it can be seen from the above the task.  Thus I added an intermediate UI with a spinner and a text "Submitting..." which makes it clear for the user that we are uploading a bug report.

Reviewed By: mweststrate

Differential Revision: D21017426

fbshipit-source-id: ce12dfbefc8726adfad9ef17abd744cc92c254ed
2020-04-14 10:36:42 -07:00
Anton Nikolaev
a54aad57a7 Fast refresh
Summary:
This diff enables optional [Fast Refresh](https://reactnative.dev/docs/fast-refresh) for Flipper in dev mode. It can be opted-in using additional argument "--fast-refresh": `yarn start --fast-refresh`. I've copy-pasted the most part of implementation from React Native with some minor changes.

I made this optional for now as it works not ideally. In most cases which I checked it works fine, however for some files it falls back to full refresh (e.g. when `desktop/plugins/network/index.tsx` changed) and sometimes doesn't refresh content even after change detected and re-compiled (e.g. when `src/ui/components/searchable/Searchable.tsx` is changed, Network plugin which is dependent on it is not refreshed automatically).

State from redux is restored after fast refresh, but local state in class-based components is cleared. For function-based components local state is also stored, so it's an additional point to make plugins components functional :)

Also, for now there is no UI for Fast Refresh (loading indicator etc), information is just logged to console.

Changelog: Experimental support for Fast Refresh in dev mode can be enabled by `yarn start --fast-refresh`.

Reviewed By: jknoxville

Differential Revision: D20993073

fbshipit-source-id: 65632788df105a85fac0b924b7808120900b349e
2020-04-14 07:20:40 -07:00
Anton Nikolaev
553c54b63e Include default plugins into app bundle (#998)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/998

After this diff all the default plugins (which are distributed with Flipper) will be included into the main app bundle instead of bundling each of them separately and then loading from file system. This is done by auto-generating plugins index in build-time and importing it from Flipper app bundle, so Metro can follow these imports and bundle all the plugins to the app bundle.
This provides several benefits:
1) reduced Flipper bundle size (~10% reduction of zipped Flipper archive), because Metro bundles each of re-used dependencies only once instead of bundling them for each plugin where such dependency used.
2) Faster Flipper startup because of reduced bundle and the fact that we don't need to load each plugin bundle from disk - just need to load the single bundle where everything is already included.
3) Metro dev server for plugins works in the same way as for Flipper app itself, e.g. simple refresh automatically recompiles bundled plugins too if there are changes. This also potentially should allow us to enable "fast refresh" for quicker iterations while developing plugins.
4) Faster build ("yarn build --mac" is 2 times faster on my machine after this change)

Potential downsides:
1) Currently all the plugins are identically loaded from disk. After this change some of plugins will be bundled, and some of them (third-party) will be loaded from disk.
2) In future when it will be possible to publish new versions of default plugins separately, installing new version of such plugin (e.g. with some urgent fix) will mean the "default" pre-built version will still be bundled (we cannot "unbundle" it :)), but we'll skip it and instead load new version from disk.

Changelog: Internals: include default plugins into the main bundle instead producing separate bundles for them.

Reviewed By: passy

Differential Revision: D20864002

fbshipit-source-id: 2968f3b786cdd1767d6223996090143d03894b92
2020-04-14 07:20:39 -07:00
Anton Nikolaev
452c52c291 Add internal plugins as workspaces to single package.json
Summary: We cannot just add internal plugins as workspaces to the root package.json in "sonar/desktop" as they are not open-sourced, so public build will break. Instead, I have created root package.json for internal plugins and added all internal plugins as workspaces there. This means all these plugins will use the single root yarn.lock and installation of their dependencies will be faster. This also means that plugins can declare dependencies to other local packages included into workspaces and they will be symlinked automatically.

Reviewed By: mweststrate

Differential Revision: D20806237

fbshipit-source-id: f8b3327166963dec7da8ac74079682aebe4527e1
2020-04-14 07:20:38 -07:00
Anton Nikolaev
bcc133026e Add public plugins to the root package.json as workspaces (#969)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/969

Added all public plugins as workspaces to the root package.json. This means all these plugins will use the single root yarn.lock and installation of their dependencies will be faster. This also means that plugins can declare dependencies to other local packages included into workspaces and they will be symlinked automatically.

Changelog: Internals: plugins added as "yarn workspaces" into the root package.json to simplify dependency management between them

Reviewed By: mweststrate

Differential Revision: D20805231

fbshipit-source-id: e85c62d3195d1ea3c5c60def6ca12318a2b53466
2020-04-14 07:20:38 -07:00
Alexander Kawrykow
2278769265 Include ID for logged-in User
Summary: Adding id field for the currently logged in user in the store's state

Reviewed By: passy

Differential Revision: D20928642

fbshipit-source-id: eff5373bd88ed8fd228193b47649f586cf20b585
2020-04-09 13:37:11 -07:00
Pritesh Nandgaonkar
64ca717ae9 Add support of CK in Flipper's Support Form
Summary: As per the title it adds the CK support to the Flipper's support form.

Reviewed By: jknoxville

Differential Revision: D20943408

fbshipit-source-id: bc8f0ac6a4974fe8258e91d7ac9437931c4d4abd
2020-04-09 09:57:06 -07:00
Pascal Hartig
98bb392d78 Allow device specification for plugin deep-link
Summary: Allow optionally to provide the device title to select a plugin in. Currently, there's only support for `flipper://<app>/<plugin_id>`. This allows to add a `?device=<specifier>`.

Reviewed By: mweststrate

Differential Revision: D20920587

fbshipit-source-id: e7df4b510f1adfa9c2c9d072f6aebca1edb89cc0
2020-04-09 06:38:18 -07:00
generatedunixname89002005306973
2d27b90bd9 Flipper Release: v0.37.0
Summary: Releasing version 0.37.0

Reviewed By: jknoxville

Differential Revision: D20919249

fbshipit-source-id: 59ec28ba10043da03c460d9eaadb30a8fd2e4a6f
2020-04-09 03:07:19 -07:00
Shaheen Gandhi
25222606c6 Retry file pull without run-as when package is not an application
Summary: When an android package is not an application, the `run-as` command will fail. In this case, the package might be an operating system service package. In this case, it may be possible for the user to run adb as root. Note that Flipper does not restart adbd via `adb root` on behalf of the user; the command is simply retried without `run-as`.

Reviewed By: jknoxville

Differential Revision: D20920582

fbshipit-source-id: 8db86084c3c3a61d8322edb1e34fdfdf48d0412d
2020-04-08 16:15:09 -07:00
Michel Weststrate
f53846e0ca Add graph showing how much data is received per plugin
Summary:
Added a graph to show how much data is sent to plugins. The tooltip shows a sorted overview of the amount of data.

Will put up a GK so that plugin devs can get this data also more easily

Reviewed By: jknoxville

Differential Revision: D20919321

fbshipit-source-id: f2b78b21ef34551e0ed562b009589d2a5dba9ff3
2020-04-08 13:06:00 -07:00
Michel Weststrate
bc6165bbfe Measure how many bytes are received per plugin
Summary:
Measure how many byte we receive per plugin, and add this to the plugin stats that are collected

Will add a graph to the flipper dashboard, and probably a small visualization in a next diff as well.

Reviewed By: priteshrnandgaonkar

Differential Revision: D20917583

fbshipit-source-id: bb341531ecf8492080af82c56e73c0ec608f7b36
2020-04-08 13:05:59 -07:00
Michel Weststrate
cbf0234ee4 Fix test instability
Summary:
* Fixed issue where the test wouldn't be reliable if it fired to quickly since the process has started
* Increased all test timings with a factor 10, to make the test less sensitive to system load

Reviewed By: passy

Differential Revision: D20914978

fbshipit-source-id: a3870e6374e61cf9ec1b11da529077876ef85bf8
2020-04-08 06:33:10 -07:00
Michel Weststrate
220052d70d measure clean versus unclean exits
Summary:
This adds another field to the exit data to record whether we had a clean exit where the app was closed as it should.

Note that doing a reload inside Flipper will be recorded as an unclean exit.

Reviewed By: passy

Differential Revision: D20915481

fbshipit-source-id: 240192d7a69bf620bfaa316e3e5cb0f45d6a34cc
2020-04-08 06:26:30 -07:00
Pritesh Nandgaonkar
793b100dfc Export last few lines of the logs
Summary:
This diff exports the last 30 mins of logs. I noticed that the export can become massive, if Flipper is running for a long time and if all the logs are exported. Due to this I have noticed that the byte size of the exports has been huge and most probably causing out of emory exception in our end point to upload the trace.

Just exporting Logs plugin, size of Flipper trace is 1.8MB, mind that my Flipper was just open for few mins.

{F233265050}

Look at [this](https://our.intern.facebook.com/intern/scuba/query/?dataset=infinity_analytics_events&drillstate=%7B%22sampleCols%22%3A[%22infinity_version%22%2C%22session_id%22%2C%22data%22%2C%22time%22%2C%22is_headless%22%2C%22platform%22%2C%22plugin%22%2C%22namespace_version%22%2C%22arch%22%2C%22gatekeepers%22%2C%22fbid%22%2C%22event%22%2C%22type%22%2C%22namespace%22%2C%22electron_version%22%2C%22node_version%22]%2C%22cols%22%3A[%22fbid%22]%2C%22derivedCols%22%3A[]%2C%22mappedCols%22%3A[]%2C%22enumCols%22%3A[]%2C%22return_remainder%22%3Afalse%2C%22should_pivot%22%3Afalse%2C%22is_timeseries%22%3Afalse%2C%22hideEmptyColumns%22%3Afalse%2C%22start%22%3A%22-1%20week%22%2C%22samplingRatio%22%3A1%2C%22compare%22%3A%22none%22%2C%22should_transpose%22%3Afalse%2C%22dimensions%22%3A[%22event%22]%2C%22num_samples%22%3A%22100%22%2C%22metric%22%3A%22count%22%2C%22top%22%3A50%2C%22timezone%22%3A%22America%2FLos_Angeles%22%2C%22end%22%3A%22now%22%2C%22aggregateList%22%3A[]%2C%22param_dimensions%22%3A[]%2C%22modifiers%22%3A[]%2C%22order%22%3A%22none%22%2C%22order_desc%22%3Atrue%2C%22filterMode%22%3A%22DEFAULT%22%2C%22constraints%22%3A[[%7B%22column%22%3A%22type%22%2C%22op%22%3A%22eq%22%2C%22value%22%3A[%22[%5C%22usage%5C%22]%22]%7D%2C%7B%22column%22%3A%22fbid%22%2C%22op%22%3A%22eq%22%2C%22value%22%3A[%22[%5C%22100001214797081%5C%22]%22]%7D%2C%7B%22column%22%3A%22event%22%2C%22op%22%3A%22eq%22%2C%22value%22%3A[%22[%5C%22export-url%3Atrace-size%5C%22]%22]%7D]]%2C%22c_constraints%22%3A[[]]%2C%22b_constraints%22%3A[[]]%2C%22metrik_view_params%22%3A%7B%22should_use_legacy_colors%22%3Afalse%2C%22columns_skip_formatting%22%3A[]%2C%22view%22%3A%22samples_client%22%2C%22width%22%3A%222110%22%2C%22height%22%3A%221300%22%2C%22tableID%22%3A%22infinity_analytics_events%22%2C%22tooltip_outside%22%3Atrue%2C%22fitToContent%22%3Afalse%2C%22format_tooltip_in_percent%22%3Afalse%2C%22pocs%22%3A[%7B%22poc_label%22%3A%22Point%20of%20contact%22%2C%22poc_id%22%3A%22100002006986037%22%7D]%2C%22state%22%3A%22published%22%2C%22use_y_axis_hints_as_limits%22%3Atrue%2C%22has_dynamic_context_menu%22%3Atrue%2C%22has_context_menu%22%3Afalse%2C%22legend_mode%22%3A%22nongrid%22%2C%22title%22%3A%22Support%20Form%20V2%20Events%22%2C%22timezone_offset%22%3A420%2C%22y_min_hint%22%3A0%2C%22should_render_plugins_menu%22%3Afalse%2C%22title_use_v2%22%3Atrue%7D%7D&pool=uber&view=samples_client&dashboard_id&tab_id&widget_id&widget_piece_id), the size of the export is 194 MB.

Reviewed By: jknoxville

Differential Revision: D20868701

fbshipit-source-id: 1f041d11fc9cab93cdd1f1a28f15fa557b51fc75
2020-04-06 08:43:43 -07:00
Pascal Hartig
9ba990999c Fix connection with old SDKs
Summary:
D20559197 inadvertantly broke support for old SDKs by properly handling an
exception that we previously ignored. However, this meant that Android versions
that don't support reverse-proxying will not fail to get registered although
they're otherwise supported.

Changelog: Fix connections on Android devices with older SDKs (19)

Reviewed By: jknoxville

Differential Revision: D20868923

fbshipit-source-id: 409fe20a0875dc26ecc971d33264a1145012d586
2020-04-06 06:36:46 -07:00
Pascal Hartig
64e5fff9e1 Remove unused import
Summary: Drive-by change.

Reviewed By: cekkaewnumchai

Differential Revision: D20868980

fbshipit-source-id: 1c3602cc976bc37a4196d2368960fe0a5e8a62ec
2020-04-06 06:22:39 -07:00
Roi Becker
36f1b0e9c2 Allow localhost to connect to websocket
Summary: Accept websocket connections from any localhost origin, in addition to the existing chrome extensions support.

Reviewed By: jknoxville

Differential Revision: D20792131

fbshipit-source-id: d3991aa375bfb4e6f492c02dfab9bf72b1f8c412
2020-04-06 04:50:15 -07:00
John Knox
f1e8297800 Fix broken links on website and github readme
Summary:
The url for the getting started page was changed yesterday. (no longer getting-started.html)
This fixes some links that were broken because of it.

Reviewed By: cekkaewnumchai

Differential Revision: D20855343

fbshipit-source-id: 788efb75f3581e4fe6cecd5f69f11dd64b03e7df
2020-04-04 02:30:52 -07:00
Anton Nikolaev
e35bf2c1ae Flipper Release: v0.36.0
Summary: Releasing version 0.36.0

Reviewed By: passy

Differential Revision: D20835543

fbshipit-source-id: f5d9e8884410b294d4f37cb98db614da4592e6df
2020-04-03 08:36:49 -07:00
Pascal Hartig
9bd58a46c4 UpdateIndicator: Fix a11y lints
Summary: Adding a role and tabIndex because it's clickable.

Reviewed By: mweststrate

Differential Revision: D20814436

fbshipit-source-id: 2d5acc06363df0cce1c24df7e77b1a6eaa98ab63
2020-04-03 04:06:59 -07:00
Chaiwat Ekkaewnumchai
e37bccaf04 Scroll to Inspected Element
Summary:
changelog: Add scroll to inspected element in layout plugin

Before this diff, when one inspected an element, one needed to scroll down to see highlighted line for that element. This diff added automatic scroll to inspected element. It will scroll so that the line is in middle of the app.

Also, fix direct state mutation and this error:
```
Public property 'onKeyDown' of exported class has or is using private name 'Element'.
```

Reviewed By: passy, mweststrate

Differential Revision: D20798587

fbshipit-source-id: 763eb63cd51abd73940e301e36e89232033722c3
2020-04-03 03:03:04 -07:00
Chaiwat Ekkaewnumchai
e68cbe8ecd Add forwardRef to ContextMenu
Summary:
There was a problem for the next diff because ContextMenu doesn't forward reference to child elements which causes no component attached to ref.

This diff forward ref of ContextMenu to its child. Also, there is casting because of genetic functional component used by NotificationHub

Reviewed By: mweststrate

Differential Revision: D20817968

fbshipit-source-id: d0a19a447decca73db53f02ea029f56fc7127e94
2020-04-03 03:03:04 -07:00
Pascal Hartig
c8e5d95c41 Show update indicator for non-FB builds
Summary:
Launcher was sort of a proxy for cases where we *wanted* to have an update
mechanism but possibly couldn't use it, e.g. Windows at FB.
This makes sure we can also show this in OSS.

Reviewed By: nikoant

Differential Revision: D20770804

fbshipit-source-id: 62d2dddf9cbd22d51098dda65eea50df420a3078
2020-04-02 06:30:38 -07:00
Pritesh Nandgaonkar
4e3c06cd54 Update the text to be clear that the export was successfull
Summary: This diff adds the capability to show the plugin names for which flipper failed to fetch metadata. These changes are done for both export as URL and export as File. This diff also fixes the logging for the export as a file and logs the result object in scuba.

Reviewed By: jknoxville

Differential Revision: D20724860

fbshipit-source-id: 4c9591267ca05045e0ed084804d96851c9d7636d
2020-03-31 11:02:16 -07:00
Pascal Hartig
22b3e89ce5 Disable auto-updater (#951)
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/951

Reviewed By: jknoxville, mweststrate

Differential Revision: D20766973

fbshipit-source-id: 93bf659d8944c0cca1b513235aa43ffc32b7ada8
2020-03-31 09:15:17 -07:00
Anton Nikolaev
bf32297ad9 Publish all packages to npm on release
Summary: Publish all the public packages (excluding those with "private=true") included as workspaces to "desktop" project.

Reviewed By: jknoxville

Differential Revision: D20765097

fbshipit-source-id: 444541e9a682a90eba02cb3da85ada9bd00d93d0
2020-03-31 06:34:39 -07:00
Anton Nikolaev
eb9a2cb5e7 Bump versions for all npm packages on release
Summary:
Automatically bump versions for all local npm packages included as workspaces and fix local dependencies correspondingly.

As a part of this I have also aligned versioning for all the packages by using the same version for all of them.

Reviewed By: jknoxville

Differential Revision: D20745632

fbshipit-source-id: 2d438c4b23ee72f7d7c068c5ce161063c7ceb9e5
2020-03-31 06:34:39 -07:00
Anton Nikolaev
2e88936a29 Import ws package
Summary: Import ws package in a usual way instead of importing it as source code

Reviewed By: jknoxville

Differential Revision: D20724584

fbshipit-source-id: 39cad6e544b71e66560a9351f1e5a0c89be2c152
2020-03-31 02:45:07 -07:00
Michel Weststrate
f803cb3cb1 Avoid dropping plugin messages if the connected device is not found
Summary:
Before we dropped all messages if the client connected before the device has been registered. Which happens typically on iOS (it can actually take very long, will investigate that as well, but not in this diff).
However, we don't need to wait for the device to process messages, we just need its serial, which we already know (given that we use that query id to find the matching device in the first place).

I think this will greatly improved perceived stability for iOS

Reviewed By: jknoxville

Differential Revision: D20734892

fbshipit-source-id: f98e8d31558ef606b9a8287e03fc41ab6c3a087d
2020-03-30 07:58:40 -07:00
Pascal Hartig
39f5a07ac4 Disable sideEffect test as it's failing on GitHub
Summary: Looks like something isn't deterministic.

Reviewed By: nikoant

Differential Revision: D20725370

fbshipit-source-id: 493fa7915aba9aa7bd6cce254684ff3d0f2f7eaf
2020-03-30 02:35:19 -07:00
Anton Nikolaev
5ed3e8b1eb Set attributes to Flipper release builds
Summary: Changelog: fixed applying of product attributes (title, publisher etc) to Flipper builds.

Reviewed By: passy

Differential Revision: D20724437

fbshipit-source-id: 70e31484ddd59f1802573e2f963ee37857ab8405
2020-03-30 01:58:30 -07:00
Michel Weststrate
8fa4b5ccb2 Update existing subscriptions to use sideEffect
Summary: See previous two diffs, this applies the abstraction to our code base

Reviewed By: passy

Differential Revision: D20679687

fbshipit-source-id: 05e340dca3f832971783a844a78d1ffd553ff9d2
2020-03-27 04:42:12 -07:00
Michel Weststrate
7a40d3f0a3 Introduce sideEffects for safer management of store side effects
Summary:
This diff introducing the sideEffect abstractions, that creates a fundamental solution for the problem in D20619226: If a subscription to the store errors, the entire store can't be updated anymore, bringing the entire app to a halt.

Applying this abstraction will be done in a next diff.

To essential idea of sideEffect is that it fixes a few problems:

1. I decouples and throttles the effect so that no arbitrary expensive burden is added to every store update
2. It makes sure that a crashing side effect doesn't crash the entire store update
3. It helps with tracing and monitoring perf problems
4. It puts the side effect behind a selector so that the side effect is only triggered if a relevant part of the store changes, like we do for components.

Note that if some subscription _must_ be handled synchronously, than that logic should be in a reducer, not in a subscription or side effect. Luckily we don't have any examples of that in our code base.

This abstraction might actually be intesting to be shared wider for fun and profit.

Reviewed By: passy

Differential Revision: D20625872

fbshipit-source-id: adaf8356950594d50e6a99a17a862f757c3777db
2020-03-27 04:42:12 -07:00