Summary:
Context: https://fb.workplace.com/groups/flippersupport/permalink/804152663398727/
This gives flipper the location of every node, in relation to the entire screen. This allows it to visualize the position of each node on it's own diagram, overlayed over a screenshot for example. The use case in mind is after importing flipper data, you'll still be able to see layout nodes overlayed over a screenshot taken during export.
Currently this is only added to Android Views, meaning we don't get it for Litho views or anything on iOS.
This is basically to get something working end-to-end, and if it's all good, then I'll add the other types of views.
Reviewed By: passy
Differential Revision: D19747691
fbshipit-source-id: 8ba3aae6b7685de6faaf55b9628c200802801db4
Summary:
mityal implemented a new check for nullsafe to warn about potentially
incorrect overrides of `equals` method (not yet released).
While testing some other things I stumbled upon incorrect `equal`
overrides in Flipper, particularly not properly handling `null` param.
Reviewed By: passy
Differential Revision: D19639882
fbshipit-source-id: 7f9aec7270e89a906810807f6849628967047b2a
Summary:
## Summary
Resolves https://github.com/facebook/flipper/issues/607
This removes stetho dependencies directly in favor of just copying in the used classes. This removes the last non-androidx dependency from the project, and is useful as stetho appears to be unmaintained. The fresco stetho dependency appeared to be completely unused.
## Changelog
Remove stetho dependencies. It was unused other than a few utility methods, but came at the cost of preventing Flipper consumers from completely removing dependencies that hadn't updated to Androidx yet.
Pull Request resolved: https://github.com/facebook/flipper/pull/762
Test Plan: Existing tests still pass with no regressions. Functionally this should be no difference.
Reviewed By: jknoxville
Differential Revision: D19577969
Pulled By: passy
fbshipit-source-id: b277ddf97a9d2c846dd0b9227c02bb46c1ecd930
Summary: Currently we dont describe a `Window` object at all. Now we how the relevant theme data associated with the window.
Reviewed By: passy
Differential Revision: D19550049
fbshipit-source-id: 29903fb487b0be91d305f3b8d8fa7e4c3b3213e9
Summary:
The FB4A SQLite database plugin has to be opened 4-5 times before it shows a list of databases. This is because some databases are encrypted and can't be opened. In this case the code throws and exception and we do not catch that, causing the whole load process to crash.
Now catching the exception and returning an empty list.
Reviewed By: jknoxville
Differential Revision: D19463876
fbshipit-source-id: af8c9a70dc2761e62088d90ce89f8d16057e8745
Summary: This was a failed attempt to fix invalid initialization, but just means it fails elsewhere, so undoing this change.
Reviewed By: passy
Differential Revision: D18685054
fbshipit-source-id: fc460ee7cacc8cb89ee2a22243f9738383cbba43
Summary:
If something calls FlipperClient.getInstance(), it will start a new thread and try to start the client. If this is in a context that will fail, like a process that hasn't loaded the .so, then it will fail, but we don't know who started the thread. This adds logging before spawning a new thread so we can see the stack trace of the culprit.
It might want to throw an error instead, that will help track down the culprit of such initializations, but this is a less intrusive change to just stop the failures from happening, to start with.
Reviewed By: cekkaewnumchai
Differential Revision: D18658972
fbshipit-source-id: 2433d4d6ef411d4fb28f31e27bcef702c5a8f4db
Summary: We're seeing some cases of initHybrid failing when the C++ class hasn't been registered. I don't think we should be attempting to init in these cases, so gating it by the same logic as when we load the static library.
Reviewed By: priteshrnandgaonkar
Differential Revision: D18658101
fbshipit-source-id: b29592135dcf637a8c0d40aee30e383f4f35e527
Summary: Show the simple name instead of the node info class since this is taken into account for the attributes.
Reviewed By: jknoxville
Differential Revision: D18574219
fbshipit-source-id: 4b134e8be18c313e08df423dcdbe286d96c80b56
Summary:
If we move the permissions into the library itself, the manifest
merger will take care of adding them to consuming applications,
making setup instructions easier.
## Changelog
Move required permission declarations into flipper-core
Pull Request resolved: https://github.com/facebook/flipper/pull/593
Test Plan:
Using aapt we can dump the permissions of a sample app.
`$ANDROID_HOME/build-tools/29.0.2/aapt d permissions sample-debug.apk `
```
package: com.facebook.flipper.sample
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.FOREGROUND_SERVICE
```
Reviewed By: priteshrnandgaonkar
Differential Revision: D18006323
Pulled By: passy
fbshipit-source-id: c4cf28ee698faa3e2b631462f2953976135b299c
Summary:
see https://github.com/facebook/flipper/issues/450
If we want to control a custom SharedPreferences, we can create a Class as SharedPreferencesDescriptor's Subclass, override the getSharedPreferences() function to return a custom SharedPreferences instance.
## Changelog
add getSharedPreferences() function in SharedPreferencesDescriptor Class
Pull Request resolved: https://github.com/facebook/flipper/pull/571
Test Plan: No
Reviewed By: jknoxville
Differential Revision: D17738675
Pulled By: passy
fbshipit-source-id: d227e7d6461194f7a01ae7b2ba53434dd71fc0d2
Summary:
I missed these. :(
Open source CI is unhappy about this - for good reasons.
Reviewed By: jknoxville
Differential Revision: D17500071
fbshipit-source-id: 96106f660dee59985c51e2635321ab4ad00a795a
Summary:
Breaking Litho/Sections off. Doesn't really make sense to have
two deps for this especially since they're pretty tightly coupled.
This makes our core already quite slim.
Reviewed By: jknoxville
Differential Revision: D17420118
fbshipit-source-id: 9a03911f4af6410745b9aefd0e6a75bdf106660f
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/548
First project to pull out of the "fat distribution" we currently have.
Still needs setup for Maven and registration in Bintray.
Reviewed By: jknoxville
Differential Revision: D17395660
fbshipit-source-id: 6244495a2e25d705dd930ef87c7e5e1f038eb921
Summary: Show info about the event which triggered a new changeset generation; in case of a state update, also show the name of the method which triggered the state update.
Reviewed By: pasqualeanatriello
Differential Revision: D17162202
fbshipit-source-id: ebf218f8ce71799e4dd452f54b1621af7f83cc51
Summary: Use the string sent from the client to show which section triggered a state update.
Reviewed By: pasqualeanatriello
Differential Revision: D17162190
fbshipit-source-id: a72eea1c6fc0fba851028aa050f0c6772a590e8d
Summary:
Show the section which triggered the state update in the tree hierarchy.
We can't use the attribution param that was being passed from SectionTree because it contains the key of the section, not the global key.
Reviewed By: pasqualeanatriello
Differential Revision: D17161730
fbshipit-source-id: bae5e509c378ffdf210acac6564212c873c5855b
Summary:
The navigation plugin supports logging of a date and the class name. This addition adds that support.
I have kept the previoius method which I will remove once I update the fb4a navigation plugin integration.
Reviewed By: danielbuechele
Differential Revision: D17202996
fbshipit-source-id: eac95328a6e2278c3a27ca608b9b675c8efe4528
Summary: The SingleComponentSection doesn't store anything in the data field unless it's set manually by the dev; this adds custom info about the prev and next data so we can use it for debugging
Reviewed By: pasqualeanatriello
Differential Revision: D17112284
fbshipit-source-id: 55aa49583e3bc7d046661d34841b7c3283972d76
Summary: utils used by redblock and layout plugins were incorrectly checking node instead of childNode for listviews that have non-visible children
Reviewed By: nscoding
Differential Revision: D16897804
fbshipit-source-id: 8f62956c57568694db76030377552e43ce3a9216
Summary:
Here I have an early version of the Navigation Plugin (Android) for Open Source.
A lot of apps will be using there own Navigation framework for handling deep links. In order to keep things as simple as possible, recording navigation events is done through a single function that can be called from anywhere in the app. This will allow users to place this function in there own navigation frameworks and use there own logic with it.
Seperately, I have shown how this can be used with our Android sample app. I use the built in Android intent-filters to provide a demo of how this can potentially be used, and to form the basis of the docs that I will write.
Reviewed By: passy, danielbuechele
Differential Revision: D16828049
fbshipit-source-id: 22765f63ca0c471689d2ec5865fdfc155b92697f
Summary: This updates the implementation of the export of the fresco plugin on the android side. Initially we used to send all the images info in one call, but its not scalable, as the images increase, the payload size of the rsocket can increase which will lead rsocket to drop messages. This diff updates the implementation of android side to match the one on the iOS side.
Reviewed By: passy
Differential Revision: D16627823
fbshipit-source-id: 563bf5fb20595c198b6447bb4e41f04af6e46644
Summary:
- fix mutual selection of elements in ax and non-ax tree (simplifies linkedNode logic as well)
- remove unneeded extraInfo attributes (focused, nonAXwithAXchild, & hasAXNode were not/no longer being used)
- use 50/50 fixed width view for trees when both are visible
Reviewed By: jknoxville
Differential Revision: D16390355
fbshipit-source-id: bbf9ea887f8f1035df8b4b0562ddcc4de291f004
Summary: Talkback prepends "password" on focus for password editText outputs. Flipper's AccessibilityUtil should include this case.
Reviewed By: blavalla
Differential Revision: D16427345
fbshipit-source-id: 28afdd196973539618b73824671ef02128a4e9ab
Summary:
This displays the data models passed to the Sections in the side panel when a data node is clicked. This does not change the collapse behaviour when a Section node is clicked.
To make it easier to associate a section with its changesets, appended the global indexes a Section is responsible for to the node label.
Reviewed By: passy
Differential Revision: D16283820
fbshipit-source-id: f1149f47dff448de05d919f7f8d16a2aba53bbb0
Summary:
This colours data model nodes in the tree to show how they were part of the current changeset: whether the data model caused an insert, update, remove etc.
This also adds phantom Section nodes for Sections that were completely removed from the tree; this is helpful for debugging cases where a section's key changes without intention, causing items to be completely removed and inserted.
Reviewed By: topwu
Differential Revision: D16165767
fbshipit-source-id: a011666dce33e4d757fb415e71ba163aa334f6e6
Summary: the side panel displays information with the changesets that were applied for each section
Reviewed By: adityasharat
Differential Revision: D16131069
fbshipit-source-id: d03547148e483e196600191291e58a13acf505c3
Summary: Create Sections hierarchy from data received when a changeset is applied and send it to the plugin to render it
Reviewed By: adityasharat
Differential Revision: D16120480
fbshipit-source-id: 30b824d8d6e65b537c3e98b7ee3438055f6f1ec2
Summary:
This hooks up the listeners that send events from the SectionTree to the desktop plugin. gradle build will fail until I release a new Litho version with D16120818
ChangesetDebug receives events on every valid changeset, it will parse the data into Flipper objects and pass it to the desktop client to render it.
Right now this just sends an event with empty data
Reviewed By: adityasharat
Differential Revision: D16121473
fbshipit-source-id: eeef92cea7dae836861d417ed6a00fcb11901e78
Summary: Adding the auto-genrated scarf files from creating the Flipper navigation plugin. GK for this plugin is flipper-navigation.
Reviewed By: jknoxville, danielbuechele
Differential Revision: D16119841
fbshipit-source-id: 74e19c82dc95e73fe2ae06d1eb8cef2456b81931
Summary: just the skeleton for the android plugin
Reviewed By: passy
Differential Revision: D16006791
fbshipit-source-id: b0fe2143afeab6bc0671b7ad5a3ccfbccdd6e40a
Summary: Getting the "definition" of the database was originally on the GetTableStructure endpoint. This diff moves it to a new GetTableInfo endpoint
Reviewed By: jknoxville
Differential Revision: D15902619
fbshipit-source-id: ac136d24ee577711366636801b5d74d83fbc523f
Summary:
deepLinkPayload is passed as initialQuery to Search component and in componentDidMount we perform search if initially query is defined.
This does not handle the case if node is not present in the layout inspector tree.
Reviewed By: danielbuechele
Differential Revision: D15874343
fbshipit-source-id: c604baea16838f07e8f8bfc0f1e67c5e830dfe97
Summary: Transfer it from the device, reformat the notification to make use of it.
Reviewed By: danielbuechele
Differential Revision: D15779267
fbshipit-source-id: 747dc7f895528618ff6a07c15b7f72bf6a1adde9
Summary: Need a Fresco release including the previous diff first.
Reviewed By: danielbuechele
Differential Revision: D15762090
fbshipit-source-id: ec30778ffc1cd3e48dcfc4d514a9ba13fb26fd75
Summary:
This makes it easier to track down leaks as we currently only have their class names. There are some limitations if this is creates on a separate thread, but that can be addressed separately.
This does require temporarily removing the Flipper integration as the interface changes in a backwards-incompatible manner. This will be restored with the next diff in the stack.
Reviewed By: oprisnik
Differential Revision: D15760947
fbshipit-source-id: 3a5c48f6244f1afc8b7e00230bd1ae2f197e6cdf
Summary:
`/*` is the standard throughout open source code. For example, Firefox uses single /*: https://hg.mozilla.org/mozilla-central/file/21d22b2f541258d3d1cf96c7ba5ad73e96e616b5/gfx/ipc/CompositorWidgetVsyncObserver.cpp#l3
In addition, Rust considers `/**` to be a doc comment (similar to Javadoc) and having such a comment at the beginning of the file causes `rustc` to barf.
Note that some JavaScript tooling requires `/**`. This is OK since JavaScript files were not covered by the linter in the first place, but it would be good to have that tooling fixed too.
Reviewed By: zertosh
Differential Revision: D15640366
fbshipit-source-id: b4ed4599071516364d6109720750d6a43304c089
Summary: Includes the LeakTracker interface change. Restores the temporarily deleted tracker, wires it back up. Requires Fresco 0.14.2 being released which has yet to happen.
Reviewed By: oprisnik
Differential Revision: D15655667
fbshipit-source-id: ab4361be35101efe7564dfdd7a69cba93135eb7e
Summary:
Ugh, this is the only way we can land the API-breaking next diff. Will
be reverted straight after.
Reviewed By: oprisnik
Differential Revision: D15655666
fbshipit-source-id: c9318e348c187de4562a9a636287cfa7b523356f