I’m creating a plugin that saving data to the file with figma.root.setPluginData
.
I noticed that I will lose new saved plugin data on a branch when I merge the branch.
Is this expected behavior?
Maybe, I can use figma.clientStorage
instead, but I’d like to share the plugin data between some editors and review changes in the branch.
Memo: How to retrieve the “lost” data
“See all branches”
Open merged branch in “Archived”
“Duplicate as new file”
Run the plugin on the duplicated file.
parrot
September 13, 2023, 6:51pm
2
I have observed similar behaviour when integrating offline changes. I guess this goes into the same direction - no response from the Figma team yet.
Background
I heavily utilize the setPluginData function on the root node to store messages and localized variants within the Parrot Plugin . This works incredibly well - even multiplayer edits work like a charm. Great job, Figma! However, I’ve encountered a problem during rigorous sync testing:
Steps to reproduce
If a user is offline and modifies an entry using the setPluginData function, then comes back online after a (possibly extended) period, their changed plugin data will overwrite all en…
1 Like
I found that it happens setPluginData
on figma.root
, but doesn’t happen on a PageNode
.
When I setPluginData
on a PageNode
then I can merge as I expected. Also, I can see the diff in the branch review window.
It may be one of the work-around. But if someone delete the node, the plugin data will be gone
parrot
September 15, 2023, 1:24pm
4
Thats an interesting observation - i will check if this applies to my sync issue as well.
1 Like