Commit Graph

5 Commits

Author SHA1 Message Date
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