Commit Graph

8 Commits

Author SHA1 Message Date
Luke De Feo
05242b4ee9 Handle traversal error
Summary: Log as console . error so we get a log view and inform the user

Reviewed By: lblasa

Differential Revision: D50450794

fbshipit-source-id: 0eb1877eec4d602d6673dd2815af2692e89b2523
2023-10-24 04:10:29 -07:00
Luke De Feo
10d5a2933a handle error when device disconected
Summary: Log views were being generated, this seems like a reasonable solution.

Reviewed By: zats

Differential Revision: D49547368

fbshipit-source-id: 575dd81a7c9b9a831d1dfb46088c2f5e1d731f22
2023-09-25 02:02:26 -07:00
Sash Zats
1c3720fd5c Add ui-debugger modes
Summary:
## This diff: Add debugger mode infrastructure

We want to enable infrastructure allowing adding modes in the future without branching client and plugin code

This infra allows for the client to send a message informing flipper about the supported modes (following diffs)

Currently broadcasting mode change event over to the client

Reviewed By: lblasa

Differential Revision: D49385860

fbshipit-source-id: 2db6f65064d1ff7e1f57b2da93c3ed195400fb7f
2023-09-20 11:37:12 -07:00
Luke De Feo
795d1de10d Dont auto expand nodes
Summary:
Rather than automatically collapsing siblings when using the visualiser instead we take a different approach:
1. The tree starts out fully collapsed
2. Every time you click on the visualiser we expand it and its ancestory chain to expanded nodes.

This is exactly how the Dom inspector works. The previous approach of constantly collapsing all siblings when uinsg the visualiser felt too intrusive and taking control from the user. The option is still there but only in the context menu

Some ultilities around autocollapsing nodes were removed as they dont make sense anymore that we now send complete frames

Changelog: UIDebugger Tree starts collapsed and expands as you click from the visualiser

Reviewed By: aigoncharov

Differential Revision: D47949843

fbshipit-source-id: 4381d22b12874dde5a89267572bee95f084380e3
2023-08-01 10:32:29 -07:00
Luke De Feo
ce1fdfdf19 Added context menu items for collapsing and expanding nodes
Summary:
Added 3 context menu items:
- expand recursive
- collapse recursive

These are self explanatory.

I also collapse non ancestors. This collapses everything except your direct ancestor path to the root. Quite useful to refocus the tree on a node

Changelog: UIDebugger - added  context menu items for exanding and collapsing the tree.

Reviewed By: aigoncharov

Differential Revision: D47949840

fbshipit-source-id: 6eebba182fe2092fbf5f0db0ec5ff728c3900424
2023-08-01 10:32:29 -07:00
Luke De Feo
fb503a0a2f Add wireframe mode control
Summary:
This allows you to control how the wire frames are drawn, useful when there are lots of overalpping wireframes

Changelog: UIDebugger - Added wireframe mode control, useful when lots of overlapping wireframes

Reviewed By: aigoncharov

Differential Revision: D47949841

fbshipit-source-id: 72de7d085ca433557107ab0cc6e4399220836d9f
2023-08-01 10:32:29 -07:00
Luke De Feo
ab84bb9bad Add visualiser controls + target mode
Summary:
Now that we have panels for tree visualiser separately we can have visualiser specific controls. There is a dedicated button for focus mode which should make that more discoverable and a better implementation of target mode which uses a slider. This has several benefits:
1. more discoverable
2. more obvious what is going on with the text prompts and a real slider control instead of mouse enter
3. there is no context menu getting in the way of the content

Changelog: UIDebugger Add visualizer target mode feature for selecting views in the z stack easily
Changelog: UIDebugger Add FocusMode button to visualiser toolbar

Reviewed By: mweststrate

Differential Revision: D47671658

fbshipit-source-id: 6f657f9d417280627457624660b934c9898cda58
2023-07-26 03:22:38 -07:00
Luke De Feo
efb23be4cf UID Refactor 5/n Refactor index.tsx
Summary:
This file was huge and was hard to understand what was going on.  changes:

1. UIActions moved out to separate file
2. create UIstate moved out
3. All declared state (atoms or plain js objects) moved to the top of the function like a class
4. utilities moved out

Reviewed By: lblasa

Differential Revision: D47547844

fbshipit-source-id: e7fa705a14a23bff2415016a488147bed7ad9e91
2023-07-21 07:17:31 -07:00