Component level visibility has no effect on child elements
keresztg opened this issue · 6 comments
Hi!
If I make a component invisible its children are still rendered in Full Mode. They will disappear only if I make them invisible one by one.
This is the base in Figma when everything is visible:
The corresponding JSON created by figma-low-code's download.js:
app-visible.json.txt
The corresponding JSON when only the component is invisible:
app-only_component_invisible.json.txt
And only in this case will the "child component" text layer become invisible in the Vue.js app:
The corresponding JSON:
app-text_invisible_aswell.json.txt
Thanks,
Gábor
Thanks! I will take a look what is wrong!
I made some more testes and concluded that the above example is a little bit too synthetic. Usually there's a frame/screen above the component which does not effect the problem but results a different component tree.
So here is the extended case:
letter case test.fig.zip
I played with the visibility of Comp1Instance and the following JSON files were created:
0-app-all_visible.json.txt
1-app-instance_invisible.json.txt
2-app-instance_children_invisible.json.txt
Also looked around FigmaService.parseElement
method and it seems to me that parsing the child elements are probably not necessary if the current element is not visible.
So basically moving the "Go down recursive..." block inside the (!isIgnored&&!isInsisible)
block solved my particular problem but I'm a little bit unsure whether this covers all the possible cases.
Thanks,
Gábor
Hi,
can you update to 1.0.8. I believe I have fixed the issue.
Thanks for the help.
Hi!
I confirm that version 1.0.8 solves my base problem.
However fiddling with my first synthetic example I have observed that making a frame/screen invisible has no effect on its child components.
Are the top level objects handled elsewhere? Should I create a new issue for this case?
Thanks,
Gábor
Hi,
thanks for finding the next bug:D. Try 1.0.9...
Hi!
Yes, version 1.0.9 solved that problem as well.
And I would not call that a bug. Call it a missing feature instead. ;)
Thank,
Gábor