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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ce1fdfdf19
commit
795d1de10d
@@ -131,7 +131,7 @@ export const Visualization2D: React.FC<
|
||||
const onClickOverlay = () => {
|
||||
instance.uiActions.onSelectNode(hoveredNodeId, 'visualiser');
|
||||
if (hoveredNodeId != null) {
|
||||
instance.uiActions.onCollapseAllNonAncestors(hoveredNodeId);
|
||||
instance.uiActions.ensureAncestorsExpanded(hoveredNodeId);
|
||||
}
|
||||
|
||||
if (targetMode.state !== 'disabled') {
|
||||
|
||||
Reference in New Issue
Block a user