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

Wech 35/bring storybook migration to main #337

Merged
merged 62 commits into from
May 26, 2023

Conversation

martimalek
Copy link
Contributor

@martimalek martimalek commented May 23, 2023

What:

Bring the Storybook migration to main, this branch contains the whole Storybook migration without including the other breaking changes in #311


Why:

We want to migrate our documentation from docz to Storybook as part of the current major.


How:

I've created this branch from WECH-21/support-react-18 and rebased with main, getting rid of anything unrelated to the Storybook migration (React 18 migration, removing nanoid, using React's useId to generate ids).

Apart from that I've also:

  • Bumped ts-jest to 26.5.6 in order to use Jest 26 (introduced during the Storybook migration)
  • Corrected a type issue when using Input internal utils that depended on it's size prop
  • Migrated compound InfoBanner docs to Storybook

Checklist:

zackjones11 and others added 30 commits May 23, 2023 14:28
Docz is not supported anymore. We decided to migrate to a stable solution

Co-authored-by: Zack Jones <[email protected]>
Co-authored-by: Nikolai Lopin <[email protected]>
Components migrated: 
* Accordion
* Banner
* Box
* Card
* Checkbox
* Datepicker
* Dimmer
* Divider
* Filepicker
---------

Co-authored-by: Zack Jones <[email protected]>
Co-authored-by: Cristian Sanchez <[email protected]>
Co-authored-by: Nikolai Lopin <[email protected]>
* docs: add input story

* docs: add label story

* docs: add link story

* docs: add modal story

* docs: add offcanvas story

* docs: define argTypes for Input and Label stories

* docs(password): add Password to Storybook

* docs(phoneinput): add PhoneInput to Storybook

* fix(test): update snapshots

* docs(pagination): add Pagination to Storybook

* docs(radiobutton): add RadioButton to Storybook

* docs(popover): add Popover to Storybook

---------

Co-authored-by: Aleksandar Spasov <[email protected]>
Co-authored-by: Ján Hamara <[email protected]>
Update typescript to the lowest supported version
* Input
* Label
* Link
* Modal
* Offcanvas

Co-authored-by: Aleksandar Spasov <[email protected]>
Co-authored-by: Nikolai Lopin <[email protected]>
* table
* tag
* text
* textarea
* toggle
* tooltip
---------

Co-authored-by: Christian <[email protected]>
Co-authored-by: Nikolai Lopin <[email protected]>
* Search
* TabBar
* Select
* SelectList
* Skeleton

Co-authored-by: Inga Schünemann <[email protected]>
* essentials pages
* Logo
* Icons

---------

Co-authored-by: lena <[email protected]>
Co-authored-by: Vanessa Knibbe <[email protected]>
Co-authored-by: Nikolai Lopin <[email protected]>
@martimalek martimalek self-assigned this May 23, 2023
Copy link
Contributor

@nlopin nlopin left a comment

Choose a reason for hiding this comment

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

LGTM. I've checked out the branch, and it has started without issues.

Can you describe what was wrong with the Input? I see you removed the ResponsiveValue generic around it. I'm not sure it is correct. You can pass an array to size and variant props to make their style change based on the breakpoints.

I've assembled a demo in Codesandbox. If you make the browser tab narrower there, you'll see the change.

@martimalek
Copy link
Contributor Author

LGTM. I've checked out the branch, and it has started without issues.

Can you describe what was wrong with the Input? I see you removed the ResponsiveValue generic around it. I'm not sure it is correct. You can pass an array to size and variant props to make their style change based on the breakpoints.

I've assembled a demo in Codesandbox. If you make the browser tab narrower there, you'll see the change.

Hi Nik, nice catch! This was a change from a previous commit, I don't think it had any issue so I've put it back, running storybook locally it worked fine.

I've had to put back some casts of size in BoxedInput that I had removed before though

@martimalek martimalek force-pushed the WECH-35/bring-storybook-migration-to-main branch from 4e54931 to 590ac14 Compare May 25, 2023 07:43
@martimalek
Copy link
Contributor Author

martimalek commented May 25, 2023

I've resolved conflicts related to the recent addition of the compound InfoBanner, at the beginning I tried using the Story and Source APIs to have a cleaner mdx file, but I had to create a custom Story using render (deprecated), which didn't correctly display the code when opening the dropdown. In the end I've added directly the code in the mdx file, please let me know if there's a better way to do this @JanHamara.

The final docs look like:

image

@nlopin
Copy link
Contributor

nlopin commented May 25, 2023

@martimalek do you plan to cherrypick Jan's new home page?

@martimalek
Copy link
Contributor Author

@martimalek do you plan to cherrypick Jan's new home page?

Hey Nik, yes, I'll try cherrypicking today/tomorrow

JanHamara and others added 3 commits May 26, 2023 19:00
* feat(landing): add landing page for Storybook

* docs(landing): finish the landing page integration

* docs(theme): theme storybook with our branding

* refactor(landingpage): mr review modifs part 1

* refactor(landing): wrap landing page mdx in unstyled component

---------

Co-authored-by: Ján Hamara <[email protected]>
Fix up default font for theme to Open Sans (my bad, I left behind one commit and merged in the MR before pushing it)

Relevant MR: #334
Update 'by Freenow' SVG with one with correct font (my bad, I left behind one commit and merged in the MR before pushing it)

Relevant MR: #334
@martimalek
Copy link
Contributor Author

Alright folks, I've cherry-picked the commits for the landing page
image

and changed their commit description to follow semantic commits rules
image

I think this branch has now the entire Storybook migration and should be ready for some reviews and the release 😉

@martimalek martimalek requested review from JanHamara and nlopin May 26, 2023 17:20
@nlopin nlopin merged commit c8de9ed into main May 26, 2023
@nlopin nlopin deleted the WECH-35/bring-storybook-migration-to-main branch May 26, 2023 20:20
@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2023

🎉 This PR is included in version 1.31.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

🎉 This PR is included in version 3.0.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

9 participants