Giter Club home page Giter Club logo

storybook-addon-changelog-viewer's Introduction

Storybook Addon Changelog Viewer

Show Changelog files in the Storybook UI - made with โค๏ธ by Dave Bitter

Storybook v7.0.0 or higher is needed to use this addon

Storybook UI showing the changelog tab active and displaying a mock changelog

Usage

  1. Install addon

    npm install storybook-addon-changelog-viewer --save
    
    yarn add storybook-addon-changelog-viewer --save
    
  2. Load addon in .storybook/main.js

    module.exports = {
      // other configuration here
      addons: [
        // other addons here.
        "storybook-addon-changelog-viewer",
      ],
    };
  3. Import changelog file in story and pass it to the changelog parameter

    import changelog from "./CHANGELOG.md";
    
    export default {
      title: "Your Component",
      parameters: {
        changelog: changelog,
      },
    };
  4. View changelog in the Storybook UI. There should be a new tab called "Changelog"

Features

  • View changelog files in the Storybook UI
  • Render Markdown as HTML
  • Automatically generate a navigation with links to all headings with a SemVer string (e.g. "## 1.0.0 - 2022-06-30")

Motivation

This addon was created to make it easier to view changelog files in the Storybook UI. Since Storybook v7.0.0. the Storybook Addon Notes is no longer working which is why this addon was created.

storybook-addon-changelog-viewer's People

Contributors

davebitter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

storybook-addon-changelog-viewer's Issues

Try to upgrade to angular 16

Hello,

I'm new on storybook and i try to pass a repo from angular ^15.1.0 to ~16.2.0 and storybook ^7.0.22 to ^7.5.1.
I have an issue with changelog.
When i run storybook, i have this error:

WARN ๐Ÿšจ Unable to index ./projects/ui/src/lib/change-log.stories.ts:
WARN   TypeError: Cannot destructure property 'metaId' of 'indexInputs[0]' as it is undefined.
WARN     at StoryIndexGenerator.extractStories (node_modules\@storybook\core-server\dist\index.js:55:1036)
WARN     at async node_modules\@storybook\core-server\dist\index.js:54:2020
WARN     at async Promise.all (index 2)
WARN     at async Promise.all (index 1)
WARN     at async StoryIndexGenerator.updateExtracted (node_modules\@storybook\core-server\dist\index.js:54:1653)
WARN     at async StoryIndexGenerator.ensureExtracted (node_modules\@storybook\core-server\dist\index.js:54:2474)
WARN     at async StoryIndexGenerator.initialize (node_modules\@storybook\core-server\dist\index.js:54:1580)

And the front say:

Error: Unable to index ./projects/ui/src/lib/change-log.stories.ts:
  at async (node_modules\@storybook\core-server\dist\index.js:54:2020)
  at async Promise.all (index (2))
  at async Promise.all (index (1))
  at async StoryIndexGenerator.updateExtracted (node_modules\@storybook\core-server\dist\index.js:54:1653))
  at async StoryIndexGenerator.ensureExtracted (node_modules\@storybook\core-server\dist\index.js:54:2474))
  at async StoryIndexGenerator.initialize (node_modules\@storybook\core-server\dist\index.js:54:1580))
  at Object.fetchIndex (/sb-manager/chunk-WZJAIZ64.js:51:6072))
  at async Object.init (/sb-manager/chunk-WZJAIZ64.js:51:11637))

Thanks, for your add-on, and thanks for the help in advance.

Display Changelog Tab for Specific Pages/Stories

I added the Storybook changelog viewer to my project and I noticed that the Changelog tab is persistent. My issue is that the log is only populated on the doc page and not the other pages/stories within the same component folder. Is it possible to make the changelog tab display only on a specific page? If not, how can I make the log render on all the other pages/stories for a consistent experience?

Change log is empty on "How to install" โŒ
Screenshot 2023-10-10 at 11 54 43 AM

Change log renders on "Docs" โœ…
Screenshot 2023-10-10 at 11 55 03 AM

Change log tab appears on "Examples" โŒ
Screenshot 2023-10-10 at 11 59 08 AM

Change log disappears after clicking tab from "Examples" โŒ
Screenshot 2023-10-10 at 11 55 25 AM

Looking at the source code manager.js file, I'm wondering if there's a way to manipulate the addon object match or render to resolve this issue?
Screenshot 2023-10-10 at 12 04 47 PM

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.