Commit Graph

339 Commits

Author SHA1 Message Date
Pritesh Nandgaonkar
3a584d0f18 Update rsocket version (#225)
Summary:
Updates rsocket to latest version
Pull Request resolved: https://github.com/facebook/flipper/pull/225

Reviewed By: jknoxville

Differential Revision: D9313576

Pulled By: priteshrnandgaonkar

fbshipit-source-id: afd55eddfa79f0f9d2a36a6f0539d823161d1bed
2018-08-14 06:01:00 -07:00
Daniel Büchele
6f2a7dcb05 clean up console
Summary: The console was pretty spammy. This fixes some issues that were logged and changes many log statements to `console.debug` which are not shown by default.

Reviewed By: passy

Differential Revision: D9303011

fbshipit-source-id: 1102f4f8814152a45f155cb43488a515c2d4eee4
2018-08-14 03:12:54 -07:00
Daniel Büchele
eb316be4e4 fixing tracking metrics
Summary:
- fixing dropped frames calculation
- fixing plugin activation time

Reviewed By: passy

Differential Revision: D9301759

fbshipit-source-id: 872e4d2edcafdbc67668f3d0b713dfbf55f068f5
2018-08-13 15:27:29 -07:00
Sara Valderrama
656044ce69 AX tree expands with main tree on search (cannot search ax tree yet)
Summary: AX tree will now stay in sync with the main tree when searching. Also allows user to completely erase search (previously had left one letter highlighted in the tree even if entire query was erased).

Reviewed By: danielbuechele

Differential Revision: D9276721

fbshipit-source-id: 5272bb9cf3400ad3eb9d16bf438b0e5d4b551c6a
2018-08-13 13:28:10 -07:00
Pascal Hartig
00847365ef Android v0.6.17
Summary: Published new android artifacts.

Reviewed By: danielbuechele

Differential Revision: D9295871

fbshipit-source-id: 7809d947622138192b3b931c6739570c11d050a8
2018-08-13 12:11:42 -07:00
Aaron Brady
b552dc6f52 Make WindowsDevice for Sonar
Summary:
This diff adds the ability for a windows desktop app to be a selectable device for Sonar.

just to over-communicate what I'm thinking regarding the logging: windows system logs don't have a lot of valuable information in my experience, and there is a ton of garbage, but there is probably a way to tap into that if we want.

however, I was thinking that redirecting stderr/stdout from every connected process would be useful. i.e. OVRServer could register a log plugin and it would write to the device's log output. not sure if this would be better than just having a logger plugin. This is probably a pretty naive question and this probably isn't the place to have this conversation...but here we are :)

Reviewed By: jknoxville

Differential Revision: D8861986

fbshipit-source-id: f6ccba28729692ae4566dd24302268ad54d437eb
2018-08-13 11:29:59 -07:00
Aaron Brady
1a7ef4fc85 Generalize client OS filtering by device and move logic to Device class itself
Summary: Adding support for a WindowsDevice (in following diff) that relies on this behavior, also seems reasonable that the logic for what client os' a device supports should be in the device class.

Reviewed By: jknoxville

Differential Revision: D8861698

fbshipit-source-id: 2907f616baa04eb71a9e4ef3b6704980acbafaf5
2018-08-13 11:29:59 -07:00
Pascal Hartig
f400fcb99d Back out "[litho] Unify Components and Sections StateContainer interface"
Summary: Original commit changeset: fac09e914a17

Reviewed By: marco-cova

Differential Revision: D9295577

fbshipit-source-id: 6f79e6b9139b448726a6c3e049c8b3496f8e95b5
2018-08-13 06:56:36 -07:00
Pascal Hartig
8b3251a047 Make Travis output less verbose
Summary:
The results on the website are completely useless right now
due to wget and unzip spam.

Reviewed By: danielbuechele

Differential Revision: D9294858

fbshipit-source-id: 921979e19ff744a58da170d3dd15663fa2475275
2018-08-13 06:30:18 -07:00
John Knox
ed67ce527d Docs corrections in establishing-a-connection (#220)
Summary:
The title gets taken from the header, so is duplicated.
Pull Request resolved: https://github.com/facebook/flipper/pull/220

Reviewed By: passy

Differential Revision: D9244730

Pulled By: jknoxville

fbshipit-source-id: d4701cb4af6f551a35cfa02c9ff43aef495f1da0
2018-08-13 03:58:53 -07:00
John Knox
89c89e219c Expose Diagnostic screen in sample app
Summary: Adds a link on MainActivitiy that opens the diagnostic screen

Reviewed By: danielbuechele

Differential Revision: D9267065

fbshipit-source-id: 1b44134de0e57f8021b19d76644dac6389c88b65
2018-08-13 03:58:53 -07:00
fvonhoven
decde229b6 Update README w/TOC & link Contributing & MIT sections (#222)
Summary:
* Add a Table of Contents to README
* Link CONTRIBUTING section to CONTRIBUTING.md file
* Link License section to LICENSE file
* Change `Sonar` references to `Flipper` in CONTRIBUTING.md

![flipper-readme](https://user-images.githubusercontent.com/10098988/43982318-f201c870-9cba-11e8-90b7-ebc47854e641.gif)
Pull Request resolved: https://github.com/facebook/flipper/pull/222

Reviewed By: danielbuechele

Differential Revision: D9282868

Pulled By: passy

fbshipit-source-id: 2f1ff9b598b8a0afdde9039e5a2c4a157c48ed9c
2018-08-13 03:42:30 -07:00
Marco Cova
4ae01fce6a Unify Components and Sections StateContainer interface
Summary: Components and Sections has two different but equal interfaces for StateContainer. This diff create one unique StateContainer interface they can both use.

Reviewed By: muraziz

Differential Revision: D9278661

fbshipit-source-id: fac09e914a17d82b5f1053c5d38787a69efdc1b3
2018-08-13 03:11:56 -07:00
Pascal Hartig
229049b281 Back out "[flipper] Wait for server when requesting certificate files"
Summary:
This breaks in open source due to a missing rsocket symbol and
blocks our legocastle task.

Closes https://github.com/facebook/flipper/issues/224

Original commit changeset: e782b303b5e4

Reviewed By: jknoxville, danielbuechele

Differential Revision: D9289450

fbshipit-source-id: b780c300394f5793e95ef2fb6b0e6ba0150caf9a
2018-08-13 02:41:49 -07:00
Pascal Hartig
ef2659fd34 Remove Kotlin setup
Summary: We don't use it, so we shouldn't download it.

Reviewed By: jknoxville

Differential Revision: D9262618

fbshipit-source-id: 56aef9abc788cc75790e1f70da6cc2a513e5f18b
2018-08-12 07:56:44 -07:00
Sara Valderrama
bf863c3922 Logging added for ax mode and updated to fix console warnings
Summary: Added logging for accessibility functionality (both usage and performance). Fix to prevent trackTimeSince calls from not matching up to the correct marks. Fix to prevent recursive onElementExpanded calls from mismatching also.

Reviewed By: danielbuechele

Differential Revision: D9229790

fbshipit-source-id: d20f08719d2c4f9a35c9c71a492619ce5538d204
2018-08-10 14:57:30 -07:00
Pascal Hartig
e50bbd861d Change OpenSSL source download URL
Summary:
I'm "mirroring" the tarball so we can download this from
Java. Even JDK 8 doesn't like LetsEncrypt yet.

Reviewed By: danielbuechele

Differential Revision: D9264373

fbshipit-source-id: abb91fb72d74dccde4775cc852a93d75dd5a48e5
2018-08-10 10:11:47 -07:00
Daniel Büchele
8b8ffaa7a0 missing UI renames
Summary: Rename app title and update notification to "Flipper"

Reviewed By: passy

Differential Revision: D9270088

fbshipit-source-id: 4e49e8d553fdd6b98da599be3ce18b4daf412cb6
2018-08-10 09:57:38 -07:00
Daniel Büchele
faf8afe9cd Track plugin activation time
Summary: Track the time from when the plugin is selected until its `init()` function finishes.

Reviewed By: passy

Differential Revision: D9239750

fbshipit-source-id: 569f236c9d58f70548f1ba6bf31a96047dcc8245
2018-08-10 09:41:47 -07:00
John Knox
800302b433 Call onDisconnect callbacks when disconnected
Summary: I noticed from the diagnostics screen that onDisconnected was never being called when sonar disconnects.

Reviewed By: danielbuechele

Differential Revision: D9265562

fbshipit-source-id: afd070126c6ef02a98c8dbc6589b6f9b8b83a730
2018-08-10 09:13:27 -07:00
Daniel Büchele
a9b8c3d2c9 startup time tracking
Summary: Adds tracking from opening the application to the interface being shown.

Reviewed By: passy

Differential Revision: D9239037

fbshipit-source-id: eba60a9e839f9cc2b7a3c8706c6b9d63acb854b4
2018-08-10 09:13:27 -07:00
Daniel Büchele
2b98f05d03 add tracking for dropped frames
Summary: Adding dropped frames counter to usage events. This will allow us to track performance improvements.

Reviewed By: passy

Differential Revision: D9238608

fbshipit-source-id: d9adbb0ed72aaf13802f5eef39606970b64c8e36
2018-08-10 09:13:27 -07:00
Daniel Büchele
aace545ba6 move WelcomeScreen
Summary: The sidebar is now shown, even if no device is connected. This prevents the jumping layout when Flipper launches, but still has not connected to devices.

Reviewed By: passy

Differential Revision: D9263892

fbshipit-source-id: d5b96a8619393ee4002863a83d9024f00c6cb396
2018-08-10 08:57:09 -07:00
Daniel Büchele
7107efcc88 catch setFeedURL for non-codesigned apps
Summary: see title

Reviewed By: jknoxville

Differential Revision: D9264748

fbshipit-source-id: 6675a27d899361e12dd752eb5feea0f85c5c8d07
2018-08-10 08:57:09 -07:00
John Knox
6dd97f58ef Wait for server when requesting certificate files
Summary:
[Step 2 of a protocol change between desktop app and 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 changes the agent to use requestResponse, instead of fireAndForget and wait for a response from Flipper before continuing.

Also added a fallback to detect old versions of Flipper/Sonar and use the oldFireAndForget method in those cases.

Reviewed By: passy

Differential Revision: D9179393

fbshipit-source-id: e782b303b5e441f7d6c7faa3e5acdcbfb51e5e9c
2018-08-10 07:28:13 -07:00
Noah Gilmore
e3d243e23e Remove an extraneous comments from the iOS setup docs (#207)
Summary:
This comment was left there from the default cocoapods-generated Podfile, so it can now be removed.
Pull Request resolved: https://github.com/facebook/flipper/pull/207

Differential Revision: D9242957

Pulled By: passy

fbshipit-source-id: f3e6d0ebd61962410367bb0a0aa6209b31c4ef01
2018-08-09 10:56:51 -07:00
John Knox
286a88e3f2 Grammar updates in welcome screen
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/219

Reviewed By: passy

Differential Revision: D9239245

Pulled By: jknoxville

fbshipit-source-id: 5715738db5b7edbf8f5757447bd562f53d942b99
2018-08-09 07:27:50 -07:00
John Knox
9c0d426673 Add establishing a connection to website sidebar
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/218

Reviewed By: passy

Differential Revision: D9239480

Pulled By: jknoxville

fbshipit-source-id: 34b909a28af0c15d524926419ff47b8381163075
2018-08-09 07:27:50 -07:00
Pascal Hartig
b22f02510c Fix docs inconsistencies (#214)
Summary:
When referring to the project, we usually capitalize Flipper, but don't
do this super consistently. This fixes a few cases and some other
grammar issues.
Pull Request resolved: https://github.com/facebook/flipper/pull/214

Reviewed By: jknoxville

Differential Revision: D9219587

Pulled By: passy

fbshipit-source-id: 4c2a30730b8719ea4c058ad3c6cc262cbbdf6266
2018-08-08 13:43:17 -07:00
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