Make non visible views non opaque

Summary: On certain apps there are a lot of views that have zero size and this isnt clear from the tree view. This will help

Reviewed By: lblasa

Differential Revision: D47917167

fbshipit-source-id: 180ef1cf34c3735acfd54d3498db9d29f759d959
This commit is contained in:
Luke De Feo
2023-08-01 10:32:29 -07:00
committed by Facebook GitHub Bot
parent 1cf0527a51
commit 09042ec5d6

View File

@@ -446,9 +446,12 @@ function TreeNodeRow({
}
function TreeNodeTextContent({treeNode}: {treeNode: TreeNode}) {
const isZero = treeNode.bounds.width === 0 && treeNode.bounds.height === 0;
const invisible = treeNode.hiddenAttributes?.['invisible'] === true;
return (
<Layout.Horizontal
style={{
opacity: isZero || invisible ? 0.5 : 1,
alignItems: 'baseline',
userSelect: 'none',
}}>