figma-plugin-helper-functions / figma-plugin-helpers

A collection of useful helper functions to import to your Figma plugin project
261 stars 25 forks source link

findAll not running recursively #59

Closed oisinlavery closed 4 years ago

oisinlavery commented 4 years ago

test file: https://www.figma.com/file/sidppHshZlzQ9UM1TAfgcC/findAll-test?node-id=0%3A1

findAll(figma.currentPage.children, node => true) returns 2 nodes

figma.currentPage.findAll(node => true) returns 7 elements (the number of nodes in the file)

Screen Shot 2020-07-15 at 7 59 44 PM
alexandrtovmach commented 4 years ago

I found where is the problem is, but also I figured out that we shouldn't use this custom method: image

Figma team patched their findAll realization, and now it's faster than custom. There are no clear way to install previous version of Figma, to find where this update was, but from release log I can suggest this version: https://releases.figma.com/2020/04/figma-desktop-app-beta-8610.html

I'm going to deprecate this method, and switch back to native findAll.

oisinlavery commented 4 years ago

Thanks for investigating this Alex. Maybe this method inspired Figma to improve theirs :)