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

chore: Update Storybook to 5.3 #453

Merged
merged 14 commits into from Mar 9, 2020
Merged

Conversation

lychyi
Copy link
Contributor

@lychyi lychyi commented Feb 10, 2020

Fixes #416

Summary

Update Storybook to ^5.3.x. This fixes a Firefox browser issue with ChromaticQA where a delay in loading fonts triggers visual regressions. Unfortunately we don't have an issue to track but this is what the ChromaticQA team had us do for a fix.

Checklist

  • branch has been rebased on the latest master commit
  • tests are changed or added
  • yarn test passes
  • all (dev)dependencies that the module needs is added to its package.json
  • code has been documented and, if applicable, usage described in README.md
  • module has been added to canvas-kit-react and/or canvas-kit-css universal modules, if
    applicable
  • design approved final implementation
  • a11y approved final implementation
  • code adheres to the API & Pattern guidelines

Additional References

@NicholasBoll
Copy link
Member

The CI failure seems to be related to an issue where a type definition file created by a newer version of Typescript fails older versions of the compiler: aws-amplify/amplify-js#4389 (comment)

It looks like upgrading to Typescript 3.7+ is how we would fix the issue.

@lychyi
Copy link
Contributor Author

lychyi commented Feb 10, 2020

We could upgrade or we could petition Storybook to create declarations using 3.6.x.

Upgrading to 3.7 could possibly put our library consumers in a similar predicament.

This is sort of like Storybook adopting TS 4 without signaling a breaking change. There is a fairly large TS issue about this since a few people have viewed this declaration output change as a breaking change (but only happened from 3.6 to 3.7).

@NicholasBoll
Copy link
Member

We could open an issue against Storybook. Is there an issue on Typescript? Seems like that type of output change should have been behind a flag.

I'm assuming 3.7 can read output from 3.6.

That's a lesson to all of us... Bumping a shared library a minor version and making use of that feature is a breaking change.

@lychyi
Copy link
Contributor Author

lychyi commented Feb 10, 2020

For posterity purposes:

This is the Storybook issue.

This is largely due to TypeScript's update to 3.6 to 3.7 where type definitions for getters are generated differently. This is TS's response, saying that it's working as intended.

For a lot of library maintainers and Angular folks who are stuck on typescript@~3.6.0 the jump from 3.6 to 3.7 was actually a breaking change. And now, since it wasn't signaled that way from TypeScript, it is a pain to do simple things like go from Storybook 5.2 to 5.3.

I'm working on a PR for Storybook, but in the meantime, I'll put a comment on there to see if they know of a quicker fix.

@anicholls anicholls changed the title Storybook update chore: Update Storybook to 5.3 Feb 11, 2020
@lychyi lychyi added this to In progress (PRs) in Current Sprint (7/20 - 8/9) via automation Feb 11, 2020
@lychyi
Copy link
Contributor Author

lychyi commented Feb 18, 2020

This is getting resolved in Storybook itself. We're close 🤞

storybookjs/storybook#9847

@jpante jpante removed this from In Progress in Current Sprint (7/20 - 8/9) Mar 3, 2020
Storybook has its own instance of emotion theming so we need to sync version as we upgrade it
@cypress
Copy link

cypress bot commented Mar 6, 2020



Test summary

185 0 0 0


Run details

Project canvas-kit
Status Passed
Commit a683b90 ℹ️
Started Mar 9, 2020 6:13 PM
Ended Mar 9, 2020 6:16 PM
Duration 03:05 💡
OS Linux Ubuntu Linux - 16.04
Browser Electron 78

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@lychyi
Copy link
Contributor Author

lychyi commented Mar 6, 2020

Someone give me an amen @NicholasBoll

@NicholasBoll
Copy link
Member

We may want a blurb in our documentation that mentions this issue. Someone using Storybook need to have their version of Storybook synced for our theming to work, right? It doesn't necessarily matter which patch version we require.

@NicholasBoll NicholasBoll merged commit 6a27969 into Workday:master Mar 9, 2020
@anicholls anicholls mentioned this pull request Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to Storybook ^5.3
3 participants