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

Add Storybook to the project #565

Merged
merged 3 commits into from
Nov 15, 2022
Merged

Add Storybook to the project #565

merged 3 commits into from
Nov 15, 2022

Conversation

julien-deramond
Copy link
Contributor

@julien-deramond julien-deramond commented Nov 18, 2020

Closes #563


Preview: https://deploy-preview-565--boosted.netlify.app/storybook/


To-do

High priority

  • Study Storybook sync with tools:
    • Zeplin
    • ZeroHeight
  • If it is not needed to have dynamically properties, replace knobs addon with controls addon (more limited than knobs but this is an official addon)
  • Add all the components
  • Advanced theming : process in progress to have a specific Orange Open Source project to share a common configuration
  • Stories automation:
    • Try to use our Hugo example shortcode (or any new one) to add stories content/examples?
  • Add some guidance in the wiki:
    • e.g. if automation ↑ is not possible, we'll need to add related entries in DoDs:
      • for feature, add a new story;
      • for release: check stories got updated accordingly to latest changes.
  • Mention Storybook somewhere in our docs? Is that useful at all?

Medium priority

Integration

Default Storybook configuration created like this:

nvm use default # npm --version v6.14.5
npx sb init # chose HTML
npm i core-js --save-dev

How to test

npm i
npm run storybook

Dropped

Chromatic

Was setup for deployment convenience, but replaced with Storybook static build + Hugo mounts.

@julien-deramond julien-deramond marked this pull request as draft November 18, 2020 13:23
@ffoodd ffoodd linked an issue Nov 18, 2020 that may be closed by this pull request
@ffoodd ffoodd added this to the 5.0.0 milestone Nov 18, 2020
@ffoodd ffoodd added brand chore dependencies Pull requests that update a dependency file v5 labels Nov 18, 2020
.storybook/preview-head.html Outdated Show resolved Hide resolved
stories/1-Button.stories.js Outdated Show resolved Hide resolved
@ffoodd

This comment has been minimized.

@ffoodd

This comment has been minimized.

@julien-deramond
Copy link
Contributor Author

julien-deramond commented Dec 11, 2020

ℹ️ This comment will help me to track what I'm doing to try to connect Zeplin and Storybook.

Capture d’écran 2020-12-11 à 10 38 03

@julien-deramond
Copy link
Contributor Author

julien-deramond commented Dec 18, 2020

ℹ️ This comment will help me to track what I'm doing to try to connect ZeroHeight and the rest of the World.

@ffoodd ffoodd added the docs Improvements or additions to documentation label Jan 19, 2021
@ffoodd ffoodd added the skip:ci label Feb 8, 2021
@ffoodd ffoodd force-pushed the storybook branch 2 times, most recently from 47692b7 to 43e02ca Compare February 16, 2021 14:41
@ffoodd
Copy link
Contributor

ffoodd commented Feb 16, 2021

So after a few tries:

  • Dropped Chromatic for now (keeping it in commit history for now, just in case → should be dropped completely through rebase if we don't go back)
  • Use Storybook internal build command to get a static version, in ./site/storybook/
  • Use Hugo mounts feature to get it through Hugo generation, moving it to /storybook path.

So as of now, Chromatic isn't needed and might be ignored if its design-collaboration features don't get GDL attention.

Note for future self:

  • Keeping accessibility tests in Storybook: useful or not? since we already check docs through Pa11y.
  • Should /storybook be added to Percy snapshots? I'd say no since we alreaédy check guidelines, and have a monthly quota for snapshots.

@ffoodd
Copy link
Contributor

ffoodd commented Feb 16, 2021

If/when IOT-Map-Component gets linked to Boosted in any way, Storybook composition might be welcome.

@julien-deramond
Copy link
Contributor Author

Just for info, I've modified the Zeroheight page used in this PR to embed Storybook components now deployed in Netflify (instead of Chromatic - dropped): https://zeroheight.com/7183633e4/p/18af52-alerts-netlify.

@julien-deramond julien-deramond self-assigned this Apr 22, 2021
@julien-deramond

This comment has been minimized.

@Orange-OpenSource Orange-OpenSource deleted a comment from netlify bot Aug 25, 2022
@Orange-OpenSource Orange-OpenSource deleted a comment from netlify bot Aug 25, 2022
@julien-deramond julien-deramond force-pushed the storybook branch 4 times, most recently from 289d9a3 to 9e391bd Compare November 7, 2022 12:23
@julien-deramond

This comment was marked as resolved.

@julien-deramond julien-deramond force-pushed the storybook branch 3 times, most recently from 1627c26 to 61cafc9 Compare November 9, 2022 06:28
@julien-deramond julien-deramond marked this pull request as ready for review November 9, 2022 06:33
Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

Looks like the Hash of boosted.css and boosted.bundle.js are the same between main branch and this one. Do I need to chack all of them ?
We don't have any images like logos, or icons/images in localhost.

The changes seem to be great, but I have several questions before merging.

config.yml Show resolved Hide resolved
stories/create-stories-from-doc.js Outdated Show resolved Hide resolved
stories/create-stories-from-doc.js Show resolved Hide resolved
stories/create-stories-from-doc.js Outdated Show resolved Hide resolved
stories/create-stories-from-doc.js Show resolved Hide resolved
.storybook/main.js Outdated Show resolved Hide resolved
.storybook/main.js Outdated Show resolved Hide resolved
"@storybook/addon-a11y",
"@storybook/addon-links",
{
name: "@storybook/addon-essentials",
Copy link
Member

Choose a reason for hiding this comment

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

Do we need all of them ? (array)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably not but too much to investigate right now. I'll put it in the issue created after the merge.

.storybook/main.js Show resolved Hide resolved
package.json Show resolved Hide resolved
Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

LGTM, let's try it

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brand chore dependencies Pull requests that update a dependency file docs Improvements or additions to documentation v5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storybook usage
3 participants