storybook-addon-figma icon indicating copy to clipboard operation
storybook-addon-figma copied to clipboard

Figma panel overrides all panels

Open cjol opened this issue 6 years ago • 7 comments

I can't combine this with other decorators... Am I doing something wrong?

storiesOf("Button", module)
  .addDecorator(
    figmaDecorator({
      url:
        "https://www.figma.com/file/OWJzZno8PNd5bABas6y3uxxP/Untitled?node-id=1%3A6694"
    })
  )
  .addDecorator(withKnobs)
  .addDecorator(withNotes)
  .add(
    "with text",
    () => (
      <Button
        onClick={action("button clicked")}
        disabled={boolean("Disabled", false)}
      >
        {text("Label", "Click me!")}
      </Button>
    ),
    { notes: { markdown: "# Button\n\n >Does some *cool* stuff!" } }
  )

But the Notes, Knobs and Viewports panels all just show the same figma file: image

cjol avatar Nov 01 '18 14:11 cjol

I'm also seeing this problem.

fullflavedave avatar Dec 21 '18 21:12 fullflavedave

Seeing this as well. I will probably uninstall until this is resolved.

dlombardi avatar Jan 16 '19 19:01 dlombardi

I'm was also experiencing this - and it was really annoying.

simple solution for now was to make sure it was the last entry in addons.js:

import '@storybook/addon-knobs/register';
import '@storybook/addon-actions/register';
import 'storybook-addon-figma/register';
<EOF>

darrencrossley avatar Jan 24 '19 16:01 darrencrossley

This is still happening and the solution from darrencrossley didn't work for me, so I created a manager-head.html file in my storybook folder and added the following:

<style>
#storybook-panel-root>div:nth-child(2) > div {
  background: white;
}
</style>

It just sets the background color of the tab pages to white so they don't 'leak through'.

gavinkilbride avatar Jun 13 '19 02:06 gavinkilbride

Same happening with me, and order fix didn't work for me

shubjhamb avatar Sep 02 '19 10:09 shubjhamb

I fixed it on my fork (not planning to submit PR since the package is not being maintained)

I also needed vue support, so I forked from #4 and fixed this issue from there.

If you need it you can install it from my fork (https://github.com/vojvodics/storybook-addon-figma/releases/tag/0.1.1) npm i https://github.com/vojvodics/storybook-addon-figma.git\#0.1.1 -D

vojvodics avatar Dec 12 '19 10:12 vojvodics

@hharnisc is it possible that we could get an official update to fix this issue where the figma tab is always showing on every other addon tab? We would love to just be able to install from the official source.

KevinVandy avatar Jan 20 '20 21:01 KevinVandy