Commit Graph

7185 Commits

Author SHA1 Message Date
Daniel Büchele
764ad440cb Make sidebar scrollable
Summary: Sidebar is now scrollable, when showing too many plugins.

Reviewed By: jknoxville

Differential Revision: D9179312

fbshipit-source-id: bfcd4655a0fbbe91424b88378db3713e68e2cb7f
2018-08-06 06:27:18 -07:00
Daniel Büchele
de800fee37 check for action type in application reducer
Summary: Previously, accidentally all action payloads have been written to the application reducer, because it didn't check the action type. Now, this diff makes sure, the application reducer checks for the action type and only writes actions to the store which are meant for the reducer.

Reviewed By: jknoxville

Differential Revision: D9179305

fbshipit-source-id: 833776468ed32e0385058571130e81eff06c370e
2018-08-06 06:27:18 -07:00
Daniel Büchele
5fd1ebba2e show sidebar in logs plugin
Summary: Logs plugin was not showing sidebar after switching to new sidebar API.

Reviewed By: jknoxville

Differential Revision: D9179249

fbshipit-source-id: 922be402dbbb1096343489f6027cd543010b694f
2018-08-06 06:27:18 -07:00
Daniel Büchele
1b3e3468a3 fix scrollbars in logs
Summary: Some columns in logs plugin where showing scrollbars since the update to electron 3. This hides scrollbars on all columns

Reviewed By: passy

Differential Revision: D9179242

fbshipit-source-id: bdf2e1a6f77d2a7e25cb34792b980afe7571e643
2018-08-06 06:27:17 -07:00
Pascal Hartig
3a657ed46a Use textContent for showing dev error message (#199)
Summary:
`innerHTML` seems unnecessarily dangerous, rendering unescaped content from the network in an execution context. It can also raise exceptions if the HTML received is invalid, so let's not do this?
Pull Request resolved: https://github.com/facebook/flipper/pull/199

Reviewed By: danielbuechele

Differential Revision: D9179150

Pulled By: passy

fbshipit-source-id: 911b2686150be73c8e9e42b94b2a96da62fd6ae7
2018-08-06 05:42:30 -07:00
Pascal Hartig
4e5122d664 Fix RootComponentSpec formatting
Summary: pusheen_big_and_beautiful

Reviewed By: danielbuechele

Differential Revision: D9178922

fbshipit-source-id: 5d8e1b01086e337b9f9d3b714bb1e6c879a43f55
2018-08-06 04:41:29 -07:00
Phoomraphee Luenam
8ea2809742 Add Alignment Functionality for Sonar
Summary:
Part of a hackathon project. (https://fb.facebook.com/groups/230455004101832/permalink/454928784987785/)

We're adding an alignment mode for Sonar that shows the pixel level alignment.

Reviewed By: danielbuechele

Differential Revision: D9121197

fbshipit-source-id: 21af36fd7eeea631d580ccebff8e648fa276bf35
2018-08-06 04:13:00 -07:00
Pascal Hartig
0c536b3188 Set up LeakCanary plugin in sample app
Summary: Per title.

Reviewed By: danielbuechele

Differential Revision: D9178886

fbshipit-source-id: c48411cdd2a28d182644bf2278ee8414812d6034
2018-08-06 03:14:20 -07:00
Pascal Hartig
dedd953c28 Move leakcanary to open source and add build files
Summary:
Made sure it builds with both buck and Gradle.

Follow-up to D8865149.

Reviewed By: danielbuechele

Differential Revision: D9178885

fbshipit-source-id: 46efaa532efdc1d59ce76e04be6680e233084881
2018-08-06 03:14:20 -07:00
John Knox
5c81aefe9a Use unlinkSync instead of unlink
Summary:
fs.unlink() requires a callback and we weren't passing one.
Using synchronous version instead.

Reviewed By: passy

Differential Revision: D9148214

fbshipit-source-id: 8a3c1103d93fced5e3c25c38775badb72c23e48a
2018-08-03 08:57:49 -07:00
Daniel Büchele
e3ac7f4e36 fix yarn deadlock in postinstall
Summary:
The script installing the plugin dependencies is executed by yarn itself. This means a yarn instance is running while the script is trying to create another yarn instance to install plugin dependencies. The second yarn instance is waiting for the first to finish, while the second can't start as long as the first hasn't finished. Deadlock.

This is why we use a port dirrerent from yarn's default port (31997) for the mutex.

Reviewed By: jknoxville

Differential Revision: D9149973

fbshipit-source-id: 69790021460fd8ddea9ed84ca8130c77be0a62a9
2018-08-03 08:41:48 -07:00
Daniel Abramowitz
410e6d14c8 Revert D8932114: [sonar] Add state tracking plumbing
Differential Revision:
D8932114

Original commit changeset: fb03babfe92b

fbshipit-source-id: a6a372a4115d69b5419a8c9924b333e7c163497b
2018-08-03 08:27:42 -07:00
Daniel Abramowitz
e82fd6371d Revert D8954014: [sonar] Start adding state annotations for diagnostic screen
Differential Revision:
D8954014

Original commit changeset: 864156b0d3f5

fbshipit-source-id: 6dc0aaf56f609ade6123e450978df08f4b7331fc
2018-08-03 08:27:42 -07:00
Daniel Abramowitz
fadd392349 Revert D8954095: [sonar] Add SonarDiagnosticActivity to android
Differential Revision:
D8954095

Original commit changeset: b4a638bc0ba2

fbshipit-source-id: 6165b7429477e80520fb0e149da1c2ef893e1d90
2018-08-03 08:27:42 -07:00
Daniel Abramowitz
7fc7061fca Revert D9117507: [flipper] Pass SonarState into SonarWebSocketImpl
Differential Revision:
D9117507

Original commit changeset: 24eeb1f80109

fbshipit-source-id: 9668d3880bc1048c542d78c7a522c6ed1ecd4037
2018-08-03 08:27:42 -07:00
Daniel Abramowitz
0e4957b856 Revert D9117508: [flipper] Add state annotations in SonarWebSocketImpl
Differential Revision:
D9117508

Original commit changeset: 6481f127b908

fbshipit-source-id: d6e7633bbb6410b2efcf16b1637605cfc23af450
2018-08-03 08:27:41 -07:00
John Knox
195f87f5c9 Add state annotations in SonarWebSocketImpl
Summary: These will be displayed in the sonar diagnostics screen, for troubleshooting connection issues.

Reviewed By: passy

Differential Revision: D9117508

fbshipit-source-id: 6481f127b908fa539fe1fed1e268a28fa357d6f8
2018-08-03 07:42:17 -07:00
John Knox
c7858c62f7 Pass SonarState into SonarWebSocketImpl
Summary: Allowing the connection code to update trigger diagnostic events

Reviewed By: passy

Differential Revision: D9117507

fbshipit-source-id: 24eeb1f80109f89137a7333e04039c3ae9dc3e71
2018-08-03 07:42:17 -07:00
John Knox
3237b60ff1 Add SonarDiagnosticActivity to android
Summary:
Open the screen by running adb shell
am start -n com.facebook.wakizashi/com.facebook.sonar.android.diagnostics.SonarDiagnosticActivity

Reviewed By: passy

Differential Revision: D8954095

fbshipit-source-id: b4a638bc0ba2f69a69c121c7c1c00fbe47476ee3
2018-08-03 07:42:17 -07:00
John Knox
c791a108f1 Start adding state annotations for diagnostic screen
Summary:
The plan is to add such state annotations around all core sonar tasks, so the diagnostic screen can show a useful up to date picture of what's going on.
This is the first batch of such annotaions, to act as a tracer while putting the rest of the diagnostics code in place.

Reviewed By: passy

Differential Revision: D8954014

fbshipit-source-id: 864156b0d3f51eeb05c2c8916c1765e834f1dc8e
2018-08-03 07:42:17 -07:00
John Knox
fb447e4f84 Add state tracking plumbing
Summary:
The plan is to get SonarState to take update events and aggregate them into an object, that can be displayed in the UI so you can see what sonar is currently trying to do, and what if anything is failing.
This is pretty rubbish right now, as it just uses a single string to represent state, this is just the initial version I'll iterate on.
I also need to pass the SonarState into the SonarWebSocketImpl, since that's where a lot of the heavy lifting is done, but as long as something is logging state updates here, it proves the concept.
SonarStateUpdateListener is the interface that will be implemented by android and iOS implementations. These implementations will notify an activity or screen that the state has changed and they should reflect that.

Reviewed By: passy

Differential Revision: D8932114

fbshipit-source-id: fb03babfe92be53771eb4d8f10de7ecdc7f1a6d8
2018-08-03 07:42:16 -07:00
Pritesh Nandgaonkar
3d66b1c9d0 Fix for iOS Cocoapods default config (#205)
Summary:
Solves #203

- [x] Sample Objc and Swift apps now have default configs(i.e non-recursive header search paths)
- [x] Fix for the cocoapods default config by adding FBMacros.h file in `Core` subspec
- [x] Updated the Spec(0.6.15) so that 0.6.15 works for default configs
- [x] Updated the doc
Pull Request resolved: https://github.com/facebook/flipper/pull/205

Reviewed By: passy

Differential Revision: D9148358

Pulled By: priteshrnandgaonkar

fbshipit-source-id: e6d32d9cde7b100573bd9a9996f0ec850b269d28
2018-08-03 07:12:47 -07:00
Daniel Büchele
696c73ebc1 fixing travis builds
Summary:
- making website deployment and desktop app builds two different travis jobs, so if one fails, the other is still working
- running website builds on linux, because, we don't need macOS for this
- making dependency installs serial instead of parallel to avoid problems of multiple yarn instances running at the same time
- removing duplicate postinstall script which breaks for electron 3 builds

Reviewed By: passy

Differential Revision: D9148342

fbshipit-source-id: 22f3a0fe59aff066c04fb964621604efc46aab8a
2018-08-03 05:56:38 -07:00
Lee Howes
092484e255 Future<T>::then 4/n: Future<T>::then(not-try-task) -> Future<T>::thenValue(task) xplat.
Summary:
Overall plan to modify Future<T>::then to be r-value qualified and use Future<T>::thenTry or Future<T>::thenValue.

The goal is to disambiguate folly::Future and to improve type and lifetime safety of Future and its methods.

4/n: Codemod:
 * rvalue-future<T>.then(callable with operator()(not-a-try)) to rvalue-future<T>.thenValue(callable with operator()(not-a-try)).
 * rvalue-future<T>.then(callable with operator()()) to rvalue-future<T>.thenValue(callable with operator()(auto&&)).
 * rvalue-future<T>.then(callable with operator()(auto)) to rvalue-future<T>.thenValue(callable with operator()(auto)).

 Applied to xplat.

Reviewed By: marshallcline

Differential Revision: D9133114

fbshipit-source-id: 30cc4f0480ca04b3abda54af3aafd9fc4dfdf0e0
2018-08-03 03:21:41 -07:00
Daniel Büchele
6dcbf94084 Merge pull request #204 from priteshrnandgaonkar/remove-internal-plugin
Remove internal plugins
2018-08-03 11:14:15 +01:00
Pritesh Nandgaonkar
0b47fb4a09 Remove internal plugins 2018-08-03 11:07:06 +01:00
Benjamin Pankow
1008dbb283 Create open source LeakCanary plugin
Summary: Adds a new plugin to support [LeakCanary](https://github.com/square/leakcanary), displaying memory leaks as they are detected. Each leak shows a hierarchical path from the GC root to the leaked object, and allows inspection of these objects' fields.

Reviewed By: jknoxville

Differential Revision: D8865149

fbshipit-source-id: 99bcf216578b9d6660ead7d48b9bafe0d20a6c08
2018-08-02 10:27:11 -07:00
Sara Valderrama
ff0b045bde Allow for multiple view roots, include accessibility focus changing between view roots
Summary: Ax mode now works with multiple view roots/windows, accessibility focus is also updated when new windows are opened.

Reviewed By: danielbuechele

Differential Revision: D9121844

fbshipit-source-id: 1da9327f5d6a784793db8076c2ad2d84e860ac1c
2018-08-02 09:41:26 -07:00
Pritesh Nandgaonkar
0b0f59f096 Move SKTigonNetwork internal plugin to xplat
Summary: Moves SKTigonNetwork internal plugin to xplat leaving behind a stub buck target in litho

Reviewed By: passy

Differential Revision: D9082339

fbshipit-source-id: d98eeef4e64458586403c01937f6d48ad82e27aa
2018-08-02 08:13:38 -07:00
Daniel Büchele
7a82d56eb6 fixing links on website
Summary:
fixing broken links for:
- Twitter account
- App download
- FlipperKit image on landing page

Reviewed By: passy

Differential Revision: D9131794

fbshipit-source-id: 0e7db0ebd57757684571f0325543c35ce3ba9bec
2018-08-02 06:12:31 -07:00
Daniel Büchele
1b072c71a7 use yarn network mutex
Summary: The file system mutex caused some problems in Sandcastle. This diffs switches for the default setting (network mutex) in the hope this fixes the problem

Reviewed By: passy

Differential Revision: D9132069

fbshipit-source-id: 5abb4d33b6db2a5d2b3f0788116ca6941e554591
2018-08-02 05:43:33 -07:00
Daniel Büchele
75dfbf51f8 electron flow type definitions
Summary: Adding a flowtype library definition for electron 3 and fixing related type errors

Reviewed By: passy

Differential Revision: D9124758

fbshipit-source-id: e09cb5b05ba952e7f95f68f9043edc586f81ae83
2018-08-02 03:57:52 -07:00
Daniel Büchele
69eaedcbb0 upgrade to electron 3
Summary: upgrading to the latest electron version

Reviewed By: passy

Differential Revision: D9124759

fbshipit-source-id: 7d79f22f3b6dec6179eec868b8a6f20da1259401
2018-08-02 03:57:52 -07:00
Sara Valderrama
30a19901ee Cleanup js in layout inspector, add check for ios
Summary: Clean up javascript. Add a check to remove ax mode toggle if using ios. Add safety check for extraInfo where it hasn't been added yet.

Reviewed By: danielbuechele

Differential Revision: D9070574

fbshipit-source-id: 49ac781c01ea47239d6c24089976497371973726
2018-08-01 13:41:43 -07:00
Daniel Büchele
06e70a1555 Screen capture unique file names and location
Summary: Screen captures now have unique names, so they don't get overwritten. By default they are saved to the desktop, but the path can be overwritten by setting `screenCapturePath` in `~/.sonar/config.js`

Reviewed By: jknoxville

Differential Revision: D9120822

fbshipit-source-id: ab6880eac475da3839f08c6e644c16bdc8693647
2018-08-01 11:29:05 -07:00
Pritesh Nandgaonkar
d2708d4982 Release 0.6.15 with a fix which broke the release
Summary: Release 0.6.15

Reviewed By: danielbuechele

Differential Revision: D9117554

fbshipit-source-id: 1096705c8d9b25c36df4b824d70c0c49fd6c50af
2018-08-01 06:55:59 -07:00
Pritesh Nandgaonkar
a5585aa7e7 Add FBMacros file (#198)
Summary:
It was deleted in one of the previous commit and it broke the build
Pull Request resolved: https://github.com/facebook/flipper/pull/198

Reviewed By: passy

Differential Revision: D9117234

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 72d9d58a11683b8a51732b3f735ef1326ce56794
2018-08-01 06:55:58 -07:00
John Knox
a6d8493330 Grammar fix in android sample app
Summary: Fixing grammar.

Reviewed By: passy

Differential Revision: D9082223

fbshipit-source-id: d3bf4e345f0fd13c5ef5c418c41e4a07620bd86f
2018-08-01 06:12:04 -07:00
John Knox
93dd047db1 Android sample - Update group and github links
Summary: Updating sonar -> flipper

Reviewed By: passy

Differential Revision: D9082224

fbshipit-source-id: 3834bf2cfc9137fac1fb92e3796bf600da08cd93
2018-08-01 06:12:04 -07:00
John Knox
0729ce6959 Log error when sonar is missing required permissions
Summary:
Sonar won't work without the INTERNET permission, so it can talk TCP to the desktop, on localhost.
Also, for genymotion, we use the IP address, so we need ACCESS_WIFI_STATE.

Reviewed By: passy

Differential Revision: D8855239

fbshipit-source-id: 35d0b0bba91daeba35a5de90e5ef87e89ac6bb51
2018-08-01 04:56:23 -07:00
Pascal Hartig
d260afa300 Fix doc deployment (#197)
Summary:
See error in https://travis-ci.com/facebook/flipper/jobs/137449831
Pull Request resolved: https://github.com/facebook/flipper/pull/197

Differential Revision: D9105688

Pulled By: passy

fbshipit-source-id: efe64137f52684f72ff54690dd2cf25d4a5b5109
2018-08-01 03:26:14 -07:00
Benjamin Pankow
a4638033b7 Improve styling of Hprof Analysis for Memory Tools plugin
Summary:
Improves the look of analyzed Hprof data for the Memory Tools plugin. Adds an expandable/collapsable tree using ElementsInspector and groups large objects/leaked objects.
https://pxl.cl/fxNs

Reviewed By: danielbuechele

Differential Revision: D8721141

fbshipit-source-id: f78fe32bd2ca1f11ce39b9e696f48a56dc5c9bff
2018-07-31 14:56:28 -07:00
Pascal Hartig
221cdda89d Manual fixup
fbshipit-source-id: 7b80c41ca68324f067b6c6796f59f14101a2c643
2018-07-31 14:20:42 -07:00
Benjamin Pankow
4818d87c3f Add hprof analysis to Memory Tools plugin
Summary: Add needle dependency.

Reviewed By: danielbuechele

Differential Revision: D8665740

fbshipit-source-id: 552bbc3d346560d5d9981a666b8fb527a27d72d3
2018-07-31 14:19:15 -07:00
Pritesh Nandgaonkar
10dc4d0ca9 Change the mention of Sonar in iOS sample app
Summary: Update the iOS sample app with flipper

Reviewed By: passy

Differential Revision: D9056882

fbshipit-source-id: f5b49fc60905c6d5ebca3da977cf966e76feffb8
2018-07-31 14:02:58 -07:00
Pritesh Nandgaonkar
07d75ce848 Rename Sample app from Sonar to Flipper
Summary: Renamed sonar sample app with flipper

Reviewed By: passy

Differential Revision: D9050608

fbshipit-source-id: 4e76e4c6cc8febb997ce32b4f78a2fab9792310d
2018-07-31 14:02:58 -07:00
Pritesh Nandgaonkar
5fc0d9833d Change the website branding
Summary: Updated the website with the new name flipper

Reviewed By: passy

Differential Revision: D9046642

fbshipit-source-id: e4c6e77ddba62b8ebedf5639dc7cc6375b857cd9
2018-07-31 14:02:58 -07:00
Pritesh Nandgaonkar
8db555b259 Replace sonar with flipper in docs
Summary: Replaces sonar with flipper in the docs of a website

Reviewed By: passy

Differential Revision: D9046564

fbshipit-source-id: 55d03d787489406571ea0b4ac0adbc0daaa95cd4
2018-07-31 14:02:58 -07:00
Pascal Hartig
2128515a5d Update docs domain name
Summary: Update CNAME for domain.

Reviewed By: priteshrnandgaonkar

Differential Revision: D9087229

fbshipit-source-id: 325df300e23c87384503929c506ba690e61b8da1
2018-07-31 09:56:15 -07:00
Pascal Hartig
6bfdb8d114 README: Sonar -> Flipper
Summary: Kick off the rename.

Reviewed By: jknoxville

Differential Revision: D9044214

fbshipit-source-id: 86e7b3aeef8c972f18499185c291867751068a2d
2018-07-31 09:56:15 -07:00