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

Feature/storybook5 #113

Merged
merged 19 commits into from Mar 1, 2019

Conversation

Projects
None yet
4 participants
@B3zo0
Copy link
Member

B3zo0 commented Feb 18, 2019

Storybook upgrade ➡ v5

Things I changed in this pr:

  • removed tslint.autosave from .vscode\settings.json (with the new tslint plugin this setting is not working. Also the precommit hook will fix tslint settings if any)
  • Storybook related stuff
    • removed unused dependencies
      • @date-io/date-fns
      • react-redux
      • @storybook/addon-jest
      • @types/memory-fs
      • babel-core
      • babel-runtime
      • date-fns
      • html-loader
      • markdown-loader
      • moment
      • raw-loader
      • storybook-addon-material-ui
      • ts-loader
      • url-loader
    • changed webpack.config.js to use ts-config-webpack-plugin, added a docgen plugin that generates proptables for typescript react components ( this reduced build time from 1.5 min to ~17 seconds)

    • withInfo added as a global decorator

    • removed muiTheme from stories

    • passed the notes as a parameter instead of withMarkdownNotes()

  • added js & jsx to pre commit check to run prettier on them
  • added storybook packages to nohoist - without nohoist storybook 5 runs with theming related errors because of duplicate packages - see (storybooks/storybook#5706)

Needs to be done:

@codecov

This comment has been minimized.

Copy link

codecov bot commented Feb 18, 2019

Codecov Report

Merging #113 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #113   +/-   ##
========================================
  Coverage    85.79%   85.79%           
========================================
  Files          109      109           
  Lines         3203     3203           
  Branches       761      761           
========================================
  Hits          2748     2748           
  Misses         455      455

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3d7443...2cb2a20. Read the comment docs.

@B3zo0 B3zo0 marked this pull request as ready for review Feb 20, 2019

@B3zo0 B3zo0 requested review from herflis , gallayl and kultsar Feb 20, 2019

@kultsar
Copy link
Contributor

kultsar left a comment

DateTimePicker, new mode, TypeError (note: this is a bug in previous version of storybook as well)

e.split is not a function

    at t.setValue (https://sn-react-component-docs.netlify.com/static/iframe.eaeab064f68f7f59dc8c.bundle.js:1:19211)
    at new t (https://sn-react-component-docs.netlify.com/static/iframe.eaeab064f68f7f59dc8c.bundle.js:1:18999)
    at Ko (https://sn-react-component-docs.netlify.com/static/vendors~iframe.a7ea2e5b105d0d0adbe3.bundle.js:93:54981)
    at ei (https://sn-react-component-docs.netlify.com/static/vendors~iframe.a7ea2e5b105d0d0adbe3.bundle.js:93:60314)
    at Ci (https://sn-react-component-docs.netlify.com/static/vendors~iframe.a7ea2e5b105d0d0adbe3.bundle.js:93:74350)
    at Di (https://sn-react-component-docs.netlify.com/static/vendors~iframe.a7ea2e5b105d0d0adbe3.bundle.js:93:74696)
    at ca (https://sn-react-component-docs.netlify.com/static/vendors~iframe.a7ea2e5b105d0d0adbe3.bundle.js:93:79364)
    at ua (https://sn-react-component-docs.netlify.com/static/vendors~iframe.a7ea2e5b105d0d0adbe3.bundle.js:93:79018)
    at Li (https://sn-react-component-docs.netlify.com/static/vendors~iframe.a7ea2e5b105d0d0adbe3.bundle.js:93:77530)
    at ba (https://sn-react-component-docs.netlify.com/static/vendors~iframe.a7ea2e5b105d0d0adbe3.bundle.js:93:85978)

image

@B3zo0 B3zo0 referenced this pull request Feb 20, 2019

Open

Slowness #37

B3zo0 added some commits Feb 21, 2019

[KFI]chore(component-docs): storybook to rc4
moved scripts closer to the top of the package.json file

@B3zo0 B3zo0 requested a review from kultsar Feb 22, 2019

@B3zo0 B3zo0 merged commit 9569b0b into develop Mar 1, 2019

6 checks passed

codecov/patch Coverage not affected when comparing e3d7443...2cb2a20
Details
codecov/project 85.79% remains the same compared to e3d7443
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
license/cla Contributor License Agreement is signed.
Details

@B3zo0 B3zo0 deleted the feature/storybook5 branch Mar 1, 2019

if (!module.built || module.external || !module.rawRequest) {
return
}
if (/\/src.+.tsx/.test(module.request)) {

This comment has been minimized.

@onemen

onemen Mar 14, 2019

This regexp is not work on windows.

/\/src.+.tsx/.test(module.request)

windows separator is
this code work for me on windows

    const ts = require("typescript");
+   const path = require("path");

    class DocgenPlugin {
      apply(compiler) {
+       const re = RegExp(`\\${path.sep}src.+\.tsx`);
        compiler.hooks.compilation.tap("DocgenPlugin", compilation => {
          compilation.hooks.seal.tap("DocgenPlugin", modules => {
            const modulesToProcess = [];
            compilation.modules.forEach(module => {
              const { built, external, rawRequest, request } = module;
              // Skip ignored / external modules
              if (!module.built || module.external || !module.rawRequest) {
                return;
              }
-             if (/\/src.+.tsx/.test(module.request)) {
+             if (re.test(module.request)) {
                modulesToProcess.push(module);
              }
            });

This comment has been minimized.

@B3zo0

B3zo0 Mar 14, 2019

Author Member

You are right. I've never realized that. I use wsl in windows for development and our builds are on a linux machine. Thanks for pointing that out 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.