GithubHelp home page GithubHelp logo

microsoft / fluidstorybook Goto Github PK

View Code? Open in Web Editor NEW
17.0 20.0 14.0 9.62 MB

StorybookJS integration with the Fluid Framework

License: MIT License

JavaScript 11.92% CSS 6.49% HTML 0.93% TypeScript 79.30% SCSS 1.35%

fluidstorybook's Introduction

fluidstorybook

This project provides "stories" for different Fluid examples. In addition to being able to view the rendered Fluid Objects, a source code viewer is also included to make it easy to see how the Fluid Objects works.

Run the following to get started:

  • npm install
  • npm start

Acknowledgements

This is built using StorybookJs

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademark

This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services. Use of these trademarks or logos must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.

fluidstorybook's People

Contributors

agarwal-navin avatar danwahlin avatar dependabot[bot] avatar micahgodbolt avatar microsoft-github-operations[bot] avatar microsoftopensource avatar msftgits avatar pragya91 avatar sambroner avatar skylerjokiel avatar tylerbutler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fluidstorybook's Issues

Complete the Readme

Explain Directory Structure
Acknowledgements to Storybook team
Instructions for adding a story
Explaination for "Why Loader is needed"

Remove Warning about React state update on unmounted component

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function. in SourceCodePanel (created by render) in render (created by Context.Consumer) in Location (created by QueryLocation) in QueryLocation (created by Preview)

Issue seems to be located in .storybook/sourcecode-addon/storybookPanel.jsx:

  useEffect(() => {
    channel.on('sourcecode/selectedStory', path => {
      if (rawSources) {
        handleFileChange(path, rawSources);

        // Filter files shown in drop-down to files associated with the files in the same base folder as "path"
        const filteredPaths = Object.keys(rawSources).filter((file, index) => {
          // Grab first part of path
          let firstOfPath = path.split('/').slice(2,4).join('/').toLowerCase();
          return file.toLowerCase().startsWith(firstOfPath);
        });
        setFilteredFiles(filteredPaths);
      }
    })
    return () => channel.removeListener('sourcecode/selectedStory');
  }, [rawSources]);

Looks like removing the call to handleFileChange(path, rawSources); stops the error from showing and diving further it looks like setFileState({ history: newHistory, idx: newIdx }); is the potential culprit.

Fix source viewer when a user only clicks on the Docs tab

If the user clicks on the Docs tab but not the Canvas tab no emit is fired with the current story file name. This is done through a decorator in .storybook/sourcecode-addon/storybookDecorator.js. Need to find a way to trigger the same emit for MDX/Docs.

Update Documentation Links

The https address used for the story MDX links to the documentation currently reference the Azure version of the website domain. We'll need to update it to https://www.fluidframework.com once it's ready or figure out a different way to make that more dynamic (possibly during build with an env variable).

npm start is not working

Hey, I am following the steps mentioned in the readme to run npm install and then run npm start. While install went fine with some warns but start won't work.

I am getting the below issue:

[email protected] start C:\passion\fluid\FluidStorybook
start-storybook -p 9009 -s public

'start-storybook' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: start-storybook -p 9009 -s public
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Reduce vendor bundle size

Due to the number of stories and packages associated with a given story the vendor bundle size has grown large. We need to research dynamic imports and see if we can shrink that down so that a given story can be "lazy loaded".

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.