Summary:
Listen to framework events and store in a map based on node id
Added UI to allow for monitoring framework event types.
The event type is a string separated by : Each segment of this string represents a level in the dialog hierachy. For example Litho:Layout:StateUpdateSync would have levels, Litho Layout StateUpdateSync
When event type monitored and event comes in for a node flash the visualiser node briefly
Reviewed By: lblasa
Differential Revision: D42074988
fbshipit-source-id: 52458ad87ab84bf7b1749e87be516ed73106a6c0
Summary: We are using frame time on android so make sense to present it
Reviewed By: lblasa
Differential Revision: D42996555
fbshipit-source-id: 595a08571ccd82de0761cfeea8a204e576981ee0
Summary: For deep nested hierarchies, the current offset was too big making the hierarchy almost un-browsable. The current offset seems to work better.
Reviewed By: LukeDefeo
Differential Revision: D42996296
fbshipit-source-id: 808a2ecc32aff2d8d252bdb9f653344866e5653b
Summary:
^
Only for iOS this time.
Note: passing the device OS freely to the main component as this is just temporary code that will be deleted soon.
Reviewed By: antonk52
Differential Revision: D42990221
fbshipit-source-id: 41b4107caa6bf312191889af75afd28873f6eda5
Summary: The call to myles was a little slow and very cachable so use react query. Additionally it depends on VPN / light so added an error state to make that clear.
Reviewed By: lblasa
Differential Revision: D42990344
fbshipit-source-id: 8d6ad20aea79f1972a7cf1f61f8af729e5f3464f
Summary:
- Vertically center values
- Add gutter between rows/cols
- Tryout the removal of the indentation border (it could either be removed in the future or brought back)
Reviewed By: antonk52
Differential Revision: D42581663
fbshipit-source-id: cd682adca7f76f80240a0ca6d9023368a33453c3
Summary:
^
Not removing the component, yet, as we may re-introduce the survey once we officially release on iOS.
Reviewed By: antonk52
Differential Revision: D42499399
fbshipit-source-id: 596ebda7acf39c0b8377bbd3a1a8f4dfa81e59a4
Summary:
1. Greater spacing between levels
2. Align children when one has chevron and another doesnt
3. Allow searching of inline attribute values
Reviewed By: lblasa
Differential Revision: D41955235
fbshipit-source-id: aa6bce71810a32cd218db790287aaaf506df75b7
Summary: There is no reason to have a context menu rendered by react for each item in the tree, its pretty wastefull. It also means less props drilled to the tree node
Reviewed By: lblasa
Differential Revision: D41872778
fbshipit-source-id: b13491a310c03334d7f3056207f5de23d20c3e61
Summary:
1. only useValue from tree root
2. Pass down props for ui state instead subscribing ad hoc
3. Pass down callbacks, instead of updating atoms ad hoc.
4. Create ui actions object holding api, will use this later on in the vizualizer as some of the same
In general its more verbose but with memoizing perf should be fine should hopefully be easier to reason about components and what they can do as things are more explicit
Hopefully this serves as a general template for how to organise the react code going forward
Reviewed By: lblasa
Differential Revision: D41872490
fbshipit-source-id: 94a33b0e951c04df367ba102fa0a097d4a0389cd
Summary:
This is temporary solution to get to parity with the old plugin. In future would like to make this more flexible on the desktop side
Additionally getData was renamed to getAttributes for consistency
Reviewed By: lblasa
Differential Revision: D41845248
fbshipit-source-id: 50e94a7712f5d42938229134e212cef5d379475d
Summary: While moving mouse and changing hover state react render is under 1ms due to subscribing to state rather than passing hover as prop to all components
Reviewed By: lblasa
Differential Revision: D41838168
fbshipit-source-id: c9b3334adc44df5018e0a785684a2883aeb3bab1
Summary: The old implementation would always rerender on every operation (select, hover etc) and was quite slow for large hierachies
Reviewed By: lblasa
Differential Revision: D41838166
fbshipit-source-id: 1270841027926440a9c1f1a846d3aedc75ffe8bf
Summary:
The root view resolver will always find all root views but there was a bug in the listrootviews method. The code was very complex and most of the code seemed to be unneeded. Its now working. The listrootviews method now just returns teh contents of the observable array.
The reason we needed this is that Certain activities dont seem to tracked by the listener we add to `registerActivityLifecycleCallbacks` Its as if there is a floating decor with no activity. One example in FB4a is clicking on a notification in the notifications panel
Reviewed By: lblasa
Differential Revision: D41522791
fbshipit-source-id: b49b0104ddf758f097e1fd3f9ac6588de2d3646e
Summary:
This change adds a small feedback alert banner. It will have a link to our workplace feedback group.
Additionally, it asks engineers to record their sessions.
Reviewed By: LukeDefeo
Differential Revision: D41531851
fbshipit-source-id: 7ec8ca79350e7a84ab0532065bc57187ef0055ba
Summary:
Attributes Inspector didn't have support for inspectable arrays.
This change addresses an issue with the inspectable itself and adds basic support to it in the visualiser.
Reviewed By: LukeDefeo
Differential Revision: D41522879
fbshipit-source-id: f9cad42470541039c8157477b0fe9bc58f18f1ba
Summary: also made the controls component full width to push down the visualiser
Reviewed By: lblasa
Differential Revision: D41548665
fbshipit-source-id: 2bca527e70c92bc0ded120e51a0880f76f7cca87
Summary: This was causing the hover state to linger which is now quite noticable in the tree
Reviewed By: lblasa
Differential Revision: D41548249
fbshipit-source-id: cdf8ed434aa064dba05ebf31773bedaef18ba007
Summary: With the previous approach it was hard to read the name of the node, this should be a lot clearer. The tool top comes in a after a delay, the reason for this is because when i tried without a delay when you moved the mouse fast a ton of tooltips would appear and disappear when you passed over diffferent nodes and it was very distracting. 200ms seems to be about the sweet spot
Reviewed By: lblasa
Differential Revision: D41548248
fbshipit-source-id: 76460347730d5b1d2e968984e845be0c65255456
Summary: There were a few subtleties around what to the auto expanding / collapsing for active children but otherwise this is quite straightforward
Reviewed By: lblasa
Differential Revision: D41548252
fbshipit-source-id: c153d00210d859463a51753dadf2e5aabeb7ea35
Summary:
Remove checkbox as we currently don't support editing values.
Instead replace with a simple 'TRUE', 'FALSE' text.
Reviewed By: antonk52
Differential Revision: D41532898
fbshipit-source-id: d4af37e30eb21ab761c39cb4ae45337247c80c9d
Summary: Should be a bit easier to see what UI state we are holding at the plugin instance level
Reviewed By: lblasa
Differential Revision: D41498272
fbshipit-source-id: 6d88086766efd9c39f71be7e2ce32c5058494c96
Summary: We have to do a couple of odd things to get the context menu items to behave. The code was duplicated between tree and visualizer. This custom component removes duplication and makes the approach a bit clearer (via js doc)
Reviewed By: antonk52
Differential Revision: D41495718
fbshipit-source-id: ec98d5101e636a2c9034c656d29991d4fe348762
Summary: Added context menu to visualizer similar to what we have on the tree
Reviewed By: lblasa
Differential Revision: D41494948
fbshipit-source-id: 0cfa4c98b7a68462a7103ed1ce9eaaff8c99aeee
Summary: Mouse over event still fires for the dom nodes behind the context menu modal. This will cause state changes and rerenders. Some of the state the context menu depends on can change so it would cause the context menu items to change while its stil open. Now we dont fire those hover state changes while context menu active
Reviewed By: lblasa
Differential Revision: D41494947
fbshipit-source-id: 17918f15d74230d9c7070a4de7a0a0ce10a08001
Summary: If a node has a global negative offset (e.g from a view pager) its position will be outside of the visualizors bounds and could potentially be where the tree is. The user doesnt see the wireframes since overflow hidden is on the parent node. A situation can arise where when the mouse is over the tree the hit test returns an offscreen node and causes us to hover a random node rather than the tree node hover effect taking place. We are just adding a guard to say if the mouse is outside the dom rect for the root visualization node than dont run the hit test
Reviewed By: lblasa
Differential Revision: D41493001
fbshipit-source-id: ea7974de7f2b80126d52490526a21e2a3b487d3d
Summary: Introduced an outer div which is the size of the real root node so that focusing doesnt shift the UI.
Reviewed By: antonk52
Differential Revision: D41492999
fbshipit-source-id: 336104e5d18d773953e0a58a699acc7660c4045f
Summary: Added context menu to tree nodes that 'focuses' a node. This will make the node the root of the tree. Focus state can be removed again via context menu but we could add a permanent button in the future
Reviewed By: lblasa
Differential Revision: D41493002
fbshipit-source-id: 43ec7a25aeea0b169cbcbb1ac20ac22ea893fee2
Summary: In order to support focus mode we need to have only 1 snapshot. In practice this is the case but we are making this more apparant in this diff.
Reviewed By: lblasa
Differential Revision: D41493003
fbshipit-source-id: 19ed7213d15adaea4732f4ec60309efa8dae6f94