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

refactor: migrate stories next to components #731

Merged
merged 3 commits into from
Oct 20, 2020
Merged

Conversation

xballoy
Copy link
Contributor

@xballoy xballoy commented Oct 19, 2020

I migrated all the stories next to their component.

  • For some of them I had to add a devDependencies because some component use other component in their stories. I don't know if that's an issue but it's working as is.
  • I removed the demo on how to use the form, it had some external dependencies and wasn't really something related to storybook, but really a demo.

Not related to this PR but some quick improvements:

  • I removed the pre-commit package because it was overriding husky and no linter was run on pre-commit.
  • I removed the *.ts from the TypeScript linter as we weren't linting the tsx files. That broke the linting but I fixed it in the PR.
  • I excluded **/*.stories.tsx from Sonar (in addition of .js)

Fixes #726

@xballoy xballoy force-pushed the feature/storybook branch 2 times, most recently from f54abb6 to 8ea87fd Compare October 19, 2020 11:04
@xballoy xballoy force-pushed the feature/storybook branch 2 times, most recently from 98424a5 to 4486194 Compare October 19, 2020 16:27
@@ -0,0 +1 @@
declare module '*.md';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quoi cela sert ? Je ne me souviens plus

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est pour les import des markdown dans les stories en TS

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah oui les readme

arnaudforaison
arnaudforaison previously approved these changes Oct 19, 2020
@xballoy
Copy link
Contributor Author

xballoy commented Oct 19, 2020 via email

@samuel-gomez-axa
Copy link
Contributor

j'ai réinstallé et lancer le storybook, ça fonctionne nickel , bravo :)
J'ai juste eu des warnings dans la console de lancement (sur toutes les stories) :

Capture2

Et il y a une anomalie graphique sur la démo sur le composant /story/help--html :

Capture

il ne devrait pas y avoir de fond bleu, probablement du à la restructuration du composant

@xballoy
Copy link
Contributor Author

xballoy commented Oct 19, 2020 via email

@xballoy
Copy link
Contributor Author

xballoy commented Oct 20, 2020

@samuel-gomez-axa J'ai corrigé le problème sur le popover, c'était un problème d'import (j'ai importé le composant pas le container).
Par contre je ne trouve rien pour les warnings...

@xballoy
Copy link
Contributor Author

xballoy commented Oct 20, 2020

J'ai simplifié l'option --ignore du compile-js.js pour que l'on ne compile plus que les fichiers sources (pas les specs, ni les stories).
J'ai aussi ajouté .src/__snapshots__ pour ne pas copier les snapshots mais cela ne fonctionne pas (c'était déjà comme ça) à cause de ce bug (babel/babel#11394) qui a été corrigé hier. Dans une prochaine version de babel ca devrait fonctionner.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

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

Successfully merging this pull request may close these issues.

Storybook not refreshed (stuck on 1.3.14) [Storybook] Move stories next to their components
3 participants