-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Fix crash when invalid args for library polished's functions #6939
Fix crash when invalid args for library polished's functions #6939
Conversation
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-fork-lonyele-fix-linear-gradient-crash.storybook.now.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!!! Can you call these lighten
and darken
for consistency's sake?
Yeap, I applied your feedbacks~ |
Thanks for contributing @lonyele 🎉 |
Oh, I'm working on this one, please wait for a while |
Hm... I'm not sure if the snapshot should be updated(https://circleci.com/gh/storybookjs/storybook/130895?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-checks-link) Help is needed here... I found from library btw after fixing crash, its values affect normally like this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lonyele run: yarn test --core --update Then commit the changes generated, to fix the snapshots. I can do it for you, just let me know. |
@ndelangen Hm... my changes of chromatic looks very wrong. I'll investigate this |
Indeed, I denied the changes that seems wrong. |
@ndelangen oh god... one of the most stupid mistake I've made in few months. I hung my head in shame... |
Issue: Fixes #6855, #6756, #6135
What I did
Problem
When using some functions from polished such as
lighten(...), darken(...)
, its arguments that can't be converted to RGB throws the errorCommit that possibly introduced this bug
Implementation
util.js
from@storybook/theming
(I couldn't find the place to put some util/shared functionalities across packages. If it doesn't look ok, please let me know where to put these kinds of functions)How to test