Commit Graph

444 Commits

Author SHA1 Message Date
Pascal Hartig
474a36c0e2 Set up automatic release publishing (#266)
Summary:
On tags, build and publish artifacts to bintray. The encrypted accounted creds are for a `flipperfbbot` account on Bintray I created for this.
Pull Request resolved: https://github.com/facebook/flipper/pull/266

Reviewed By: priteshrnandgaonkar

Differential Revision: D9848181

Pulled By: passy

fbshipit-source-id: cf9150b2352a9ce972c48533ce15e8e75aa908fe
2018-09-17 01:57:48 -07:00
Pritesh Nandgaonkar
0ac03b74cc Flipper Release: v0.7.1
Summary: Flipper Release: v0.7.1

Reviewed By: jknoxville

Differential Revision: D9829332

fbshipit-source-id: fb8099a16d6bc3e68be7d0e69fdeb69281492ea6
2018-09-14 05:41:58 -07:00
John Knox
29a66f3605 Enable secondary page navigation
Summary: Allows for easier navigation through pages with multiple sections.

Reviewed By: danielbuechele

Differential Revision: D9811408

fbshipit-source-id: f47ad9d650dd4bd79710f64e4bb4485f3d4c4323
2018-09-14 05:01:51 -07:00
John Knox
01dc8ed6fd Add troubleshooting page
Summary: Adds a bunch of steps to take if you're having trouble.

Reviewed By: danielbuechele

Differential Revision: D9811295

fbshipit-source-id: 6802108e98850ab11764081491a528eb939d2224
2018-09-14 05:01:51 -07:00
Pascal Hartig
fc653d8057 Export init function
Summary: This way we can mock it during tests.

Reviewed By: jknoxville

Differential Revision: D9788349

fbshipit-source-id: 55b2a61186e6294a8098db7add50fd8bbac7a680
2018-09-13 08:58:03 -07:00
Pascal Hartig
5e0271cfc3 Add SVG mascot exports
Summary:
It's easier to find when they're in the repo. Exported them
from the AI template.

Reviewed By: priteshrnandgaonkar

Differential Revision: D9789825

fbshipit-source-id: ca717d130495842dcab4d06e02986d3df598dbe6
2018-09-13 08:58:03 -07:00
Pritesh Nandgaonkar
9a16d9cbad Update rsocket version
Summary: Updates rsocket version

Reviewed By: passy

Differential Revision: D9769468

fbshipit-source-id: b822e697446b1464b63206869726e0e086438134
2018-09-13 03:12:35 -07:00
Pritesh Nandgaonkar
27cbf7f995 Flipper Release: v0.7.0
Summary: New release

Reviewed By: passy

Differential Revision: D9789625

fbshipit-source-id: 799206eafa0db54bdcb67de3854dba395326de7c
2018-09-12 09:13:35 -07:00
Pritesh Nandgaonkar
41d5efeeec chmod script
Summary: Fixes chmod and mac os script error and also tests if jq is installed

Reviewed By: passy

Differential Revision: D9789391

fbshipit-source-id: 11319539d4f511294f216860497bf0e67ee1af08
2018-09-12 09:13:35 -07:00
Pascal Hartig
20748876a9 Prepare React imports for Jest
Summary:
Not sure if it's Metro or something else providing these globally,
but it makes Jest unhappy if they're missing.

Reviewed By: danielbuechele

Differential Revision: D9788350

fbshipit-source-id: 5fabad7af146bcb705471d2c7e66d79265c81c82
2018-09-12 07:59:46 -07:00
Pascal Hartig
38bcb75d9b Document Litho integration
Summary: Per title.

Reviewed By: danielbuechele

Differential Revision: D9769482

fbshipit-source-id: d8c0b1dc4c6f6ed5bd5709d7abf209ff51cb8854
2018-09-11 09:59:14 -07:00
Pascal Hartig
c495c53cd4 Fix sample app build
Summary:
Two fixes included in this one. The debug flag is obvious, the annotations
less so. I'll try and find the right place to document this, but the reason
we need this here is because we reflect on `Prop.class`, so these need to be
available at runtime.

Reviewed By: jknoxville

Differential Revision: D9766713

fbshipit-source-id: 269b5a60c0df644f4fda0ea289ef9dc392ee352b
2018-09-11 07:57:16 -07:00
John Knox
6f1e011a8b Don't use vendorID as deviceId
Summary:
Device Id needs to be the same for multiple apps on the same device. This isn't true for this attribute, which is specific to the vendor of the app.
Apple has deprecated the API that gives you the device Id, so we can't discover it in the SDK alone.

However, this isn't a problem because we have a similar issue on android, and now Flipper desktop gives each device it's own deviceId during certificate exchange.
Removing this incorrect one so it's never used as a fallback, which would cause flipper to think the app is on a different device than the one it's running on.

Reviewed By: danielbuechele

Differential Revision: D9700552

fbshipit-source-id: 5467f6cb7d1f941af9df09fc6a03dbe34e6575e5
2018-09-11 07:57:16 -07:00
Daniel Büchele
3b6526eb07 create .flipper folder
Summary: When no config folder exists, a folder named `.sonar` was created. Instead `.flipper` should be created.

Reviewed By: hning

Differential Revision: D9754717

fbshipit-source-id: 89a7f5c80a9202f448a6bafcf461c941b656c15e
2018-09-11 07:28:31 -07:00
Pritesh Nandgaonkar
ea840e230e Update Folly version
Summary: Updated Folly version for android

Reviewed By: passy

Differential Revision: D9754662

fbshipit-source-id: 487a2cab4114e42672a431edfdfbe79bdb412076
2018-09-11 04:43:24 -07:00
Pritesh Nandgaonkar
39c933afc5 Consolidated bump script
Summary: Updated script to update version numbers for android and package.json

Reviewed By: passy

Differential Revision: D9700848

fbshipit-source-id: 00fd63ff1ed215cc92e7808c70107de45249aa83
2018-09-09 14:13:20 -07:00
Sara Valderrama
73759e71db add litho accessibility rendering to Flipper accessibility mode [1/2]
Summary:
Litho renders differently based on whether applicable accessibility services are enabled. In Flipper's accessibility mode this will be forced (with the option to turn it off) so that you don't have to be running an accessibility service to actually see what someone running an accessibility service would.

Here's an example video of what the re-rendering does (this also happens on toggle of accessibility mode, this is just the settings option to force it):

{F137856647}

Reviewed By: jknoxville

Differential Revision: D9667222

fbshipit-source-id: 292353d89f07734f1e525f795b1d7daf4130e203
2018-09-07 14:58:00 -07:00
Pascal Hartig
07650d0627 Remove unused fixmes
Summary: Looks like some flow-disables were no longer necessary.

Reviewed By: jknoxville

Differential Revision: D9700398

fbshipit-source-id: 5514c16294624c1bed1d3818f9e271b07e320803
2018-09-07 06:12:18 -07:00
John Knox
869c785c71 Store empty connection_config in legacy CSR requests
Summary:
Versions of flipper from before 7th August 2018 don't return any response, so we don't store any connection_config.json file.
To keep the functionality the same as with up-to-date app versions, when this happens, store an empty config file ("{}").

Reviewed By: danielbuechele

Differential Revision: D9682885

fbshipit-source-id: fd580f6bba6b6b20135aa2c076be10e1eea0f8bc
2018-09-06 10:13:25 -07:00
John Knox
d16fd8cfae Handle json parse failures
Summary: Loading the deviceId is not critical, so if it ever fails, we can live with that by swallowing the exception and using the default (possibly 'unknown' deviceId).

Reviewed By: danielbuechele

Differential Revision: D9682886

fbshipit-source-id: e5d60dd262fce683dd444167edd1475e0c029759
2018-09-06 10:13:25 -07:00
John Knox
9cfb461a9a Collect server logs in bug reports
Summary: Not collecting all debug logs because there are so many, but server ones are few and usually important for context on what's connected at the time.

Reviewed By: danielbuechele

Differential Revision: D9654402

fbshipit-source-id: 5ad090838be3e06c25bd93e4d85726822bd7fc4e
2018-09-06 06:57:46 -07:00
Pascal Hartig
42ce5d992a Add docusaurus note to README
Summary:
Took me a moment to figure out how to build it,
so let's add it to the docs.

Reviewed By: jknoxville

Differential Revision: D9654631

fbshipit-source-id: 32ee6e647d9fa85b921d19919c1bbd060615bb8e
2018-09-05 08:13:31 -07:00
Pascal Hartig
36975a5d8e Add getting-started section about snapshots
Summary:
Mention the snapshot releases we now publish and how
to use them.

Reviewed By: jknoxville

Differential Revision: D9654559

fbshipit-source-id: 0b4721a29f93d92a27cc1833bfc98b5642461d94
2018-09-05 08:13:31 -07:00
Pascal Hartig
9bb898c846 Add language indicator to code guards
Summary: Just to help out the markdown renderer.

Reviewed By: jknoxville

Differential Revision: D9654370

fbshipit-source-id: bde7afa290a735b77a093221b33a6ca8e12599fc
2018-09-05 08:13:31 -07:00
Sara Valderrama
d26779cd16 Update Tooltip implementation for Flipper
Summary:
Basic tooltips available. Use is:

  <Tooltip
     title="This is what will show up inside the tooltip"
     options={{ // can include any or none of these (if not included default will be used)
        position, // 'above', 'below', 'toRight', or 'toLeft'
        showTail, // whether or not tooltip should have tail
        delay, // how long to wait on hover before showing tooltip
        // supported css properties
        backgroundColor,
        color,
        maxWidth,
        width,
        borderRadius,
        padding,
        lineHeight,
     }}>
     <ElementTooltipWillShowUpFor/>
  </Tooltip>

Reviewed By: danielbuechele

Differential Revision: D9596287

fbshipit-source-id: 233b1ad01b96264bbc1f62f3798e3d69d1ab4bae
2018-09-04 10:44:12 -07:00
Pascal Hartig
cf3cb0d08f Use CircleCI for SNAPSHOT deployment (#260)
Summary:
Per title. It actually works!
Pull Request resolved: https://github.com/facebook/flipper/pull/260

Reviewed By: jknoxville

Differential Revision: D9633320

Pulled By: passy

fbshipit-source-id: 10ee856977fa0a337972a472d41eb7a83075c39b
2018-09-04 04:28:20 -07:00
John Knox
9939a9e3bb Factor out SONAR_LOG
Reviewed By: passy

Differential Revision: D9555739

fbshipit-source-id: 022763ea03047e1c4cd88d5f389b66be4cbe416b
2018-09-03 11:12:28 -07:00
John Knox
243b4207e7 Change string macros to static constexpr
Summary: There's no need for these to be macros.

Reviewed By: priteshrnandgaonkar

Differential Revision: D9555471

fbshipit-source-id: a78d6cdb4ceb1830f749eda50e0e07ebc55723bf
2018-09-03 11:12:28 -07:00
John Knox
afea2f63ec Extract file system interaction from SonarWebSocketImpl
Summary:
SonarWebSocketImpl has got pretty bloated. So I'm extracting all the file interaction out of it into
ConnectionContextStore. The purpose of this class is to provide all the context needed to establish a connection.
This makes SonarWebSocketImpl more functional and therefore testable.

Reviewed By: priteshrnandgaonkar

Differential Revision: D9540089

fbshipit-source-id: 0cd1d69f2b11eaf9f569245a2da14f85cc140427
2018-09-03 11:12:28 -07:00
John Knox
a5af72a169 Reject null event base arguments
Summary:
If you use a null eventbase, folly implicitly decides which one to run the futures in, for example
the timekeeper thread.
The only component that passes in event bases is sonar.cpp.

Reviewed By: priteshrnandgaonkar

Differential Revision: D9539443

fbshipit-source-id: 7fd7289257c84b039a7ac00b14f78bb271262480
2018-09-03 11:12:28 -07:00
Ullrich Schäfer
661d5a8f5b Enabling fullscreen mode on macos (#259)
Summary:
I wanted to use Flipper/Sonar in a fullscreen/split screen environment end was surprised the feature was disabled. When I checked the blame it looks like it's been like this from the get go, so there might not even be a real reason to have it disabled. Please correct me if I'm wrong.

The default value for `fullsreenable` is true. Removing setting the
parameter reenables the feature.

- Flipped the switch, saw it go fullscreen
- Also works in split screens
Pull Request resolved: https://github.com/facebook/flipper/pull/259

Reviewed By: danielbuechele

Differential Revision: D9630068

Pulled By: passy

fbshipit-source-id: 650e54895dc596090e2edcf2802bb0020f207ecc
2018-09-03 07:57:16 -07:00
Pascal Hartig
dc05fde28d Add version bumping script for Android
Summary:
Adding binaries and source as build times can be a bit long.

```
$ ./bump.sh
Flipper Version Bumper

Usage: bump.lnx64 VERSION

Available options:
  -h,--help                Show this help text
  VERSION                  Version to bump to, e.g. 1.0.2
```

```
$ ./bump.sh 1.0.2
Starting bump to Version "1.0.2".
Updating version in FilePath "/home/realpassy/local/fbsource/xplat/sonar/gradle.properties"
Updating version in FilePath "/home/realpassy/local/fbsource/xplat/sonar/docs/getting-started.md"
Done!
```

```
$ hg diff
 diff --git a/xplat/sonar/docs/getting-started.md b/xplat/sonar/docs/getting-started.md
 --- a/xplat/sonar/docs/getting-started.md
+++ b/xplat/sonar/docs/getting-started.md
@@ -44,7 +44,7 @@
 }

 dependencies {
-  debugImplementation 'com.facebook.flipper:flipper:0.6.18'
+  debugImplementation 'com.facebook.flipper:flipper:1.0.2'
 }

 diff --git a/xplat/sonar/gradle.properties b/xplat/sonar/gradle.properties
 --- a/xplat/sonar/gradle.properties
+++ b/xplat/sonar/gradle.properties
@@ -1,5 +1,5 @@
 # POM publishing constants
-VERSION_NAME=0.6.19-SNAPSHOT
+VERSION_NAME=1.0.2
 GROUP=com.facebook.flipper
 POM_URL=https://github.com/facebook/flipper
 POM_SCM_URL=https://github.com/facebook/flipper.git

```

Reviewed By: danielbuechele

Differential Revision: D9629787

fbshipit-source-id: b11870236809daa393dcef7eaf98ba9018ad7154
2018-09-03 07:57:15 -07:00
Pascal Hartig
a26cc6db9b Initial setup for CircleCI (#257)
Summary:
This is so much faster! This should allow us to more easily publish snapshots.
Pull Request resolved: https://github.com/facebook/flipper/pull/257

Reviewed By: danielbuechele

Differential Revision: D9630067

Pulled By: passy

fbshipit-source-id: 64c633933a971cc15371d2ee90c184e13b98e06a
2018-09-03 07:43:52 -07:00
Daniel Büchele
afdc846a8b log listener
Summary:
The logs plugin opened a new log connection every time it was activated and never closed the connection.

This is now changed. Once a device is connected, a log connection is opened. The logs plugin subscribes and unsubscribes to this connection. This allows the logs plugin it even access the logs from when it was not activated and ensures to only open on connection to read the logs. Logs are persisted when switching away from the plugin.

Also removes the spinner from the logs plugin, as it loads much faster now.

Reviewed By: jknoxville

Differential Revision: D9613054

fbshipit-source-id: e37ea56c563450e7fc4e3c85a015292be1f2dbfc
2018-08-31 10:13:06 -07:00
Daniel Büchele
a30e0b53e9 faster iOS device connection
Summary:
First connection attempt to iOS device was only made after 3000ms. This caused all iOS devices only show up after this delay.
Now, the devices are queried immediately.

Reviewed By: passy

Differential Revision: D9613057

fbshipit-source-id: a14e3f02576ec5e159f4002bf68efe53236dcc50
2018-08-31 10:13:06 -07:00
Daniel Büchele
ace800ad55 fix log counter
Summary: Log counter had a bug that only allowed the number to go up to 2. To increment the number of the last row is read and increased. However, this failed and always fall back to 1.

Reviewed By: passy

Differential Revision: D9613056

fbshipit-source-id: dc73990eb26c7a6ecbc70b0fe50687607b8bf0ad
2018-08-31 10:13:06 -07:00
Daniel Büchele
64ff6eb9cf iOS logs
Summary:
- Cleans up iOS log listener code
- Retries to create a connection to the log stream if it failed
- logs errors with the log parser

Reviewed By: jknoxville

Differential Revision: D9613055

fbshipit-source-id: 33a24e474be62fc2a906f022a68547594f2e66c1
2018-08-31 10:13:05 -07:00
John Knox
0f08b04571 Filter displayed plugins by selected device
Summary: Now that android devices know their own serial, we can filter plugins by the selected device.

Reviewed By: passy

Differential Revision: D9481461

fbshipit-source-id: 4a53eea1e61caa09c3d63ca0076fbc1b6dceb99f
2018-08-31 08:12:57 -07:00
John Knox
edff177c3f Give serial to the device during cert exchange so it can provide it whenever it connects
Summary:
Android devices don't always know their own serial.
But we do a certificate exchange using adb from the desktop, so we can provide it in the response.

After this the client will provide it every time it connects, so we can do things like filter plugins by device id.

For apps that have already done cert exchange, they'll continue to use 'unknown' as their id until they do it again with an up to date version of sonar.
We can think about forcefully stopping that, but I haven't done it.

Reviewed By: danielbuechele

Differential Revision: D9481460

fbshipit-source-id: f8932699711ebbec4260fabe32f87e6cdff920f2
2018-08-31 08:12:56 -07:00
Pascal Hartig
94e22508ae Limit Travis run
Summary:
Right now, Travis is failing consistently because the Android build
time exceeds its limits - that's separate from the new publish step.

Let's limit what we do in the build step.

Reviewed By: jknoxville

Differential Revision: D9613247

fbshipit-source-id: f703237788f3a35d3f15fc8b9b45d6ebbb24c750
2018-08-31 07:57:13 -07:00
Pascal Hartig
de58ddcabb Revert D9602056: [flipper] Limit output in Travis
Differential Revision:
D9602056

Original commit changeset: 0b725f169a40

fbshipit-source-id: 5b5febed414744178764a6e9d1347d84ff39d8f6
2018-08-31 03:27:52 -07:00
Daniel Büchele
d14def44f1 fix table arrow navigation
Summary: Check for `highlightableRows` was wrong.

Reviewed By: passy

Differential Revision: D9602101

fbshipit-source-id: dbab5efb0c2d71c1a2a018bf035f39d2539f5595
2018-08-31 03:12:22 -07:00
Pascal Hartig
3b456fad3e Limit output in Travis
Summary: Logs often get cut off because there's too much noise.

Reviewed By: danielbuechele

Differential Revision: D9602056

fbshipit-source-id: 0b725f169a40c153835f63342e38f5d15556ac98
2018-08-31 02:43:54 -07:00
Pascal Hartig
5a970fde0d Encrypt secrets with openssl-1.0.1f
Summary:
Not encrypted with any OpenSSL version or LibreSSL, but with OpenSSL version one dot oh dot one eff.
Backwards-compatibility is hard.

Reviewed By: danielbuechele

Differential Revision: D9578686

fbshipit-source-id: 21c70b071d74cd37e6eb489cfff731efa314bbe6
2018-08-30 15:13:24 -07:00
Daniel Büchele
73e5824e35 ManagedTable debouncing
Summary:
Removes the fix introduced in D9570518 and upgrading to `react-window@1.1.2` which fixes the problem in the library.

Also finetuning debounce times.

Reviewed By: passy

Differential Revision: D9582591

fbshipit-source-id: 92b008d29f96ce0f11f5cfb5d9e92175ae536ee2
2018-08-30 11:30:36 -07:00
Daniel Büchele
63c8bd4368 fix for missing rows in ManagedTable
Summary:
When starting with an empty table and adding rows, the scrollOffset of the table might end up with a negative value, which causes rows not to be rendered.

See https://github.com/bvaughn/react-window/issues/49 for more details.

This only calls `scrollToItem` when the table is actually scrollable to prevent a negative scrollOffset.

Reviewed By: passy

Differential Revision: D9570518

fbshipit-source-id: 5b08990a353a6d41d0f1bc5c1481d5a5e471bd94
2018-08-30 08:13:07 -07:00
Pascal Hartig
456e026257 Encrypt Travis secrets with LibreSSL
Summary:
Looks like Travis is running on an ancient version of OpenSSL which is incompatible with OpenSSL 1.1, which I used to encrypt the secrets.

See output here: https://travis-ci.org/facebook/flipper/jobs/422172610

Reviewed By: jknoxville, danielbuechele

Differential Revision: D9570729

fbshipit-source-id: 01ad282bbb614bb5d51e09f1b2e4f8d5eeabe2a9
2018-08-30 05:42:29 -07:00
John Knox
e51342c778 Fix Nan / Inf serialization issue
Summary:
Sonar was trying to convert folly dynamics containing NaN and Inf to json.
Folly doesn't allow this so we have to get rid of them before converting.

See https://fb.facebook.com/groups/230455004101832/permalink/483173632163300/ for more context.

`grep -r convertFollyDynamicToId fbsource/xplat/sonar` now returns results which all have `true` in the second parameter slot.

Reviewed By: danielbuechele

Differential Revision: D9570364

fbshipit-source-id: bf28b03e54b4987399e028a491d82451a8267d97
2018-08-30 04:27:49 -07:00
Pascal Hartig
db8fa7902c Fix publish-android-snapshot issues
Summary:
As expected, this didn't work on the first try. Issues I've fixed:

- Actually switch back to snapshots.
- Use more widely compatible bash location.
- Don't exit (because of `set -e`) if `grep` returns with status 1.

Reviewed By: jknoxville

Differential Revision: D9556770

fbshipit-source-id: 0900e6498e7fc8e16c941e77927005573ca310d5
2018-08-29 10:13:03 -07:00
Pascal Hartig
91b6cf1c6a Set up automatic android snapshot publishing
Summary:
Set up automatic publishing to Maven Snapshots if the current
VERSION_NAME ends in `-SNAPSHOT`.

Reviewed By: danielbuechele

Differential Revision: D9539838

fbshipit-source-id: 6e413fa3b02966946bb867eebe7ba8b863f291b9
2018-08-29 07:12:47 -07:00