storybookjs / addon-designs

A Storybook addon that embeds Figma, websites, or images in the addon panel.
https://storybookjs.github.io/addon-designs
MIT License
876 stars 72 forks source link

Support for the new Figma share URL #240

Closed pocka closed 3 months ago

pocka commented 5 months ago

close #239

Figma changed URL structure for the share URL from "/file/..." to "/<anything>/...". This patch updates the URL checking regexp according to their updated embed document.

📦 Published PR as canary version: 8.0.3--canary.240.540483c.0
:sparkles: Test out this PR locally via: ```bash npm install @storybook/addon-designs@8.0.3--canary.240.540483c.0 # or yarn add @storybook/addon-designs@8.0.3--canary.240.540483c.0 ```
samwalshnz commented 5 months ago

I gave this a test on my end, and it did the trick! Nice one @pocka Is there anything holding this back from merge?

Looks like it's just the regex failing on Codacy. I don't see any harm any updating to align with Codacy's requirements, even if Figma docs have a slightly different regex pattern? Otherwise, is there a way to disable the static code analysis warning on that line, with Codacy?

ed-ateixeira commented 3 months ago

any updates when this should be merged?