This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Sigurd Tapio Mannsåker
Posted May 10 - Read on Facebook

Is there any way to stop the Sketch importer from numbering layers with conflicting names? For large projects, it gets hard to come up with new names for every "icon", "label", "button" etc :) I personally prefer using generic names for stuff and using childrenWithName() to navigate the layer hierarchy.

1 Comments

Trevor Phillippi

AFAIK this is the default behavior for the importer moving forward, and I do understand the tradeoffs and can understand why the decision they made is best, which is namely that referencing sketchImportedLayerGroup.someSublayerName will behave predictably. If you by accident duplicated a group in Sketch before, or somehow changed the layer order, you could fuck up your whole prototype without realizing it. Point being I actually share your workflow and had to adjust to the new importer.

My solution was to augment the Layer prototype with some new methods to be able to maintain my existing workflow. Maybe these will help you! https://gist.github.com/tjphilli/33875f9b9c4e5265c847ca0b74bc827d

Read the entire post on Facebook