Commit Graph

4610 Commits

Author SHA1 Message Date
Sara Valderrama
047b6ed7b7 Expand AX tree when clicking-to-inspect
Summary: Adds expanding functionality to ax tree when click-to-inspect is used. Highlight/selection priority is given to the ax tree if in ax mode and the main tree otherwise.

Reviewed By: danielbuechele

Differential Revision: D9206028

fbshipit-source-id: 364b3cfc2e68dbce6006c36002353295aa7cdd07
2018-08-08 09:11:55 -07:00
John Knox
a725a8fa68 Move sandcastle-build.sh to facebook folder
Summary: Now we won't need the shipit config to exclude it anymore

Reviewed By: passy

Differential Revision: D9049518

fbshipit-source-id: 983bc28fc3dce7543c9100992f2daff1dd783ea3
2018-08-08 07:27:27 -07:00
John Knox
b944f496dc Add javadoc to SonarStateUpdateListener
Summary: Documentation

Reviewed By: danielbuechele

Differential Revision: D9215929

fbshipit-source-id: 1c67fc2098aa0734d85524697f196a6b0ae4c721
2018-08-08 07:12:02 -07:00
John Knox
a0b9d23d40 Add state annotations in SonarWebSocketImpl
Summary: These will be displayed in the sonar diagnostics screen, for troubleshooting connection issues.

Reviewed By: danielbuechele

Differential Revision: D9150552

fbshipit-source-id: c6d65fba86e7564fbb004aaa7b0303a1d5952e5d
2018-08-07 09:59:27 -07:00
John Knox
55ca14ee41 Pass SonarState into SonarWebSocketImpl
Summary: Allowing the connection code to update trigger diagnostic events

Reviewed By: danielbuechele

Differential Revision: D9150554

fbshipit-source-id: 5fe0a08edc2f3b0ccae43b4dc2c7b087c6404c58
2018-08-07 09:59:27 -07:00
John Knox
531a47535b Add SonarDiagnosticActivity to android
Summary:
Open the screen by running adb shell
am start -n com.facebook.samples.litho/com.facebook.sonar.android.diagnostics.SonarDiagnosticActivity

Reviewed By: danielbuechele

Differential Revision: D9150556

fbshipit-source-id: 534583cfa5e90af6fd0d2a50572e3763b8888da2
2018-08-07 09:59:27 -07:00
John Knox
d36518d1aa 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: D9150555

fbshipit-source-id: 5c25205ecc690f0101b444681be48b823b0cb052
2018-08-07 09:59:26 -07:00
John Knox
91e94815b4 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: danielbuechele

Differential Revision: D9150551

fbshipit-source-id: 8dd585ca503d32e684ff843d66a59a50a420b4c0
2018-08-07 09:59:26 -07:00
Sara Valderrama
c07d8c14a4 Add icon to show which elements in ax tree are talkback-focusable
Summary: Puts an accessibility icon next to any elements in the ax tree that may be focused on when talkback is running to show that they are "accessibility-focusable". When any sidebar values are changed, the icon will show up/disappear accordingly.

Reviewed By: danielbuechele

Differential Revision: D9171781

fbshipit-source-id: f3b42624988aaef22040ac3325d745a12f0622db
2018-08-07 09:42:27 -07:00
Sara Valderrama
1fb2c4ee76 Add focus option to context menu in the accessibility tree
Summary: Allow user to open the context menu on an element in the ax tree and request accessibility focus to that element. If the element is focusable (and talkback or another accessibility service is running), accessibility focus will change to that element, if not, it will not change anything.

Differential Revision: D9162382

fbshipit-source-id: 5dda9b87a2cc6eba4130e3feee978b5fa38ac9f1
2018-08-07 09:42:27 -07:00
Pritesh Nandgaonkar
ae0b8f6b53 Release 0.6.16 for iOS
Summary: Releases a new iOS version 0.6.16. After landing this I will release 0.6.16 tag on github

Reviewed By: danielbuechele

Differential Revision: D9194965

fbshipit-source-id: 13d5e346d6d34a7bf7b6dfb568ca622d97660132
2018-08-07 08:28:55 -07:00
Pritesh Nandgaonkar
128a837304 Update sonarkit podswith public header files for swift umbrella header
Summary: With the new swift support for network plugin, the sample swift app was not compiling as it didn't have the location of plublic header files

Reviewed By: danielbuechele

Differential Revision: D9194964

fbshipit-source-id: 210da3b4a921febc95a3ee8a6dc7788278c5db96
2018-08-07 08:28:55 -07:00
Pritesh Nandgaonkar
2f009882d3 Use tags instead of master branch for folly
Summary:
Prior to this diff the OSS sonar project depended on folly's master branch instead of tags, which is not good as things can break, which broke recently. So this diff adds the folly dependency thru tags to avoid any future failures.

This diff releases a new folly dependency which relies on a tag

Reviewed By: danielbuechele

Differential Revision: D9194966

fbshipit-source-id: 0a0956f0bd457e375fcbb86b3fec412aeb759a47
2018-08-07 08:28:55 -07:00
Pascal Hartig
565d9e964c Update Maven reference
Summary: We're now on JCenter with the new package name.

Reviewed By: danielbuechele

Differential Revision: D9195254

fbshipit-source-id: 948f1abe557746de349cd4138fa98658e43184d0
2018-08-07 06:57:04 -07:00
Pascal Hartig
75af6b3c72 Update README formatting (#208)
Summary:
Without the newline, this gets interpreted as a headline, which looks a bit weird.

Pull Request resolved: https://github.com/facebook/flipper/pull/208

Reviewed By: danielbuechele

Differential Revision: D9194566

Pulled By: passy

fbshipit-source-id: 67d63e072f4f8d0e86f3a2a0a48886e7e5716b40
2018-08-07 06:57:04 -07:00
Daniel Büchele
9c239c23c9 add spotlight comment with old name
Summary:
To make the transition from the old to the new name as smooth as possible, we want to allow people to launch the app using its old name via Spotlight.
Therefore, we set a comment on the executable with the old name. These comments are indexed by Spotlight and the app can be launched with the old name.

Reviewed By: passy, priteshrnandgaonkar

Differential Revision: D9149323

fbshipit-source-id: b812776350b3fc57dc3a193bcd96c343a13a039f
2018-08-07 06:41:38 -07:00
John Knox
f73c28ba6b Prepare desktop app for requestResponse CSR change
Summary:
[Step 1 of a protocol change between desktop app and flipper agent]

The flipper agent periodically tries to connect.
When it doesn't have the required certs, instead of trying to connect, it requests them from the desktop.
After requesting, it just continues the loop, trying to request.

The problem with that is
a) the desktop can take longer than one cycle to generate and provide the certs, meaning the agent will make overlapping requests, causing confusion and it to take longer than necessary.
b) the desktop can take less time than a retry cycle, but the agent will still wait before trying to connect.

Fixing a) by making the agent wait for a response from the desktop before continuing attempting to reconnect.
This means on the next connection attempt, it's guaranteed that the desktop is finished processing the CSR.

b) remains unfixed for now, but can be dealt with separately.

This is step 1 which adds an extra responder to the desktop app. It won't change anything until the agent starts
sending requestResponse messages instead of fireAndForgets. The plan is to leave this in place for a while to give users time to update, after that, we'll roll out the change to the agent.

Reviewed By: passy

Differential Revision: D9179392

fbshipit-source-id: 9a8021253dcd28c15cceeec23630a67aec219fd5
2018-08-07 06:41:38 -07:00
John Knox
a92b6eaf80 Add AndroidSonarClient.getInstanceIfInitialized()
Summary:
Sometimes you want to get the sonar client without necessarily wanting to initialize it, for example if you don't have a context object, but still want to get hold of a particular plugin object.
Adds a getInstance method that returns null if not initialized.

Reviewed By: passy

Differential Revision: D9154423

fbshipit-source-id: 65cb46684bc35d9a953dbd958c7cf72aba0015e2
2018-08-07 06:29:09 -07:00
Pascal Hartig
b8c568e3e4 Fix avd device name resolution with GNU netcat
Summary:
Device connection didn't work on Linux due to netcat behaving differently.
I also played around with the `nc` and `node-netcat` packages, but they would
either crash the node stack or fail to compile with Babel. Oh glorious
JavaScript world.

Reviewed By: danielbuechele

Differential Revision: D9194591

fbshipit-source-id: 58e5b8d6b4a66e791e750de2f1449dcb8fc338ae
2018-08-07 06:12:03 -07:00
Sara Valderrama
fc7f949daf Click to inspect works with TalkBack
Summary: Allow click to inspect to work when Talkback is running (normal tree expands as usual although ax tree doesn't expand yet). Override onHover of Touchoverlay and onRequestSendAccessibilityEvent in viewRoot to prevent talkback focus when in Click to Inspect mode. Also update layout inspector to persist isSearchActive to prevent build up of TouchOverlayViews when navigating between plugins (which happened if leaving the layout inspector while in Click to Inspect mode).

Reviewed By: danielbuechele

Differential Revision: D9153446

fbshipit-source-id: f76982e8f8cea1e7b7e4c6b9bf73632d101222ef
2018-08-06 16:54:20 -07:00
Pascal Hartig
f59cafe25e Android v0.6.16
Summary:
Rename artifacts and release on Bintray. Public release
will be delayed by the manual review by JFrog.

Reviewed By: danielbuechele

Differential Revision: D9179646

fbshipit-source-id: 84c11d545940d1d52b9de9f87b4eb26901290108
2018-08-06 14:11:54 -07:00
Pascal Hartig
3abe33af14 Flip the Flipper tooltip
Summary: Fix a small issue we had with our mascot.

Reviewed By: danielbuechele

Differential Revision: D9180345

fbshipit-source-id: de1c34768b4f75202d78bd4404798a7549aa0457
2018-08-06 14:11:54 -07:00
Pritesh Nandgaonkar
0c60347593 Swift support for NetworkPlugin (#201)
Summary:
Solves #173

- [x] Add plugins in the sonarkit xcodeproj so that its easy to debug
- [x] Get rid off the c++ in the headers
- [x] Add example to hit network requests and validate

Have a look at the screen shot below ️

<img width="1677" alt="screen shot 2018-08-02 at 12 46 07 pm" src="https://user-images.githubusercontent.com/3865908/43581809-22efe4fe-9652-11e8-9424-f279d07c5c81.png">
Pull Request resolved: https://github.com/facebook/flipper/pull/201

Reviewed By: danielbuechele

Differential Revision: D9132157

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 2b425506961f02eb2bf629c2bcab0da6e7ce5bb0
2018-08-06 12:43:13 -07:00
Daniel Büchele
134a0d96c5 renaming app to Flipper
Summary: rename all visible references of Sonar to Flipper. Changes endpoint URLs to the new repo address.

Reviewed By: passy

Differential Revision: D9082100

fbshipit-source-id: 2ab8b680a19c23d80050e8e768379c29d66acfca
2018-08-06 10:44:33 -07:00
Phoomraphee Luenam
2c48afdf04 Implement AlignmentMode in layoutplugin
Summary:
Add a Button to toggle alignment lines on Sonar interface.

Call sonar plugin in java, sending isAlignmentMode flag.

Changed API for setHighlighted to include alignment mode flag.

Button design to be added in future diffs by @[100003260904633:maximg]

Reviewed By: danielbuechele

Differential Revision: D9123749

fbshipit-source-id: 01c299f299be30dbb695bfb1d8007d63c27643d5
2018-08-06 07:41:48 -07:00
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