Commit Graph

1430 Commits

Author SHA1 Message Date
Daniel Büchele
565b8995ae requestIdleCallback node fallback
Summary: requestIdleCallback does not exist in node.js. In this case, we immediately invoke the callback.

Reviewed By: priteshrnandgaonkar

Differential Revision: D15556037

fbshipit-source-id: 62cee8544fabd4528d9df17109e882fa9db6585f
2019-05-30 08:24:17 -07:00
John Knox
bec5c2b20c Remove unused lodash dependency
Summary: This is a big dep, and wasn't even used. Removing.

Reviewed By: danielbuechele

Differential Revision: D15555949

fbshipit-source-id: 31a5430819592478b01548469fdbf58637c4de22
2019-05-30 08:19:19 -07:00
John Knox
cfbc84e5bc Add error bar
Summary: Red error bar at bottom when something goes wrong.

Reviewed By: danielbuechele

Differential Revision: D15536042

fbshipit-source-id: 6a20e22489f9346864b78f9102a0917f94c1c74f
2019-05-30 06:52:06 -07:00
John Knox
13e942f59a Add getStringFromErrorLike utility
Summary: I've found myself having to extract strings from things that *might* be Errors more than once. Centralising this so it's consistent and correct everywhere.

Reviewed By: danielbuechele

Differential Revision: D15536034

fbshipit-source-id: 8e054dd6122aff10f0aacdfaed65125df0aea99f
2019-05-30 04:02:39 -07:00
John Knox
076b52059e Fix index rendering
Summary: This hadn't been tested on any tables with indexes. It was using the wrong set of columns to index the rows. Fixed by using the right list.

Reviewed By: danielbuechele

Differential Revision: D15535864

fbshipit-source-id: 1842a0695715e947b7e28b59e65dcc1eb5b32695
2019-05-30 03:15:29 -07:00
John Knox
2221090037 Fix Select value/selected React warning
Summary:
React outputs the following error:
  Warning: Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.

This fixes it by using value instead of selected.

Reviewed By: danielbuechele

Differential Revision: D15535717

fbshipit-source-id: eb784ba2cdefe1c6744cc15592cd3e0191d237d0
2019-05-30 03:15:29 -07:00
John Knox
79902cd7cb Fix some react warnings
Summary: React is printing errors saying not to use "Span", and booleans in html properties

Reviewed By: danielbuechele

Differential Revision: D15535593

fbshipit-source-id: e074137c89abfa69625b370087c9c18b579ff279
2019-05-30 03:15:28 -07:00
Daniel Büchele
8c4e373dfc fix table context menu/drag-select
Summary:
As seen [here](https://fb.workplace.com/groups/230455004101832/permalink/623364598144202/?comment_id=623436418137020&comment_tracking=%7B%22tn%22%3A%22R%22%7D) using the primary key + CTRL to open the context menu, triggers the drag-select mode. This should not be the case. This diff changes the behaviour to:

- Not trigger the drag-select-mode, when openting the context menu using CTRL
- Select the current row, when performing a context click on it.

Reviewed By: jknoxville

Differential Revision: D15538057

fbshipit-source-id: d3d086c3d44618b2801e3a9b0646689c04fa32ff
2019-05-30 02:35:18 -07:00
Pritesh Nandgaonkar
c94c2c8455 Add list-devices option to list the available devices.
Summary: This diff adds an option of `--list-devices` which will list the currently active devices on the machine. It will be later used to select a device by passing an `id` as an argument.

Reviewed By: danielbuechele

Differential Revision: D15524250

fbshipit-source-id: 7a79ceb1e431a25adcb4e05bc0cb68407c527806
2019-05-29 09:54:38 -07:00
Daniel Büchele
53b852dbe6 fix undefined colors on litho components
Summary:
When a color was changed on a litho component, the changes were made, but the display in Flipper's layout sidebar always showed `rgba(0,0,0,0)` as a color. This was because reading the color failed for `ComparableColorDrawable` and it sent `0` as fallback value.

This diff adds an additional check if the value is an instance of `ComparableColorDrawable` and reads the color from it.

Reviewed By: passy

Differential Revision: D15469093

fbshipit-source-id: 7f1aaf1c4981815605aca5ba735fa09e80deaa42
2019-05-29 09:19:29 -07:00
John Knox
b78fb88dd7 Make 'Refresh' update database list
Summary: Previously it only reloaded the current page.

Reviewed By: danielbuechele

Differential Revision: D15535168

fbshipit-source-id: b8252c24ffa74fdf22b2d4b6d5b7f99b40db8e47
2019-05-29 08:49:22 -07:00
John Knox
592bd2671f Fix copy cell wrong cell bug
Summary:
It was relying on hash keys to be in order, which obviously won't work. Logs plugin, on "copy message" was copying a timestamp instead.
Fixed by using the columnOrder state instead.

Reviewed By: danielbuechele

Differential Revision: D15535281

fbshipit-source-id: 2d7db95c16cc4f75c0d9cf14806fcc80cc8e4bd9
2019-05-29 08:43:40 -07:00
Daniel Büchele
6aa3457fb4 track onMessage performance
Summary: Tracking the time of onMessage callback

Reviewed By: passy

Differential Revision: D15536546

fbshipit-source-id: 9e93c11555a0a045ef60355ec1d0c6ca7cd49cdd
2019-05-29 08:22:24 -07:00
Oleksii Dykan
cb79b3b9ba Fix layout plugin for CKFlexboxComponent and CKInsetComponent
Summary: Importing the extensions fixes the fact that responds to selector was returned false for `sonar_additionalDataOverride` selector

Reviewed By: priteshrnandgaonkar

Differential Revision: D15535414

fbshipit-source-id: ab465a1aab36cccd2129c5b0c29a7872dfd65015
2019-05-29 04:59:13 -07:00
Pascal Hartig
fd88e1d01c Bump Gradle plugin to 3.4.1
Summary:
This matches the latest stable Android Studio version which will loudly
complain unless you accept this modification.

Reviewed By: danielbuechele

Differential Revision: D15520117

fbshipit-source-id: 81301722d85cbcb07fc1b17b6ce7418d03103874
2019-05-29 03:34:20 -07:00
Pascal Hartig
915b140756 Flipper Bump: v0.21.1-SNAPSHOT
Summary: Back to snapshots.

Reviewed By: jknoxville

Differential Revision: D15518398

fbshipit-source-id: 2823118c160a137b43470a6d0910d76c86a6558e
2019-05-28 10:22:16 -07:00
Pascal Hartig
c8965d389d Flipper Release: v0.21.0
Summary:
# Highlights

- Revamped documentation! We redesigned https://fbflipper.com/ and hope you like it. We added new tutorials, feature pages and way too many things to list here.
- `no-op` package for Android makes it easier to (not) ship Flipper with production releases.
- "Copy as cURL" support for the network plugin (https://github.com/facebook/flipper/pull/415)

Reviewed By: danielbuechele

Differential Revision: D15518400

fbshipit-source-id: 041cc546f4bfd70b13d9bb25eaa6eecf5dc1d7f9
2019-05-28 10:22:16 -07:00
John Knox
a630b50a8f Add databases plugin v0 (android) (#441)
Summary:
Adds a plugin for listing the databases, tables and contents of those tables in an android app.
Right now, works with sqlite, but it should be generic enough to work with other db types.

## Changelog

Add initial version of android databases plugin

Creating a PR, I may need to do some cleaning up, but this is to kick off that process.
Pull Request resolved: https://github.com/facebook/flipper/pull/441

Reviewed By: danielbuechele

Differential Revision: D15288831

Pulled By: jknoxville

fbshipit-source-id: 6379ad60d640ea6b0a9473acc03dd6ea81a3a8d4
2019-05-28 10:17:56 -07:00
Pascal Hartig
f20a781bca Bump Litho to 0.26.1
Summary: Includes the new Drawable getter.

Reviewed By: danielbuechele

Differential Revision: D15517152

fbshipit-source-id: 9977cc788771ec738c2eafc55b725fda4bea5bf0
2019-05-28 09:49:18 -07:00
Pascal Hartig
64048c69ac Bump to latest Litho version
Summary: v0.26.0

Reviewed By: jknoxville

Differential Revision: D15516278

fbshipit-source-id: de84bae13b5313403c1dd18b4bf744c60a6f341e
2019-05-28 09:49:18 -07:00
Daniel Büchele
b4f96ae5d9 copy version number to clipboard
Summary: People often want to share Flipper's verison number in bug reports, etc. This makes it as easy as a single click to copy the version number.

Reviewed By: jknoxville

Differential Revision: D15516592

fbshipit-source-id: 72582e2acb23113b3a0af062a83d444031f058d6
2019-05-28 07:40:25 -07:00
John Knox
e1aa6c4cd8 Distinguish between failures and things that we knowingly dont support
Summary:
A lot of the failures in the dashboard are due to unsupported android devices.

We can track this individually, but it shouldn't be affecting how reliable we think things are.

This adds an Error type, that when thrown, adds an extra field to log messages to specify that it's a known incompatibility.

Reviewed By: passy

Differential Revision: D15394863

fbshipit-source-id: 9d7948fbb8c94bd7a64434496e10392532a61eed
2019-05-28 04:22:09 -07:00
John Knox
a64a2a31e5 Fix plugin success rate logging
Summary:
I noticed that during a refactor, plugin success-rate failures started getting reported as successes.
Thankfully it's only the plugin metrics that are affected.

Reviewed By: passy

Differential Revision: D15394864

fbshipit-source-id: d9f44a0dd61f68dcdcbf2eb524821a3eb023231b
2019-05-28 04:22:08 -07:00
John Knox
79a4c3a163 Explicit no devices found error
Summary: Distinguish between the cases when there's something wrong with listing devices and we don't see any, and when we do see some but none of them match what we're expecting.

Reviewed By: passy

Differential Revision: D15394042

fbshipit-source-id: 02728671d46531aec37da4bcafb85393269bf9cb
2019-05-28 04:22:08 -07:00
Daniel Büchele
1d6399c1b5 remove console from layout inspector
Summary: We removed the console already from the client side. So this causes all calls to isConsoleEnabled to fail. This diffs removes these calls.

Reviewed By: passy

Differential Revision: D15449571

fbshipit-source-id: b702a8fbc80af002e1d8b7d37d5acc664ea5be99
2019-05-24 03:29:41 -07:00
Daniel Büchele
c1bff77f50 recursively invalidate nodes
Summary: When a node invalidates, all its children need to be updated. This was the case in v1 of Layout Inspector (3141b954bf/src/plugins/layout/index.js (L684-L692)) but got lost when writing v2.

Reviewed By: passy

Differential Revision: D15469096

fbshipit-source-id: 9ef5368387ccbce6e5c71de28c24f5790906cee9
2019-05-24 03:09:53 -07:00
Daniel Büchele
dd2d309c0c handle messages in idleCallback
Summary: When receiving a message from the device, the parsing and updating is now handled in an idleCallback, with a timeout of 500ms.

Reviewed By: passy

Differential Revision: D15469094

fbshipit-source-id: c3fc70c2f082930a1a0a01078732cfd45297c391
2019-05-24 03:09:53 -07:00
Sidharth Guglani
0d769aa1c2 using object tracking and creating flipper objects for debug components
Summary: Using ObjectTracker to track debug component nodes and creating flipper objects with debug component data

Reviewed By: davidaurelio

Differential Revision: D15462076

fbshipit-source-id: 5d0b28b6aea4729b85cc9de9ab35f2a07edbae1c
2019-05-23 20:41:20 -07:00
Pritesh Nandgaonkar
914cbf6ccd Request all metadata for Images plugin before export
Summary:
Fresco plugin on the desktop side used to ask for all the image list along with the metadata when it was mounted. The mobile side never sent the image list and other information if not requested from it. That means, although Fresco plugin is a background plugin, there weren't any messages sent from the mobile side. Thus there was no trace available for Images plugin when the trace was exported. This diff, adds a hook which gets called before the export, where we request all the metadata from the mobile SDK.

BUG:

{F159305887}

Reviewed By: passy

Differential Revision: D15407962

fbshipit-source-id: 0012de2ab29d0f62e92d00f4926b04b1e394b62a
2019-05-23 05:48:04 -07:00
Pritesh Nandgaonkar
7576e1c61d Fix watch tab bug
Summary:
This solves the watch tab crash discussed here D15266478, which got reverted.

Bug: [Here](diffusion/FBS/browse/master/xplat/sonar/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.mm;57c596a566bec49e343af51b93df65ed1377a2b9$338), when the node is `CKComponentRootView` the `[descriptor childForNode: node atIndex: i]` returns `SKComponentLayoutWrapper`. In the next iteration of the loop, node is `SKComponentLayoutWrapper`, the  `[descriptor childForNode: node atIndex: i]` returns `CKComponentRootView`, and hence the infinite recursion

I also tested T44431259, it is not regressed.

Reviewed By: passy

Differential Revision: D15451821

fbshipit-source-id: 25f10112f5f52bb1fa964316a4c7e91a3b29156d
2019-05-23 03:50:11 -07:00
Pritesh Nandgaonkar
2c024a4488 Call exportPersistedState only for clients of a selected device
Summary:
Call `exportPersistedState` only for the clients of selectedDevice. This will fasten up our export, we do not need to call `exportPersistedState` for the clients of nonSelectedDevice.

{F159322777}

Reviewed By: passy

Differential Revision: D15440652

fbshipit-source-id: e018603cfeb56fec462b54a6897fb254cc361390
2019-05-22 03:47:27 -07:00
Pritesh Nandgaonkar
0a514c3618 Back out "[Flipper] Use the tree node idenitifer as the component identifier"
Summary:
Original commit changeset: 4d83c1bee3fd

BUG:

{F159187385}

Reviewed By: passy

Differential Revision: D15415247

fbshipit-source-id: 6209a2c9c2b5da6b9405bf01e3cb7622b3431475
2019-05-20 09:46:50 -07:00
Daniel Büchele
7f99a5cfe2 remove crash
Summary: fixing flipper crash on launch

Reviewed By: priteshrnandgaonkar

Differential Revision: D15412629

fbshipit-source-id: e74ee0a60ac10999438da5a888732e42a0ffccc8
2019-05-20 04:47:11 -07:00
Pritesh Nandgaonkar
c7f3e4e588 Exports Wasted bytes metric for Images Plugins
Summary: Exports the `WASTED_BYTES` metric for the Images plugin. Currently its not possible to export the trace for Images Plugin, as all its listeners are setup in the init function of the component. Also it follows "pull" strategy, i.e Flipper asks for the data at component initialization. I will work on asking for the Fresco data when we terminate the headless, just like Layout Plugin.

Reviewed By: oprisnik

Differential Revision: D15393752

fbshipit-source-id: 4f0717ac5fb70a82aab5c803a4f92708d1faa9df
2019-05-20 02:44:09 -07:00
Jonathan Ballerano
bcc05296ef Back out "Fix the crash in the watch tab"
Summary: This resolves a crash related to the contents of certain CKComponents, which was apparently introduced by D15266478

Differential Revision: D15406260

fbshipit-source-id: efd1ad1a1bcb41451c56b74c240ad2dca069deb0
2019-05-17 22:42:35 -07:00
John Knox
7823389081 Enforce android command escaping with flow
Summary: Splits the utility into a public and private part - just for the opaque types to work. The private part validates arguments and does the command running. Both are safe to use, but the non-internal one is easier, you don't have to validate anything.

Reviewed By: passy

Differential Revision: D15393477

fbshipit-source-id: 92f63180fb94af4337fdf8c7dace5bc5a85d5a54
2019-05-17 09:53:37 -07:00
John Knox
d238a958ec Extract execute and push to androidUtil
Summary: This commit doesn't change anything, just moves the android command running stuff into its own utility.

Reviewed By: passy

Differential Revision: D15393476

fbshipit-source-id: de93bbd88fa62bddff8d9ea56cfbc33bfd854d53
2019-05-17 09:53:36 -07:00
John Knox
841d5d57a2 Enable desktop crash reporting
Summary: Sends native crash reports for production internal builds.

Reviewed By: passy

Differential Revision: D15391757

fbshipit-source-id: a4149c2a264eb5ef38fb6f1cc43d52361ac83748
2019-05-17 06:45:05 -07:00
John Knox
d85a357428 Fix columnSize prop
Summary: I added column size persistence when resizing manually, but broke initial column sizing when a prop is provided. This fixes it.

Reviewed By: passy

Differential Revision: D15392145

fbshipit-source-id: 53f79c520917cd571302502c8b75aa0475567cb9
2019-05-17 06:30:28 -07:00
Pritesh Nandgaonkar
89ebb11520 Accept Trace file and export a metric
Summary: This diff adds support to pass a path to the trace file to the headless Flipper. The headless Flipper then exports the metrics out of it.

Reviewed By: passy

Differential Revision: D15337067

fbshipit-source-id: 61aca1ffd58e879dafe6aa176f058f7b11460952
2019-05-17 03:13:48 -07:00
Pascal Hartig
b8f3729752 Update Mac binary
Summary: Checking in a new binary pre-compiled for MacOS.

Reviewed By: jknoxville

Differential Revision: D15374540

fbshipit-source-id: a69e6f497a8c8b9f08144e1482450ff43b85f5da
2019-05-17 02:36:18 -07:00
Pascal Hartig
704634768f Update bump binary for Linux
Summary: This is the one used on sandcastle, built statically.

Reviewed By: jknoxville

Differential Revision: D15374415

fbshipit-source-id: 7b200e8630ce0a3a336cc46df26df367ed712fa1
2019-05-17 02:36:18 -07:00
Pascal Hartig
85f06c53eb Bump noop versions
Summary:
When running bump, also update the docs references to the noop package.

Will update binaries in subsequent diffs.

Reviewed By: jknoxville

Differential Revision: D15374370

fbshipit-source-id: 5558d33a91dc5e690f5754891b2e5aa29385646a
2019-05-17 02:36:17 -07:00
Pritesh Nandgaonkar
2ec6f14759 Flipper Bump: v0.20.4-SNAPSHOT
Summary: Making a release to test the automated pods publishing. The last one failed, due to the wierd Sandcastle bug

Reviewed By: passy

Differential Revision: D15373866

fbshipit-source-id: 644bf24e28d712c40a053623fc2b80bf6b011fde
2019-05-16 10:05:24 -07:00
Pritesh Nandgaonkar
c08032cc51 Flipper Release: v0.20.3
Summary: Making a release to test the automated pods publishing. The last one failed, due to the wierd Sandcastle bug

Reviewed By: passy

Differential Revision: D15373868

fbshipit-source-id: a4e0eb0720f634c5667304f84b0fdaf26060d563
2019-05-16 10:05:24 -07:00
Pascal Hartig
2aabfd98e4 Update search-and-filter.md (#449)
Summary:
Fix some minor typos.
Pull Request resolved: https://github.com/facebook/flipper/pull/449

Reviewed By: danielbuechele

Differential Revision: D15371603

Pulled By: passy

fbshipit-source-id: a64a64039a9275d9b8fce82cb06cec0627bb9af8
2019-05-16 04:22:16 -07:00
Pritesh Nandgaonkar
94231670f8 Commit Tutorial xcodeproj (#448)
Summary:
Commits the Tutorial Xcodproj. It was being ignored by .gitignore
## Changelog
Pull Request resolved: https://github.com/facebook/flipper/pull/448

Reviewed By: passy

Differential Revision: D15358598

Pulled By: priteshrnandgaonkar

fbshipit-source-id: ca6c16205ba7b5f66acb5545f468fb885806496d
2019-05-16 04:07:26 -07:00
Pritesh Nandgaonkar
d7d455191c Flipper Bump: v0.20.3-SNAPSHOT
Summary: Want to make a release to test out the automated release of pods to cocoapods.

Reviewed By: jknoxville

Differential Revision: D15358712

fbshipit-source-id: 9430b7d2f16e3a2df498cc2359bbef7e7d1a3f18
2019-05-16 03:41:55 -07:00
Pritesh Nandgaonkar
a149feb768 Flipper Release: v0.20.2
Summary: Want to make a release to test out the automated release of pods to cocoapods.

Reviewed By: jknoxville

Differential Revision: D15358714

fbshipit-source-id: 08971164cb7c4a27646f3614669ae7cb9e4d6265
2019-05-16 03:41:55 -07:00
Pascal Hartig
3747b15d7b Update styling-components.md (#447)
Summary:
Link to color definitions.
Pull Request resolved: https://github.com/facebook/flipper/pull/447

Reviewed By: danielbuechele

Differential Revision: D15353434

Pulled By: passy

fbshipit-source-id: e1a15ae4979956f2b0529ee86e0a523a93d77006
2019-05-16 02:42:37 -07:00