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

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/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.