Summary:
The sidebar always showed all apps, because we don't know on which device an app is running. This filters the sidebar to only show Android apps, when an Android device is selected and only show iOS apps when an iOS device is selected.
Still, we can't filter when where are more simulators with the same OS.
Reviewed By: jknoxville
Differential Revision: D8766007
fbshipit-source-id: dcf0db41b2c2c5dcaa2d1700343b1dd45d3d53b0
Summary:
All the new errors were missing annotation errors. I fixed as many as I could
by adding annotations. For the rest I added a $FlowFixMe suppression type.
Reviewed By: nmote
Differential Revision: D8756267
fbshipit-source-id: a69b6e21525b9b12e582ff18dcb1eeea584abb2a
Summary: Many plugins initialized their state in the init function. Due to changes in how plugins are rendered, the init-function might be called after the initial render and therefore the state being undefined at the first render. This moves the state initialization into a instance variable to ensure they are created before the first render.
Reviewed By: jknoxville
Differential Revision: D8746242
fbshipit-source-id: 04af039da2dc00c14a2d8ac42b72559ce789ef57
Summary: Added duplicate view tree (will be replaced with accessibility node tree eventually). Can toggle ax mode on and off and interact with each tree individually to view/change properties.
Reviewed By: danielbuechele
Differential Revision: D8717557
fbshipit-source-id: 1109ccafd49b6958ee7a70c2e8851ed8351516ae
Summary: This diff is mainly moving diffs around to open source the Sandbox plugin. I created the MD file writing some docs. The rest is just making our own FB implementation work
Reviewed By: danielbuechele
Differential Revision: D8731839
fbshipit-source-id: 27ac67223c6de9d1be406ab8c06b71b82d5407bc
Summary: Now, that we always have one device selected, we can put the buttons for screenshot and screen capture to Sonar's titlebar. This diff also adds support for iOS devices.
Reviewed By: jknoxville
Differential Revision: D8732632
fbshipit-source-id: 56271fbba7b4a2c10c2742c5c457dbb4c3c16777
Summary:
Some errors such as UI errors should be logged whenever they occur, but some, such as those that occur when a device keeps trying to connect but can't, should not be.
This adds the class and replaces the top recurring errors with it.
Reviewed By: danielbuechele
Differential Revision: D8639448
fbshipit-source-id: f001aa1e90eae6d26a8dbfcd3175b51fc486eae9
Summary: Instead of showing a modal alert, we are now showing a notification, when an update is available. Clicking the notification will restart Sonar and install the plugin. Otherwise, the update will be installed on the next start of Sonar.
Reviewed By: jknoxville, priteshrnandgaonkar
Differential Revision: D8732743
fbshipit-source-id: b9e73a0d5b0866ab79b1e17274c501eac2ef41cc
Summary:
This lets `yarn` work properly on Windows. Tested in a Cygwin environment. I also added a note about yarn compatibility to the readme.
Closes https://github.com/facebook/Sonar/pull/138
Reviewed By: danielbuechele
Differential Revision: D8734197
Pulled By: xiphirx
fbshipit-source-id: 19be8bb0653a2b0381224b065df0cac579d72c3b
Summary:
Remove left over from local testing.
Closes https://github.com/facebook/Sonar/pull/127
Reviewed By: danielbuechele
Differential Revision: D8723789
Pulled By: passy
fbshipit-source-id: f08203a441c35860dd5257a0ec147d1bf9c3da60
Summary:
Add the required compiler flag for Folly when building x86_64.
I'll prepare a new release for this shortly.
Depends on #126
Closes https://github.com/facebook/Sonar/pull/128
Reviewed By: danielbuechele
Differential Revision: D8731955
Pulled By: priteshrnandgaonkar
fbshipit-source-id: 9511811b0b51205989a5200ad9d0d8689ca684cb
Summary:
This mirrors the extension support added to the desktop plugin and allows people to dynamically
add extension commands
Reviewed By: danielbuechele
Differential Revision: D8691167
fbshipit-source-id: 60136b960f8bbdfa42b2077d1f5f7b391fc44443
Summary: This adds the ability to extend the layout inspector's sidebar via SidebarExtensions
Reviewed By: sjkirby
Differential Revision: D8677332
fbshipit-source-id: 1880d5d2185306290a278e8a48e965ad94b98cc0
Summary:
This uses OpenSSL 1.1.0h to build and link against. The `.so`s are
precompiled and hand-patched from [this
repository](https://github.com/passy/android-database-sqlcipher). The
patching was necessary to fix the `SONAME` and corresponding `NEEDED`
flags to *not* contain a `.1.1` version suffix as Gradle will refuse to
bundle those.
We basically only use the headers for the remaining part.
The precompiled version contains ABI support for `arm64-v8a`, `armeabi`,
`armeabi-v7a`, `x86` and most importantly `x86_64`. HOWEVER, `x86_64` is
still excluded for now because folly fails to compile due to a missing
compiler flag:
```
error: needs target feature pclmul
```
This should be easily fixable by ensuring that `-mpclmul` is added to
the CFLAGS if we're compiling for an `x86_64` target in the
`CMakeLists.txt` for Folly.
Closes#113.
Closes https://github.com/facebook/Sonar/pull/125
Reviewed By: priteshrnandgaonkar
Differential Revision: D8723636
Pulled By: passy
fbshipit-source-id: 41c61047d2793ebaef5793a3c937c4d628471d6a
Summary: `~` is not supported by node's `fs` functions. So we are replacing it manually.
Reviewed By: priteshrnandgaonkar
Differential Revision: D8658889
fbshipit-source-id: 36c9885a00a7e07e54ab416d6fda3b29bbda73b6
Summary:
You don't necessarily need / have your shared preferences defined in a file that is your package
name. This adds the ability to pass in the name + mode you need to read the correct shared
preferences file.
Reviewed By: sjkirby
Differential Revision: D8661573
fbshipit-source-id: 49e57b0371228eca7fc4f06e8ba65ff8cc059b11
Summary: The Android plugin has already been open sourced. This seemed to have fallen through the cracks.
Reviewed By: danielbuechele
Differential Revision: D8661536
fbshipit-source-id: eefbf224230f055db7ab5b5a0e04c192d3309132
Summary:
This PR brings us one step closer for publishing SonarKit.podspec to the public Cocoapods master repository. This solves [#93](https://github.com/facebook/Sonar/issues/93).
- [X] `SonarKit.podspec` now lints by passing the `--sources` flag and the `--use-libraries` flag. `pod spec lint SonarKit.podspec --sources=https://github.com/facebook/Sonar,master --allow-warnings --use-libraries` Same for `pod repo push`.
- [X] `SonarKit.podspec` is now also published to the CocoaPods Private repo. What does this mean? It means that we no longer need to manually define all of `SonarKit` dependencies in the Podfile. It only takes `SonarKit` consumers to add this line `source 'https://github.com/facebook/Sonar.git'` on top of any Podfile, and `SonarKit` will be installed by just defining it with `pod SonarKit`.
- [X] We are publishing a Cocoapods Private Repo in the meantime we don't have all of our dependencies updated and published to the CocoaPods master repo. The CocoaPods Private Repo contains updated dependency podspecs that will need to be published to the CocoaPods master repo in the near future. That will be the next action item in order to have SonarKit.podspec published as well.
- [X] Sample App Podfile has been refactored, much simpler and cleaner.
- [X] SonarKit Framework project now pulls its dependencies from the cocoapods master repository and the temporary private repository instead of the local podspecs. I am able to compile the SonarKit framework project now, before I was unable to.
- [X] Local third party podspec dependencies have been removed.
emilsjolander priteshrnandgaonkar noahsark769 feel free to contribute or expose any concerns.
Closes https://github.com/facebook/Sonar/pull/107
Reviewed By: danielbuechele
Differential Revision: D8694271
Pulled By: priteshrnandgaonkar
fbshipit-source-id: dcccf70d917cad1e27606a29c0b921883bf9a76f
Summary: Bump the Android version to 0.0.8.
Reviewed By: priteshrnandgaonkar
Differential Revision: D8694509
fbshipit-source-id: fec7a0cfcde7dfd12ba2ad13f68da6e1e6e55254
Summary:
Set up our fbjni sub-project to be published to Maven Central.
This removes a bunch of abiFilters that we no longer make use of, too.
Closes https://github.com/facebook/Sonar/pull/119
Reviewed By: priteshrnandgaonkar
Differential Revision: D8694537
Pulled By: passy
fbshipit-source-id: de246fbda99c02856fbc7806b78df2114cb82acb
Summary:
We're already building this as dependency via CMake of sonar itself and
bundle the resulting `.so` files in there.
This project only contains the java files so we can ship them as
separate JAR.
Importantly, this avoids having to use `pickFirst` as we bundle multiple
incompatible `.so` files in both AARs.
Closes https://github.com/facebook/Sonar/pull/116
Reviewed By: priteshrnandgaonkar
Differential Revision: D8691119
Pulled By: passy
fbshipit-source-id: 82303d6c2b5d7e12dcd8f49300090ce8e4570e47
Summary:
There's been a new stable release and we no longer need to depend on the
snapshot releases.
Closes https://github.com/facebook/Sonar/pull/112
Reviewed By: danielbuechele
Differential Revision: D8659035
Pulled By: passy
fbshipit-source-id: 83763e521ffd53e031664e3b1d2714df769d1557
Summary:
On certain samsung devices, the 'run-as' command, inside adb shell doesn't work.
We don't yet have a workaround for this, otherwise potentially upgrading to android 8.
Distinguish these errors (log them so we'll see how often it happens), and tell the user why it's not working.
Reviewed By: danielbuechele
Differential Revision: D8638728
fbshipit-source-id: f4764120cc27187330a3f236636292a5e63e8ec9
Summary:
This make use of the the setup we have at Litho, which should make
it easier to keep them in sync.
It creates proper source jars, AARs (without bundling in unwanted
transitive deps) and POMs.
Closes https://github.com/facebook/Sonar/pull/104
Reviewed By: priteshrnandgaonkar
Differential Revision: D8638912
Pulled By: passy
fbshipit-source-id: ff4921c0683e9b6f859085b542ceae840a7e8291
Summary:
There are 3 sources where plugins can be loaded from:
* `src/plugins`
* `src/fb/plugins`
* any path specified in `~/.sonar/config.json`
Plugins found in the first two directories are bundled with the app when building.
Reviewed By: jknoxville
Differential Revision: D8636061
fbshipit-source-id: 2064090d43d11695ffd99df195e5b594559fe087
Summary:
delayedUnsafe() is unsafe because it disregards the executor you have specified, and uses the default one.
Depending on the context, this can sometimes be an InlineExecutor, and since some of the scheduled jobs, schedule instances of themselves, this can cause infinite recursion to occur.
Fixing this by using the safe variant of delayed, and also using a new instance of IOExecutor.
We need a new Executor for the Sonar loop, because if we use the same worker thread as is provided to RSocket, we get deadlock when we wait for rsocket to connect.
Reviewed By: danielbuechele
Differential Revision: D8617679
fbshipit-source-id: 51ab3224b93e774596a8799338e7391e2eb956cb
Summary:
We've replaced the global console.* methods with those in the Logger.
The OSS Logger uses a different implementation to the internal fb one, and it still calls back to console.*, causing a stack overflow.
Fix it by removing the console calls from Logger.js.
Logging to the original console methods is done by the Proxy in App.js.
Fixes#101
Closes https://github.com/facebook/Sonar/pull/102
Reviewed By: priteshrnandgaonkar
Differential Revision: D8617042
Pulled By: jknoxville
fbshipit-source-id: 055bf0e1a2fba8ad5312c88fa97a44389eb52390
Summary:
With this fix the entire android setup builds with gradle ✨. To try out the sample app, run `./gradlew :sample:installDebug`
Closes https://github.com/facebook/Sonar/pull/103
Reviewed By: danielbuechele
Differential Revision: D8618622
Pulled By: priteshrnandgaonkar
fbshipit-source-id: 62a038f95c37cbadf48636a58ca222c8162e256e
Summary:
Refactors the plugin architecture of Sonar:
- Before plugin rendering had it's own implementation of the react lifecycle. This means the `render`-function was not called by react, but rather by the application it self. In this diff, the render method is now called from react, which enables better debugging and allows react to do optimizations.
- Business logic for querying emulators is moved away from the view components into its own dispatcher
- All plugin handling is moved from `App.js` to `PluginContainer`.
- The sidebar only shows one selected device. This allows us to add the screenshot feature as part of the Sonar main app and not a plugin.
- This also fixes the inconsistency between the devices button and the sidebar
Reviewed By: jknoxville
Differential Revision: D8186933
fbshipit-source-id: 46404443025bcf18d6eeba0679e098d5440822d5
Summary: The `Client` and `Server` code was in one file, which was messy. This splits it into two separate files.
Reviewed By: emilsjolander
Differential Revision: D8186932
fbshipit-source-id: faa79d7dccd867d69ccd1bccd43a2cf85314b1b3