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

Any plan to allow user to create custom plugins ? #465

Open
nathanguigui opened this issue Jul 18, 2023 · 2 comments
Open

Any plan to allow user to create custom plugins ? #465

nathanguigui opened this issue Jul 18, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@nathanguigui
Copy link

Is your feature request related to a problem? Please describe.
I would like to add a plugin for figma preview

Describe the solution you'd like
The best option would be to add the possibility to create custom plugins for ladle

Thanks you for the job you are doing on this project

@nathanguigui nathanguigui added the needs triage needs to be reviewed label Jul 18, 2023
@tajo tajo added enhancement New feature or request and removed needs triage needs to be reviewed labels Jul 18, 2023
@tajo
Copy link
Owner

tajo commented Jul 18, 2023

I am open to it.

There is already quite a lot you can achieve just with https://ladle.dev/docs/providers#ladle-context

I would like to add a plugin for figma preview

Can you document in detail what this integration would look like, including what APIs Ladle should expose/add?

@nathanguigui
Copy link
Author

We can imagine an API like in the storybook to register custom addon in the bottom bar and display custom panel component on open

addons.register(ADDON_ID, (api) => {
  addons.add(PANEL_ID, {
    type: types.PANEL,
    title: 'My Addon',
    render: ({ active, key }) => (
      <AddonPanel active={active} key={key}>
        <div> Storybook addon panel </div>
      </AddonPanel>
    ),
  });
});

For my case (figma addon) I will display inside the panel and iframe linked to my figma in order to simplify the review of the designers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants