Giter VIP home page Giter VIP logo

geometricpanda / storybook-addon-badges Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 4.0 2.11 MB

An addon for Storybook which allows the addition of badges to your Stories

Home Page: https://geometricpanda.github.io/storybook-addon-badges/

License: MIT License

JavaScript 38.76% TypeScript 56.54% HTML 0.23% CSS 3.10% MDX 1.38%
storybook javascript javascript-library storybook-addon storybook-addons typescript typescript-library

storybook-addon-badges's Introduction

Geometric Panda

Storybook Plugins

Plugin Badge
@geometricpanda/storybook-addon-badges npm version
@geometricpanda/storybook-addon-iframe npm version

Badges

Purpose Badge
Build CircleCI
Inclusive Language Check Inclusive Language
Code Coverage codecov
Security Vulnerabilities CodeQL
License Check FOSSA Status

storybook-addon-badges's People

Contributors

chantastic avatar drjkl avatar eddiemonge avatar geometricpanda avatar ghengeveld avatar hipstersmoothie avatar italoteix avatar jonniebigodes avatar kjenkins19 avatar kzimins-arvatosystems avatar literalpie avatar makotot avatar scwr avatar sheriffmoose avatar shilman avatar winkervsbecks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

storybook-addon-badges's Issues

Don't render separators if there are no badges

Actual Behaviour

The add-on always renders two separators (vertical bars), even if there are no badges to render.

Expected Behaviour

The add-on renders no (or only one) separator if there are no badges to render.


I don't know if there is a best practice regarding separators in storybook add-ons, but those two separators without content definitely look wrong.

Show labels in docs view

Hi,

Thanks again for this awesome addon.

In Storybook v7 they splitted the docs/canvas view differently. This plugin only shows on the canvas views.

Since Storybook v7 we find ourselves using the Docs view in favor of the canvas view, but because of the limitation of the addon, we find ourselves missing the badges.

So the feature request is: is it possible to show the badges on the docs view in Storybook?

Cannot import BADGE from package

Looking to upgrade to 1.0.1 and I'm hitting the following TS error:

file.tsx:1:10 - error TS2614: Module '"@geometricpanda/storybook-addon-badges"' has no exported member 'BADGE'. Did you mean to use 'import BADGE from "@geometricpanda/storybook-addon-badges"' instead?

1 import { BADGE } from '@geometricpanda/storybook-addon-badges';

When I inspect the export, it's just default: {}, so if I were to do:

import foo from '@geometricpanda/storybook-addon-badges';

then foo is going to be {} which doesn't seem useful.

I think that src/index.ts should be re-exporting src/shared.ts?

How to add tooltip in MDX?

How do you pass in tooltip config? In the example is only using badges. Also facing same problem after upgrading to 1.0.1, downgrading back to 0.2.2 #4

import { Meta } from '@storybook/addon-docs/blocks';
import { BADGE } from '@geometricpanda/storybook-addon-badges';

<Meta title="Path/To/MyComponent" parameters={{ badges: [BADGE.BETA] }} />;

Storybook 8 compatibility

Hey @geometricpanda! I’m reaching out from the core SB team :)

Storybook 8 (our next major release) is coming soon, and it introduces some breaking changes that your addon might need to account for.

We’ve listed all the key changes in a new Storybook 8 migration guide, and we’d encourage you to check it out and see if your addon is impacted.

We also have an addons channel in our Discord community, which we’d like to use to better communicate with addon authors in the future. If you’re not part of the server, consider joining here and message me (@joevaugh4n) so that I can give you the addon creator role! If you’re already in the server, please just ping me and I’ll respond to you there.

Thanks for being a part of our addon community!

Joe

Showing Badges in Sidebar Labels

This is a feature request.

Are there any plans to allow showing the badges in the labels of the stories in the sidebar as well?

I saw this for mui for example:
image

Currently, this is not possible from what I see, so we would just use the sidebar roots to put the components with the same badges in their own group.

image

add link ability

add the ability to attach links to badges

  • this could be done at the global config level
  • this could also be controlled at the individual story level

Hovering mouse over badge doesn't show tooltip on Storybook v7

Storybook version: v7.0.6

Expected behavior

Hovering badge with mouse show tooltips. ✅

(optionally, clicking on the badge hides the visible tooltip)

Demo when using the add-on in Storybook v6:

Screen.Recording.2023-04-20.at.16.49.17.mov

Actual behavior

Hovering badge with mouse does not show tooltip. ❌

(optionally, clicking on the badge toggles the tooltip visibility)

Demo when using the add-on in Storybook v7:

Screen.Recording.2023-04-20.at.16.47.18.mov

Storybook v7

Hi,

Thanks for all the work developing this plugin.

at my place we decided to already upgrade to Storybook v7 due to better Vue support. We're wondering if there are already plans here to make the plugin ready for Storybook 7. Considering it's already on release candidates I doubt there will be any big changes.

From the migrations notes

https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#70-core-addons-changes
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#70-addon-authors-changes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.