Closed ericandrewscott closed 4 months ago
just to clarify, this would only happen when rendering children, so the bug is to not render figma.children if they are invisible? that feels like a good default to me. and ill mark this as a bug. should be a one liner
@jake-figma yep that’s exactly what I meant and what I was thinking! It’s Eric from Expedia by the way 👋
@jake-figma I forked and started working on a PR and found something interesting that leads me to believe that there might be a Dev Mode bug.
node.visible="false"
.node.visible
for a node that's hidden in the design, it's always true
.I would expect that a hidden node doesn't even make it into Dev Mode, because the designer's intent is basically that it doesn't exist at all for dev, or at the very least, that the visible attr on the node in Design Mode ends up coming through. Did I find a legit bug? I brought this up on the Friends of Figma Discord and also asked on our Slack channel that TJ, James, and Connor are a part of.
@ericandrewscott unsure what youre running into but im not able to reproduce what youre saying. the fix i pushed for this bug works and checks visibility. invisible nodes are visible: false
in the plugin api in dev mode, though they are shown in the sidebar. If you try and click them in the sidebar they select the parent. Its a good thought that we should indicate they are hidden similarly to how they are in design mode. if youre still getting this, you should follow up in the slack with the team.
Yeah I made a screen recording, and then I noticed that it's selecting the parent. I also was going to add them to the Node Params
frame, but it totally makes sense that it bubbles to the parent, and that's not necessarily helpful information since clicking them in the sidebar actually selects the parent. Thanks for updating the plugin!
In our design system, we have lots of different configurations of items, and designers sometimes often hide layers in certain variants where that configuration is not applicable. Should the templating system take into effect whether nodes are not visible before generating markup for those hidden nodes?