Summary: Catch the case when we mis the initial draw
Reviewed By: lblasa
Differential Revision: D39658946
fbshipit-source-id: 00a46226128e28a8753df2161d1edcd6ffa47d67
Summary: Previously we were cancelling the entire context which meant after reconnect nothing was sent. Additionally we now close / reinitiaze the channel so that any old events are not sent on reconnect
Reviewed By: lblasa
Differential Revision: D39658945
fbshipit-source-id: bb02724434aa820d811b49ab799a4643ab7e785a
Summary:
^
`mutableClass` should be used instead of `clazz`
Reviewed By: LukeDefeo
Differential Revision: D39652102
fbshipit-source-id: 8ba86d39796beed79ff7cf8b37f3460facc38430
Summary:
Remove usage of '!!', it is generally discourages even though instances are guaranteed to exist.
Adjust comments
Reviewed By: LukeDefeo
Differential Revision: D39575368
fbshipit-source-id: a159a0411a913de3d1ae6236c41ea15255687433
Summary: Keep a weak reference of the view instead of a strong reference.
Reviewed By: LukeDefeo
Differential Revision: D39575312
fbshipit-source-id: ae8df7d089b29ea3b1cf960a6ae020ed5a9c3648
Summary:
^
There's no way to address these warnings, so suppress.
Reviewed By: LukeDefeo
Differential Revision: D39575262
fbshipit-source-id: 6703476d7637c63aa9a81b26f8cdbd0f53e3991c
Summary: This change tidies up the traversal and removes unused LayoutVisitor
Reviewed By: LukeDefeo
Differential Revision: D39575241
fbshipit-source-id: 2ab101f74ae7b2c16ddf7016abc78a03590916b0
Summary:
^
These are the last two types imported from stetho which, if anything, can be integrated as is without having to track back to Stetho
Reviewed By: LukeDefeo
Differential Revision: D39573639
fbshipit-source-id: 8009532116ec7b2fed2751fa966269ad81a7cb00
Summary:
^
After this change lands, it is safe to remove most of the Stetho fragment support types.
Reviewed By: LukeDefeo
Differential Revision: D39460121
fbshipit-source-id: 0e7d4ce71e828ee7bc9c6e945b8fe27dbd6f08f8
Summary:
1. The base class descriptor was removed, this was given that we have chained descriptor there is no need for this anymore
2. The Base interface node descriptor no longer has a mutable list based api. You simply return a list. The mutable list based api was specifically to allow chaining and this quirk is isoltated to the chained descriptor
3. AbstractChainedDescriptor and ChainedDescriptor were merged
Reviewed By: lblasa
Differential Revision: D39496073
fbshipit-source-id: fb3ec629ec3b27f587bdbd0b323624a4bc4ebea3
Summary: Tree observer had multiple components, now their usage is clearer they are moved to separate files
Reviewed By: lblasa
Differential Revision: D39469078
fbshipit-source-id: 4d4c03aff229fd2cc0eace216144b37694637691
Summary: This is to allow us to test dialogs from the UI debugger
Reviewed By: lblasa
Differential Revision: D39468653
fbshipit-source-id: 59c759a794c42b85bc288d60e1b2c6a71e32bb3d
Summary: typing uidebugger into ADB will hit both the log tag and any thing else such as package name. Turned Enum warning down to verbose reduce load on main thread
Reviewed By: lblasa
Differential Revision: D39466932
fbshipit-source-id: 0106a042a92755cf644c0e66683e7e5993e924e1
Summary: We use the root view resolver to detect when roots have been added. We currently have some race conditions where the activity stack managed by application ref doesnt include the first activity
Reviewed By: lblasa
Differential Revision: D39466929
fbshipit-source-id: fff4f830dea337d96dd9a9956a20a080fff2e965
Summary: Each observer was doing a similar job of traversing, and setting up child observers and its easy to not clean up child observers in some cases. This provides a helper utility for the common use case
Reviewed By: lblasa
Differential Revision: D39466930
fbshipit-source-id: e74ae5c3709297b73c020cd148a0485ac9fc0f8f
Summary: The active child was only being passed for the native scan full traversal, Now we have it for the partial traversal also
Reviewed By: lblasa
Differential Revision: D39466933
fbshipit-source-id: a0e281e4f9a21bf2edd12f18ecdb68a29ead3476
Summary: Added an initial litho Tree observer and descriptors, its quiet naive and will be improved in a future diff
Reviewed By: lblasa
Differential Revision: D39466931
fbshipit-source-id: 66a462882af2e585b9719ee2f61595449f99c5e5
Summary: While looking at the event stream it is useful to know which observer type fired it
Reviewed By: lblasa
Differential Revision: D39430756
fbshipit-source-id: bc52f085a5497692f8076b12a9c015cc33a19d1e
Summary:
There is a bug in the code to get fragments from the activity.
A boolean, result from the comparison, was added to the list instead of the actual fragments.
Reviewed By: LukeDefeo
Differential Revision: D39348019
fbshipit-source-id: 669f304055f15f59b40352d86f25d768d92df76e
Summary:
Now that we have the tree observer we can make descriptors completely about describing an object. To that end we have removed init method and made them all object to indicate to future readers their singleton nature.
onGetActive child was made open instead of abstract to avoid needed to override in all subclasses
Reviewed By: lblasa
Differential Revision: D39387935
fbshipit-source-id: 802b8afdd9aa639daecf10d774ca5b960ee48003
Summary:
Added concept of a tree observer which is responsible for listening to the changes for a portion of the UI tree. This structure nests so Tree observers can hold child tree observers which emit events on a different cadence. This structure should allow us to incorporate different UI frameworks down the road as well as native android views.
We push the tree updates from the tree observers onto a channel and setup a coroutine to consume this channel, serialize and send down the wire.
Reviewed By: lblasa
Differential Revision: D39276681
fbshipit-source-id: a4bc23b3578a8a10b57dd11fe88b273e1ce09ad8
Summary: A node can have an active child, if present we assume all others are inactive and we don't traverse them. This means the activities not on top and view pager views not active will not be scanned. Additionally on the desktop we are automatically collapsing these views. The net result is a lot less work done on the main thread
Reviewed By: lblasa
Differential Revision: D39310126
fbshipit-source-id: ebd0c69d46f2d42fe42e678c8327fcdc73d08385
Summary:
^
This was replaced by `ApplicationRef`
Reviewed By: antonk52
Differential Revision: D39313539
fbshipit-source-id: ad9b5c3ed963046ba0349fd5112bb9cb5de7640b
Summary: Added simple activity to test how flipper reacts to changes in native UI
Reviewed By: passy
Differential Revision: D38704012
fbshipit-source-id: 8a593577322922c6f6f0f96dd5cb0761c3035389
Summary: Added scheduler to scan the Native UI every 500 ms to test, Also added instrumentation in a separate event with the timings of each stage visualised in a Data table on desktop which can be accessed with ctrl+I. Currently this instrumentation event is sent every time but it could be a config option controlled from the desktop in the future
Reviewed By: lblasa
Differential Revision: D39205313
fbshipit-source-id: ca034171db6b062396b4ef28028aaa663c4d852a
Summary: Move from a nested structure to a flatten one for data exchange, this will allow us to only send sections of the UI in the future
Reviewed By: lblasa
Differential Revision: D38982138
fbshipit-source-id: d578a07a6d2d7e117fbd741bd6e33062223ce10d
Summary:
Introduced a JSON like tree structure for the sidebar insepector. Descriptors can provide their data as well as if its mutable or not.
Enum mapping was simplified
Reviewed By: lblasa
Differential Revision: D38947238
fbshipit-source-id: cd8a6a8a752c5f626582ab8ac5efae6e9ff6a2ad
Summary: Filpper is doing disk IO on UI thread which actually produce `DiskWriteViolation` (presumably when the directory is not there, it will write to create)
Differential Revision: D39196484
fbshipit-source-id: f6b15785ea6ecf3ea5b41211908c14eac3d1309e
Summary:
^
The last change removed the overload of `send` in favour of `sendRaw`
Reviewed By: LukeDefeo
Differential Revision: D38946386
fbshipit-source-id: c4491c4afe4d719602c99878dc7185d436179aef
Summary:
Add a simple scheduler which operates in the following way.
There are two type of tasks: main, background.
The main task will run on the main thread whilst the background task will run on a background thread.
The main task will be executing at a fixed internal whereas the background task will get queued on demand but can effectively consume what was produced by the main task at its own rate.
Reviewed By: LukeDefeo
Differential Revision: D38975283
fbshipit-source-id: 0633385d2938705a16f5fc75a28cad067e4a8e55
Summary: This adds a simple traversal to the UI. As it stands, it will most likely be updated in future iterations.
Reviewed By: LukeDefeo
Differential Revision: D38907292
fbshipit-source-id: 98cea1f971a4ef37ba2d1c75b882dd44df29bb3a
Summary:
Scaffolded desktop UI for UI debugger
I changed getroot from an rpc call to an event sent on connect. The root should never change as its the application object.
Reviewed By: lblasa
Differential Revision: D38866008
fbshipit-source-id: ca0f1908bedb643238f11ed796922e3359619167
Summary:
Introducing descriptors. Taken from the existing inspector, refreshed with a few things from Stetho, and translated to Kotlin.
Note: doesn't use FlipperObject or FlipperArray.
This is a very rough draft for them all, but can be used as basis for experimentation.
Reviewed By: LukeDefeo
Differential Revision: D38860763
fbshipit-source-id: 9f6bf4ad0e61fc40b0a773dfb8bfa80b1f397b3a
Summary:
Introduce ApplicationRef which holds a reference to Application. It exposes a few utility methods to get view roots and activities.
ApplicationInspector has a few template methods for useful things which are not used in this diff and most likely will either be moved/deleted/changed on the final implementation.
Reviewed By: LukeDefeo
Differential Revision: D38829523
fbshipit-source-id: b8aeb133dceb3af42b5f7d6851ef531d35fc7d69
Summary:
EnumMapping and InspectableValue taken from the original 'inspector' plugin but translated to Kotlin.
Accumulator is just a Map<String, Any>
Reviewed By: LukeDefeo
Differential Revision: D38823678
fbshipit-source-id: 6af395cab2e3e6930575eb63d22d660dab962fde
Summary:
folly::dynamic, std::string, implicit constructors and method overloading is not a good combination.
This renames the send method to sendRaw as to avoid issues with existing plugins currently sending string params.
Reviewed By: mweststrate
Differential Revision: D38827539
fbshipit-source-id: 653f62e41ebfbe93d1af25f39c81f6b05bf84cb4
Summary:
^
So far, we had the 'uidebugger' plugin as a meta-only plugin.
This change moves the plugin to OSS space as it will ultimately be its right place.
It will also make it easier to iterate on it.
The plugin itself is not ready for consumption but at no point we are documenting or integrating it with our samples.
Reviewed By: passy
Differential Revision: D38742336
fbshipit-source-id: 5cf124722fa7ba75ee9b998c507bfdfb2e4782c1