You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Plugin no longer refreshes when selected design changes #200
Not sure if this is a bug or a feature but the plugin no longer recalculates the code for the design when the selected node is edited. This can lead to the design and the preview to be out of synch.
I know there can be issues with redrawing because recalculating is an expensive operation. Instead of recalculating, we could at least show some kind of state to the user that the view is out of sync and needs to be reselected. See rough mockup:
(You can also click on nothing then reselect the node. I thought a refresh button is a little easier to explain to a user)
It is not intentional. We were listening to "everything" for updates, now we are listening to "currentpagechange" for updates, I guess it is still wrong. I'll see what I can find. The issue with the old one is that if I enable dynamic access (and figma strongly recommends so), I can't use it anymore.
@bernaferrari Thanks for fixing this. I see that if you have a large selection (especially one with images) and you start making edits, it can stop you from working because the plugin freezes the whole UI. So I actually think it might be a better experience to add the refresh button rather than automatically refreshing when there are edits.
Activity
bernaferrari commentedon Mar 12, 2025
It is not intentional. We were listening to "everything" for updates, now we are listening to "currentpagechange" for updates, I guess it is still wrong. I'll see what I can find. The issue with the old one is that if I enable dynamic access (and figma strongly recommends so), I can't use it anymore.
bernaferrari commentedon Mar 12, 2025
I added
figma.loadAllPagesAsync();
figma.on("documentchange", () => {
should work again, thanks for reporting!
mimshwright commentedon Mar 14, 2025
@bernaferrari Thanks for fixing this. I see that if you have a large selection (especially one with images) and you start making edits, it can stop you from working because the plugin freezes the whole UI. So I actually think it might be a better experience to add the refresh button rather than automatically refreshing when there are edits.