Figma plugins & asynchronous updates

Utopia has two Figma plugins: Fluid type & space calculator and Batch update text styles. Hopefully their names describe what they do.
They’ve both been updated to the latest Figma specs, to support a feature they’re calling “Dyn…


This content originally appeared on Trys Mudford's Blog and was authored by Trys Mudford's Blog

Utopia has two Figma plugins: Fluid type & space calculator and Batch update text styles. Hopefully their names describe what they do.

They’ve both been updated to the latest Figma specs, to support a feature they’re calling “Dynamic Page Loading”. The update process was pretty seamless, and very well documented. It predominantly involved migrating a number of functions from synchronous versions over to asynchronous counterparts.

However, running the type & space calculator in this new mode (before making any suggested changes) immediately threw up a bunch of issues. I sighed dramatically, then dug into what was going on. And lots of them! Race conditions! (sorry, the world always needs n+1 race condition jokes).

Where previously, a lot of the asynchronous issues in my code had been papered over by eager pre-loading, this new update shone an honest light on them. It made me realise just how fortunate we are to have great async/await support these days. It makes it effortless to split work into parallel chunks, or intentionally run things in non-blocking series. A train journey later and all the issues have been fixed.

If you do spot anything untoward with the plugins, do let me know!


This content originally appeared on Trys Mudford's Blog and was authored by Trys Mudford's Blog


Print Share Comment Cite Upload Translate Updates
APA

Trys Mudford's Blog | Sciencx (2024-04-10T00:00:00+00:00) Figma plugins & asynchronous updates. Retrieved from https://www.scien.cx/2024/04/10/figma-plugins-asynchronous-updates/

MLA
" » Figma plugins & asynchronous updates." Trys Mudford's Blog | Sciencx - Wednesday April 10, 2024, https://www.scien.cx/2024/04/10/figma-plugins-asynchronous-updates/
HARVARD
Trys Mudford's Blog | Sciencx Wednesday April 10, 2024 » Figma plugins & asynchronous updates., viewed ,<https://www.scien.cx/2024/04/10/figma-plugins-asynchronous-updates/>
VANCOUVER
Trys Mudford's Blog | Sciencx - » Figma plugins & asynchronous updates. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/04/10/figma-plugins-asynchronous-updates/
CHICAGO
" » Figma plugins & asynchronous updates." Trys Mudford's Blog | Sciencx - Accessed . https://www.scien.cx/2024/04/10/figma-plugins-asynchronous-updates/
IEEE
" » Figma plugins & asynchronous updates." Trys Mudford's Blog | Sciencx [Online]. Available: https://www.scien.cx/2024/04/10/figma-plugins-asynchronous-updates/. [Accessed: ]
rf:citation
» Figma plugins & asynchronous updates | Trys Mudford's Blog | Sciencx | https://www.scien.cx/2024/04/10/figma-plugins-asynchronous-updates/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.