Skip to content

Plugin no longer refreshes when selected design changes #200

Closed

Description

@mimshwright

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.

Image

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:

Image

(You can also click on nothing then reselect the node. I thought a refresh button is a little easier to explain to a user)

Activity

  1. bernaferrari commented on Mar 12, 2025

    @bernaferrari
    Owner

    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.

  2. bernaferrari commented on Mar 12, 2025

    @bernaferrari
    Owner

    I added

    figma.loadAllPagesAsync();
    figma.on("documentchange", () => {

    should work again, thanks for reporting!

  3. mimshwright commented on Mar 14, 2025

    @mimshwright
    ContributorAuthor

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions