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
ThemeProvider: add component & add cambio versions of Button / IconButton & LinkButton #317
ThemeProvider: add component & add cambio versions of Button / IconButton & LinkButton #317
Conversation
🦋 Changeset detectedLatest commit: 0efb08e The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
a0e32a6
to
3c442f7
Compare
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.
LGTM just had a question
if (color === "quaternary") { | ||
return "inverse"; | ||
} else if (color === "destructive-tertiary") { | ||
return "destructive-secondary"; | ||
} else if (color === "success-primary" || color === "success-secondary") { | ||
return "success"; | ||
} | ||
return color; |
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.
Is this here so the classic buttons don't break if we convert them to cambio? Is it going to be removed eventually?
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.
@btorndorff that is correct - added so both themes work with each other. Goal is to remove the classic
them eventually
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.
LGTM!
@@ -30,25 +36,46 @@ type ButtonProps = { | |||
/** | |||
* The color of the button | |||
* | |||
* Classic only: |
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.
Is it a typo that success-primary
and success-secondary
are in both the Classic and Cambio portion of the comment?
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.
@zprong updated - success
is classic only, success-primary
, success-secondary
and success-tertiary
are cambio only
@@ -40,78 +40,6 @@ | |||
"format": "json/flat" | |||
} | |||
] | |||
}, | |||
"android": { |
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.
Removed since they aren't used
@@ -7,7 +7,7 @@ | |||
}, | |||
"test": { | |||
"outputs": ["coverage/**"], | |||
"dependsOn": [] | |||
"dependsOn": ["^build"] |
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.
required now since we rely on a build version of our design tokens when running the tests
6a12f1c
to
0efb08e
Compare
@@ -26,7 +26,6 @@ | |||
"glob": "10.3.10", | |||
"jsdom": "22.0.0", | |||
"prettier": "2.8.8", | |||
"storybook-addon-rtl": "^0.5.0", |
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.
@nathan-ong @somethiiing fyi follow up from
https://github.com/Cambly/syntax/pull/289/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R29
Storybook specific dependencies should go inside the storybook
app so moved it to apps/storybook/package.json
const classicToCambioKeyLookup = { | ||
"color-base-black": "color-cambio-black", | ||
"color-base-destructive-100": "color-cambio-destructive-100", | ||
"color-base-destructive-200": undefined, // Deprecated - to be deleted |
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.
@ajmooo fyi still seeing quite a lot of usage of deprecated colors so just falling back to the legacy "classic" colors and will remove in a follow up
Description
In order to get ready for Cambio, the Cambly redesign, we're adding a "Cambio" theme and convert buttons over to the new design
Changes
Video
syntax-cambio-storybook-v2.mp4