Commit Graph

1211 Commits

Author SHA1 Message Date
Daniel Büchele
43157f974e Update docs to use package name as ID
Summary: We swtiched from using the name of the package as the ID which is used to identify a client plugin. These changes were not reflected correctly in our docs.

Reviewed By: jknoxville

Differential Revision: D14165439

fbshipit-source-id: 1cbb9c1723911f8fa4b7df19c631e6f260c81bd8
2019-02-21 09:39:54 -08:00
Aziz Murtazaev
0279fc919f Move android module's support lib references to AndroidX
Summary: SupportLib v28 -> AndroidX v1

Reviewed By: passy

Differential Revision: D14150032

fbshipit-source-id: f9c0d15a4f281fea78500e78275eb260e484e674
2019-02-21 09:26:07 -08:00
Pritesh Nandgaonkar
01ee57c601 Move fresco plugin to use redux store
Summary: This diff moves the state to PersistedState

Reviewed By: danielbuechele

Differential Revision: D14126419

fbshipit-source-id: aaf5f035ddc7e64ad2602ae4b80c9901a20df144
2019-02-21 07:16:12 -08:00
Pritesh Nandgaonkar
6ee8d72a1e Move Fresco plugin to oss directory
Summary: Moved the fresco plugin folder to open source directory

Reviewed By: passy

Differential Revision: D14126407

fbshipit-source-id: 15b2d1698e18b951742ec37ca94642e6511094b0
2019-02-21 07:16:11 -08:00
Pascal Hartig
aac9c40183 Open-source Fresco Android plugin
Summary: Let there be MIT!

Reviewed By: oprisnik

Differential Revision: D14150942

fbshipit-source-id: b907934e319d5ac7bd114a918fe79ca363724229
2019-02-21 03:30:02 -08:00
Pascal Hartig
e69306b34d Objecthelper
Summary:
Split off objecthelper into a (future) public and an fb-only version. This also open-sources the very first bit which is pretty useless on its own, but will already compile as its neatly stand-alone.

Note that this blocks releases until we have a stable version of Fresco to depend on.

Reviewed By: oprisnik

Differential Revision: D14149645

fbshipit-source-id: 0020d7ceccf89999695414ce389106ca6325ab7e
2019-02-21 03:30:02 -08:00
Daniel Büchele
13f7444013 electron update
Summary:
Started with upgrading electron from 3.0.0 to 4.0.5. This required a bunch of subsequent updates:
* upgrading `electron-builder` to latest version, because the old version couldn't build electron 4 apps.
  * `appDir` is deprecated in builder config, `projectDir` is used instead, which we already had set, so its fine to just remove this ([see GitHub commit](a5e457163e)).
* upgrading `jest-runner/electron` because the old version couldn't run electron 4 tests.
  * upgrading our custom dependency resolution to use electron 4.0.5, because the test runner still resolves to 2.0.8 ([see GitHub issue](https://github.com/facebook-atom/jest-electron-runner/issues/31)).
* updating `sandcastle.sh` to use the new cache files from D14131344.
* removing `package-lock.json` as is was causing warnings. We use `yarn` and `yarn.lock` anyways. This file must have been committed by accident.
* updating our check to only run one version of Flipper at a time to use the new electron API `app.requestSingleInstanceLock` as the old one was removed in electron 4.
* updating the snapshot test that checks App rendering, which changed a little due to the electron upgrade.
* upgrading flow-type definitions to `electron-v4.0.5.js` generated by [electron-flowtype-definitions](https://github.com/danielbuechele/electron-flowtype-definitions).

**PS: Best new feature in Electron 4: Copy&paste working in dev tools**

Reviewed By: jknoxville

Differential Revision: D14131360

fbshipit-source-id: d7ed9643875629a1fa1860bb61b11dd0c64112ab
2019-02-21 02:46:12 -08:00
Artur Pyrogovskyi
0a59dc2918 Added onSort and a fix for columnOrder to ManagedTable
Summary:
1. Added onSort() pass-through to ManagedTable which allows to handle sort order changes.

2. columnOrder now gets updated when the corresponding prop is changed indepedently from ref.

Reviewed By: danielbuechele

Differential Revision: D14147857

fbshipit-source-id: 03300629a3316a69be6b745810516966b8060aa6
2019-02-21 02:02:09 -08:00
Pascal Hartig
fa33764cc3 Flipper Bump: v0.16.3-SNAPSHOT
Summary: This release targets the support library and target SDK v28.

Reviewed By: muraziz

Differential Revision: D14151637

fbshipit-source-id: 5f32a98580558606aef17902e82a9d8061b99f48
2019-02-20 13:54:29 -08:00
Pascal Hartig
4871186a77 Flipper Release: v0.16.2
Summary: This release targets the support library and target SDK v28.

Reviewed By: muraziz

Differential Revision: D14151636

fbshipit-source-id: 70f4412dc0ccba3c77dda74dcf9b143782b90713
2019-02-20 13:54:29 -08:00
Pascal Hartig
0d185108a7 Bump to target SDK 28
Summary:
We need this to continue to build with Fresco and
in preparation of AndroidX.

Reviewed By: muraziz

Differential Revision: D14149811

fbshipit-source-id: dd227f85ead23b8412706905f8723b3c153b28b7
2019-02-20 13:54:29 -08:00
Pascal Hartig
3dbb201c2a Flipper Bump: v0.16.2-SNAPSHOT
Summary: Reenable snapshots.

Reviewed By: jknoxville

Differential Revision: D14150282

fbshipit-source-id: 5c1d9cd5dfcf48f2efd41ba610583a68d38e8cc6
2019-02-20 09:29:07 -08:00
Pascal Hartig
f043a3d4db Flipper Release: v0.16.1
Summary:
<Placeholder for v0.16.0 release notes>

Resubmitting as the previous release job stalled.

Reviewed By: jknoxville

Differential Revision: D14150283

fbshipit-source-id: 0357d37bf8c69accf898d2c4c81b89d0c16339c3
2019-02-20 09:29:07 -08:00
Daniel Büchele
6ada04bc38 ignore flipper-public/dist folder in build
Summary:
Builds in flipper-public are failing, because duplicate imports: https://our.intern.facebook.com/intern/sandcastle/job/22517998213713260

That's most likely because the `flipper-public` is not blacklisted in metro, so let's add it!

Reviewed By: passy

Differential Revision: D14134423

fbshipit-source-id: 52f87196957c8578b8ac7f578efa74e3c13fe1bb
2019-02-20 06:58:54 -08:00
Daniel Büchele
517262bbf2 fix version number
Summary: The electron stub is used by the headless version of Flipper. For that reason, the version number was always `1`. The headless version has a the actual version written to a global variable. So let's use it here.

Reviewed By: passy

Differential Revision: D14149692

fbshipit-source-id: c4781987fd3201e67897eaf31627b0bb2970ffcb
2019-02-20 06:42:21 -08:00
Daniel Büchele
6c0a534e15 fix logs
Summary:
Logs were not collected in headless mode, because there was no subscriber listening to the logs. Now they are always stored, even if there is no subscriber. Actually this makes more sense even for the desktop UI, as subscribers could subscribe later.
The only reason this was working on the desktop app was because the log plugin automatically subscribed on launch.

This brings us to the actual question: If a message is logged in a forest and no one is around to read it, is it actually logged? 🤯

Reviewed By: passy

Differential Revision: D14149691

fbshipit-source-id: 212f1b0a69bd0cc8ae0ba3592f29ca90b7a5a475
2019-02-20 06:42:21 -08:00
Pascal Hartig
d8d01b4a6f Remove global state for perf logger
Summary: Instead of installing some global mutable thing, pass it down. This also eliminates the rather gnarly side-effect of instantiating some visitor and suddenly logging information in an entirely different place.

Reviewed By: oprisnik

Differential Revision: D14131253

fbshipit-source-id: 760c6a3f85056e334ac1149c76ca4126fbfa7da4
2019-02-20 02:52:11 -08:00
Pascal Hartig
cf0003a87e Update perflogger package name
Summary:
Buck doesn't really care so the previous diff works out fine on
its own, but Android Studio is less forgiving.

Reviewed By: oprisnik

Differential Revision: D14131182

fbshipit-source-id: 0ad26e7c5f1e0776bdf07dda2f04bdf16183a5e8
2019-02-20 02:52:11 -08:00
Pascal Hartig
7f77dd1c1a Move logging interface out of QPL plugin
Summary:
This is generic enough, even though I strongly dislike the
installing mechanism, but that can be changed later.

Reviewed By: oprisnik

Differential Revision: D14131183

fbshipit-source-id: b75c1e1563ac9371cbc7d28b239c316a0aa1a9dd
2019-02-20 02:52:11 -08:00
John Knox
81e8b7982b Add date and time reminder to diagnostic screen
Summary: I got tripped up again with a physical iOS device that had the wrong date and time. SSL certs won't be valid. Adds a reminder to the diagnostic screen for anyone running into this in future.

Reviewed By: passy

Differential Revision: D14132411

fbshipit-source-id: 623120ef5252eae3e2fe0f6f653074f586f17e0e
2019-02-19 10:33:25 -08:00
John Knox
ce7287f08b Re-enable physical iOS device support in mobile SDK
Summary: Only usable with a desktop app that supports physical iOS devices, which isn't released yet.

Reviewed By: passy

Differential Revision: D14132413

fbshipit-source-id: 376d1db06e46ae06346974f2acc95c3d2ff6825d
2019-02-19 10:33:25 -08:00
John Knox
9c87dfe230 Only create CSR once per app invocation
Summary: The CSR has no need to change, don't recreate it every time we need it. Useful for the physical iOS case especially, because it connects to the portforwarder and keeps attempting to send a CSR.

Reviewed By: passy

Differential Revision: D14131617

fbshipit-source-id: 82a69d5aff813d77fa05dd13fc2441b784766d99
2019-02-19 10:33:25 -08:00
Pascal Hartig
b594fb7c76 Fix download caching
Summary:
Not sure why, but if we stick this in the build folder,
the artifacts get downloaded every single time despite `onlyIfNewer`.

Reviewed By: jknoxville

Differential Revision: D14132383

fbshipit-source-id: 464e4a6e474877c16a06a6e83ccd1a2e355cbea2
2019-02-19 09:06:19 -08:00
John Knox
6cd8e1519f Log start of payloads that are too big to send
Summary:
We've seen some crashes from toRSocketPayload, but aren't sure of the cause.
When we fail the DCHECK, there won't be any log output, so log before it if it's going to fail.

Reviewed By: passy

Differential Revision: D14131409

fbshipit-source-id: b71e043f0b5feac3d2e44a34cc38c72086f966ad
2019-02-19 08:50:30 -08:00
Pascal Hartig
4e295f3247 Add DebugMemoryManager interface
Summary:
Bit ugly, but allows us to use this interface in open-source
and internally. There's no buck target as we only need this
for Gradle.

Reviewed By: oprisnik

Differential Revision: D14132467

fbshipit-source-id: 998df6ce31f1fb7d00ea99d6d28759f7e2c800c3
2019-02-19 08:36:07 -08:00
Pascal Hartig
9e458379cf Flipper Bump: v0.16.1-SNAPSHOT
Summary: Snapshot.

Reviewed By: danielbuechele

Differential Revision: D14123168

fbshipit-source-id: 8be45d8218a6e63a28f5c74d9b40ae04c5e420dd
2019-02-19 07:21:44 -08:00
Pascal Hartig
625321a8bc Flipper Release: v0.16.0
Summary:
- The Layout inspector can now visualise Litho sections.

- Stop trimming log messages so white-space-sensitive outputs (like trees) are preserved (88cc299811).
- Upgrade Flow to 0.91 (09a93cd9e6).
- Fix a screen recording bug on Pixel devices (64c8163a01).
- Watch plugin files recursively (c6752110cf).

Reviewed By: danielbuechele

Differential Revision: D14123167

fbshipit-source-id: 30cfccf5cfd767348c396401c97596342a243880
2019-02-19 07:21:44 -08:00
Pritesh Nandgaonkar
92cc78c41d Handle the Logs when it is undefined
Summary: As per the title

Reviewed By: danielbuechele

Differential Revision: D14131195

fbshipit-source-id: 3b053c04e27de9faa8b8395bf4b0f6fe3d7c58dc
2019-02-19 05:33:43 -08:00
John Knox
6bdbb4f763 Wait 2s before checking for matching devices for connected clients
Summary:
Currently when a client connects, if there's no matching device we know of, it emits an error.

The problem is that there's a race between clients connecting and devices being detected, if the client connects first, then we'll emit this error, even though the device is displayed shortly afterwards.

Fixing this by waiting 2 seconds after a client connects, and then if it's still connected, checking for a matching device. This should be enough time to make this error more reliable.

Reviewed By: passy

Differential Revision: D14126315

fbshipit-source-id: c81b2c6d9a6e0639a656d1a4d7a8f999f715bfbf
2019-02-19 03:46:55 -08:00
John Knox
77c77b5eb3 Don't throw exceptions from FlipperStep destructor
Summary: Destructors should never throw, because if they are destructed while an exception is unwinding the stack the program will terminate.

Reviewed By: passy

Differential Revision: D14124423

fbshipit-source-id: 4b3d21663d44160bf24adacca25f50522d952e7c
2019-02-19 03:46:55 -08:00
Pascal Hartig
5a65393b64 Bump Litho dependency to 0.24.0
Summary: Per title. This unblocks the release.

Reviewed By: jknoxville

Differential Revision: D14124560

fbshipit-source-id: 4e9cf73b3598f894ebd60b6b15203f184b9a8381
2019-02-19 03:27:31 -08:00
Pascal Hartig
e53f8fa98d Provide clearer message about launcher delegation (#373)
Summary:
To make it more obvious how to disable this if unwanted (e.g. when
testing local builds).
Pull Request resolved: https://github.com/facebook/flipper/pull/373

Reviewed By: jknoxville

Differential Revision: D14130771

Pulled By: passy

fbshipit-source-id: 82c83c1ad14737c8c7791de71a1ee23fcea5ec18
2019-02-19 03:27:31 -08:00
Pritesh Nandgaonkar
5ad41b48ff Solves the bug which destroyed multi selection on ctrl+click
Summary: Soves the bug which caused the multiselection to clear off when one did ctrl+click

Reviewed By: jknoxville

Differential Revision: D14103906

fbshipit-source-id: 834d79e1c86a89b4d90c26e8db1850c1e8712a5d
2019-02-18 14:44:18 -08:00
Pritesh Nandgaonkar
cab61b0c15 Serialize and Deserialize helper function
Summary: This diff adds a helper function to serialize and deserialize javascript Objects

Reviewed By: danielbuechele

Differential Revision: D14101483

fbshipit-source-id: 3e1f37076ccc04b83cf7de5f10900e21e6474c1d
2019-02-18 14:44:18 -08:00
Daniel Büchele
8d134ba89e disable babel cache
Summary: as per title. see explanation in code comment

Reviewed By: jknoxville

Differential Revision: D14125820

fbshipit-source-id: 9b8e31214a65a184397852544cebd7b69ea0aadb
2019-02-18 12:49:34 -08:00
John Knox
f8ff6fe1b2 Catch all throwables in FlipperResponder destructor
Summary: Exceptions should never be thrown from destructors, because if an exception is already propogating at the time the destructor is called. Program will terminate.

Reviewed By: passy

Differential Revision: D14123526

fbshipit-source-id: 15ff74f4f14eb28a586055e1b1a5d54231b549da
2019-02-18 11:32:23 -08:00
Daniel Büchele
84240ede4e fix scrolling
Summary: "Plugin not showing" was scrolling with the sidebar. Fixed that.

Reviewed By: jknoxville

Differential Revision: D14123853

fbshipit-source-id: 12358bb3bd040701bafa080c2bcc27d8c837ea39
2019-02-18 07:22:59 -08:00
Daniel Büchele
9bf41f7bb7 add GK
Summary:
Users passing the GK `flipper_layout_inspector_new` will see then new layout inspector instead of the old one.

Hopefully users won't realize that they are on the new Layout Inspector. To make them aware of it, I added a bar on the bottom linking to the support group that is used for the GK.

Reviewed By: jknoxville

Differential Revision: D14100392

fbshipit-source-id: 78d561a3ab8ac035e5b439799c395901be086b1b
2019-02-18 05:17:52 -08:00
Daniel Büchele
a8a1869bc8 adding Searchbar
Summary: Adding the searchbar to layout inspector. Most of it's functionality is taken from the existing implementation.

Reviewed By: jknoxville

Differential Revision: D14100533

fbshipit-source-id: 6c3a49658d53c676489886b2599bef425f8f20d3
2019-02-18 05:17:52 -08:00
Daniel Büchele
649688db2a Sidebar
Summary:
This is mostly only moving the Sidebar from the old LayoutInspctor to a separate file. The old file was part of the UI component, however, it was super specific to the layout inspector, so I felt it makes sense moving it there.

Here is a diff between the new `src/plugins/layout/layout2/InspectorSidebar.js` and `src/ui/components/elements-inspector/sidebar.js`: P60951781

The old file is still kept around, as long as the old and new layout inspector are run side by side.

Reviewed By: passy

Differential Revision: D14100537

fbshipit-source-id: b5a6fbae9866732800bb9b2b8fb1b996b9861db6
2019-02-18 05:17:52 -08:00
Daniel Büchele
4f425b05b4 Alignment mode
Summary: Adding a toggle to enable/disable alignment mode

Reviewed By: jknoxville

Differential Revision: D14100534

fbshipit-source-id: e3a49f1f31112ca2c99c2246a12c4f34be1ec61a
2019-02-18 05:17:52 -08:00
Daniel Büchele
53f3f2d40f Target mode
Summary: Adding a toggle to enable/disable target mode

Reviewed By: jknoxville

Differential Revision: D14100535

fbshipit-source-id: 9251f2d2f9d3013650421be62719ad5fb254e804
2019-02-18 05:17:52 -08:00
Daniel Büchele
c21875e168 refactoring
Summary:
This is refactoring the layout inspector. The old layout inspector was a single file with more than 1200 LOC which was really hard to debug and extend. This aims for splitting it up into smaller, easier to maintain components.

This version of the layout inspector only shows the view hierarchy for the regular view tree and the a11y tree. Additional features are added in stacked diffs.

Reviewed By: jknoxville

Differential Revision: D14100536

fbshipit-source-id: ca5e22dbb6ed9e34ce208a2a699ebfeb083904ad
2019-02-18 05:17:52 -08:00
Daniel Büchele
b70a18cef2 ToolbarIcon component
Summary: Adding a ToolbarIcon component that displays an icon in the toolbar that can be toggled on and off. This is used in subsequent diffs.

Reviewed By: passy

Differential Revision: D14100393

fbshipit-source-id: d814b52cf77585c4e8d090e11399e005713efb5e
2019-02-18 05:17:51 -08:00
Jonathan Kim
13bdfedeb1 Codemod rest of xplat// -> fbsource//xplat
Differential Revision: D14057661

fbshipit-source-id: 7780ec117cbe5deb8cf9211b228b186bf97e1b1f
2019-02-16 23:59:40 -08:00
Pascal Hartig
ab6ebf665e Bump android gradle plugin (#372)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/372

Some prep for AndroidX upgrade.

Reviewed By: danielbuechele

Differential Revision: D14101014

fbshipit-source-id: 15571528340ea149be77985b3d194d832f253597
2019-02-15 08:54:10 -08:00
Daniel Büchele
c6752110cf watch recursive
Summary: Plugin files in subfolders were not watched. Adding recursive flag to reload plugins, even when there are changes in any of the plugin's subdirectories.

Reviewed By: jknoxville

Differential Revision: D14100394

fbshipit-source-id: 2a0b5e35df4bbbfe6cf8a0fafd5271222d99a46c
2019-02-15 06:31:31 -08:00
John Knox
d5dc3f9c2a Add timestamp columns to network inspector
Summary: Adds requestTimestamp, and responseTimestamp which is hidden by default.

Reviewed By: passy

Differential Revision: D14088403

fbshipit-source-id: c451a428d8068c5bfce199cda5502361c12d1667
2019-02-15 04:57:38 -08:00
John Knox
ee54a54ff2 Clean up log statement
Summary: Looks like a left over debug log

Reviewed By: danielbuechele

Differential Revision: D14086508

fbshipit-source-id: 6bf3ef40746d8d248ed38071107cae00ba3040f9
2019-02-15 04:32:43 -08:00
John Knox
d95e81b17d Deprecate client.send()
Summary:
Adds a warning when not in production and client.send() is used.

We could just delete it but there may be open source users of the API.

Reviewed By: passy

Differential Revision: D14085002

fbshipit-source-id: 39f965b59540bd5b7059ec8d6b1c274146699d2d
2019-02-14 09:55:50 -08:00