Summary: This was causing all observers to continuously traverse all children since most observers traverse on subscribe
Reviewed By: lblasa
Differential Revision: D40021835
fbshipit-source-id: 6a6fba02523848be37f5e939c7a240ff2958daca
Summary: Moved to separate directory. These additional descriptors are useful for debugging the implementation but might not be useful for the end users so could potentially be removed down the road
Reviewed By: lblasa
Differential Revision: D40021834
fbshipit-source-id: f88c1186dd65cdabc816d5cd8256bb81c404a80c
Summary: There are other situations where we want to overide the offset than for litho mounted views
Reviewed By: lblasa
Differential Revision: D40021833
fbshipit-source-id: 1411a4a67e88f6893bb38e36fb6a81eead3edd1a
Summary: External frameworks such as litho add their descriptors with register descriptor, we need to make sure that we set up the superclass chaing for these
Reviewed By: lblasa
Differential Revision: D40021843
fbshipit-source-id: 41666e5e3a31f249f7dfd550c15d747d394d2a8f
Summary: This chaining needed to be removed to allow for litho view to override the children to be the root debug component
Reviewed By: lblasa
Differential Revision: D40021839
fbshipit-source-id: 1caf30ced14cf582f9e03e87e15f9a8eda5b9c4f
Summary: This is usefull to make sure the ui debugger sees changes from value animators
Reviewed By: lblasa
Differential Revision: D40021838
fbshipit-source-id: 1fe18b79a89b43f286aa4e90aa6e850db3e887a5
Summary: When running in the background in a large app like fb4a it can take a while to reprocess all the events, we can revisit this in the future
Reviewed By: lblasa
Differential Revision: D40021842
fbshipit-source-id: 8e5300e0f8534525bd184c029e523f05f4076695
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/4177
^
In an attempt to fix Github actions, may or may not work.
Reviewed By: aigoncharov
Differential Revision: D40074397
fbshipit-source-id: e88039c56876ca21657db4a6d872c46294a4f8c3
Summary: It didnt need to exist and can be seen as a subtree update of type full scan
Reviewed By: lblasa
Differential Revision: D39731552
fbshipit-source-id: e351413d9480e118fc000c5e55eae0e7980233f2
Summary:
This change removes the getSnapshot implementation from ViewGroupDescriptor.
Instead we rely on the chain implementation to get one.
Once we do get a snapshot, return.
Reviewed By: LukeDefeo
Differential Revision: D39849484
fbshipit-source-id: bfa0b1af22cf501777687295b8d792f8144a8d3b
Summary:
This change aims to reduce the number of bitmap pools by definiting a default pool which can contain bitmaps of different sizes.
A side benefit is that this single pool facilitates handling the case where a view gets resized too.
So overall, this should be both more generic and efficient compared to the previous approach.
Reviewed By: LukeDefeo
Differential Revision: D39815821
fbshipit-source-id: e0aa17ba55db07b74d8f22ea16e0c864288fb169
Summary:
DecorView owns a BitmapPool to take snapshots of the view. These snapshots are later on serialised by the manager.
There's a couple of unrelated changes in this diff but that were already in place making it hard to split.
(1) Renamed 'traverseAndSend' to 'processUpdate'. Why?
The observers as a whole shouldn't necessary know that their 'observation' is being sent to any place. Future changes should move the send logic altogether from the observer too. But that can be made within the scope of a different diff.
(2) There was a bug for nodes that were being observed but then unsubscribed from. If the nodes were being marked for observation and observer was already into place, these were not being told to subscribe again for changes.
Reviewed By: LukeDefeo
Differential Revision: D39812943
fbshipit-source-id: af98c5caf54e1c69f97043bae95049395a2e4545
Summary: Addresses a few issues with the existing implementation.
Reviewed By: LukeDefeo
Differential Revision: D39812624
fbshipit-source-id: 6f955f62bc5a7943558541e4cf7b4ccba4fd9be3
Summary:
Bitmaps are not cheap to create. Also, bitmaps are used from the main thread to capture the contents of a view but can be used and processed by background threads.
BitmapPool aims to solve both problems.
- It is a pool that can be used to recycle bitmaps.
- The recyclable bitmap can be processed by a background thread which can explicitly recycle the bitmap once done with it, hence putting it back into the pool.
UPDATE: D39815821
That diff changes the approach by defining a single default pool which can handle bitmaps of different sizes.
Reviewed By: LukeDefeo
Differential Revision: D39812212
fbshipit-source-id: 065eea656f4139aeb9d09cd5a5c7dddfc9c8edfd
Summary:
This change introduces a new Descriptor method to obtain snapshots of an item in the layout hierarchy.
Only implemented by the ViewDescritor but it can be potentially extended to Windows, Fragments, Activities, ...
Reviewed By: LukeDefeo
Differential Revision: D39690548
fbshipit-source-id: cf3a1ccd63eb28c1de328310e8635829a40964dd
Summary:
Cleanup documentation as with the other traversal, no raw loops.
Note: about no raw loops philosophy
To make clear and explicit the intention of the code, in this case to iterate over all elements of a collection.
A raw loop exposes unwanted flexibility which makes it hard to reason about code. A raw loop body thus have control over the lifetime of the loop itself.
- continue
- break
- return
None of those can be used with a forEach for example. Thus we make it clear the intention of the code.
Reviewed By: LukeDefeo
Differential Revision: D39652960
fbshipit-source-id: ac660dc43256e7850bd18e31b00aa123783d5c98
Summary: It was always the system hash code and in many places it was inconvient to get the descriptor to just end up calling the same function
Reviewed By: lblasa
Differential Revision: D39700215
fbshipit-source-id: b1439d56cd8f39ba8735f933662ad79b87ffbdbe
Summary: The old full traversal was not needed as the partial traversal is a superset of the functionality and it was a pain to maintain both
Reviewed By: lblasa
Differential Revision: D39700216
fbshipit-source-id: 0b028995a59f7c5ea4318add8b0534851ca99547
Summary: We had an issue where the offset for a native view was effectively caclculated twice and summed, once by litho and once by android. Given the UI debugger expects a nodes bounds to be w.r.t its parent the android systems x,y offset is 'wrong' from ui debuggers perspective, we set it to 0,0 and rely on the calculated offsets by the litho component hierachy
Reviewed By: lblasa
Differential Revision: D39695663
fbshipit-source-id: d9c2be950fc68bc2286359a62746356e89299cfd
Summary: This is to support a future diff where we will draw a basic wireframe for debugging
Reviewed By: lblasa
Differential Revision: D39509407
fbshipit-source-id: d99fd6fe39404996a0ed944c10905331262fd0c6
Summary: It was building at target sdk 0 before which lead to various checks failing, in future when these checks fail we should send a notification to flipper
Reviewed By: lblasa
Differential Revision: D39652095
fbshipit-source-id: 748bc74f0b5745011e6289e5582405149df8357f
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