Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating resetted property not working #169

Closed
jens-meisner opened this issue Apr 26, 2024 · 9 comments
Closed

Updating resetted property not working #169

jens-meisner opened this issue Apr 26, 2024 · 9 comments
Assignees

Comments

@jens-meisner
Copy link

Updating imported component

  • imported a button story from storybook (button has a set borderWidth)
  • imported component looks good
  • changed the button story (removed the borderWidth)
  • refreshed the imported component (by "Refresh canvas" button)
  • imported component has still the previouly set border

By the way, if I change the borderWidth to a different number (and not undefined) the imported component is correctly updated.


Bug report identity: Please do not edit

Task path: o7ikEwELApDnbOUI8B6k/8cUxHdVkAQCctTUqstuS/1yykrg32d7r9n

@muryoh
Copy link
Member

muryoh commented May 2, 2024

Hi @jens-meisner, sorry for the delayed feedback!

From what I can tell we do have logic to reset props
I have been trying to reproduce specifically with the border-width, but it seems to work fine on my end
Is this the workflow that is not working for you?

Screen.Recording.2024-05-02.at.17.49.23.mov

Cheers,
Remy

@jens-meisner
Copy link
Author

jens-meisner commented May 3, 2024 via email

@muryoh
Copy link
Member

muryoh commented May 3, 2024

Are you able to reproduce with at will?
No matter what I try I don't seem to be able to reproduce, be it with my demo storybook or yours

Would you mind sharing a video with me, possibly on Discord if you prefer? (https://story.to.design/chat, my login is remy.masson)

Best
Remy

@jens-meisner
Copy link
Author

2024-05-03 14-22-42.zip
Here is the video, hope it helps.
First change: (from 20) to “undefined” not working,
Second change to a different number (to 2) is working.

Cheers,
Jens

@muryoh
Copy link
Member

muryoh commented May 3, 2024

Still no luck on my end

Screen.Recording.2024-05-03.at.16.23.55.mov

Would you mind checking what is the reported border width on your button, in the devtools?
image

Maybe it would help if I was able to reproduce with your storybook source code directly, although I understand this may be private

@jens-meisner
Copy link
Author

Hi Remy,

Today the behaviour was flaky. Sometimes it was updated correctly (also for “undefined”) and sometimes not.
The DevTools (on the storybook page) show a borderWidth of 1.
I added another video, but I am not sure, if it helps. As said before...flaky
2024-05-06 08-51-49.zip

@muryoh
Copy link
Member

muryoh commented May 6, 2024

Hi @jens-meisner,

Good news - I have a lead! Sorry it took me some time
I believe there's a race condition specific to the Refresh Canvas action (specific to the local mode) where we "miss" the updated DOM

I'm looking into it 👍

@muryoh muryoh self-assigned this May 6, 2024
@jens-meisner
Copy link
Author

That sounds great! 👍

@muryoh
Copy link
Member

muryoh commented May 13, 2024

Hi @jens-meisner , sorry about the late notice but we released a fix last week! (fix is mostly in the plugin, so if you reloaded your Figma tab since then you should benefit from the fix)

Hope it fixes your issue 👍
Don't hesitate to reopen if it doesn't

@muryoh muryoh closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants