-
Notifications
You must be signed in to change notification settings - Fork 31
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
docs: adds an Odyssey theme for Storybook #1183
Conversation
|
||
brandTitle: "Odyssey Design System", | ||
//brandUrl: 'https://odyssey.okta.com', | ||
//brandImage: 'https://place-hold.it/350x150', |
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.
curious - could you build this using entirely using values exported from @okta/odyssey-design-tokens
at this point? What would we be missing?
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.
Yup! Everything here uses existing tokens straight from the palette, so we could use those here if SB were set up to ingest them.
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.
@edburyenegren-okta that is great - but I see the theme values hardcoded here, I was expecting to see something like this:
import { colors, font, ... } from "@okta/odyssey-design-tokens"
where we compose the values here
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.
Im going to take on this chunk of work, lets not let it hold up the merge. I will handle in a FF.
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.
@arnoldsandoval-okta and I fixed up the tokens package to get it working locally (previously, the build was failing). However, I'm now getting this error in CI:
ERR! Module not found: Error: Can't resolve '@okta/odyssey-design-tokens' in '/home/runner/work/odyssey/odyssey/packages/odyssey-storybook/.storybook'
Looks like our tokens package isn't prepped for consumption correctly?
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.
Adding the package via yarn add
fails, which is why yarn.lock
hasn't been updated yet either.
Local packages must have a version specified for install or yarn
will ping the remote registry before looking locally.
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.
Setting this down for the night, but confirming that yarn build-storybook
also fails locally while relying on @okta/odyssey-design-tokens
. Local development is still 💯.
.sbdocs .sbdocs-a { | ||
color: #1662dd; | ||
} |
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.
😢 theming doesnt allow us to override 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.
Nope 😞
SB-Docs doesn't have a theme interface, so this is their preferred method for targeting the addon styles for now.
order: [ | ||
"Welcome", | ||
"Contributing", | ||
"Guidelines", | ||
"Components", | ||
"Utilities", | ||
], |
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.
❤️
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.
We can tackle tokens in a fast follow. Lets coordinate next steps over DM.
Co-authored-by: Arnold Sandoval <62259644+arnoldsandoval-okta@users.noreply.github.com>
* build(odyssey-design-tokens): add prepare script * build(odyssey-design-tokens): add stylelint config to ignore dist
* docs(odyssey-storybook): adds an Odyssey theme for Storybook * docs(odyssey-storybook): updates contribution guidelines * fix(odyssey-design-tokens): call "value" instead of whole objects * build(odyssey-design-tokens): add prepare script * build(odyssey-design-tokens): add stylelint config to ignore dist Co-authored-by: Arnold Sandoval <62259644+arnoldsandoval-okta@users.noreply.github.com> Co-authored-by: Jeff Belser <63716167+jeffbelser-okta@users.noreply.github.com>
* chore(odyssey-react): add text component to tag (#1169) * chore(odyssey-react): add text component to infobox (#1171) * feat(odyssey-react): Text component refactor in Banner (#1160) * feat(odyssey-react): refactor Banner to use Text component. Add default font family to Heading * chore(odyssey-react): add semantic tag back in for banner * chore(odyssey-storybook): remove deprecated global styles from storybook * Revert "chore(odyssey-storybook): remove deprecated global styles from storybook" This reverts commit 247e5f0. * Add documentation template (#1166) * docs: added documentation template for contributors * chore(odyssey-react): fix Form type annotation and improve Toast.Provider story (#1175) * chore(odyssey-react): fix type annotations for form * chore(odyssey-react): use odyssey form component in Toast.Provider story * chore(odyssey-react): use relative path for form import in toast story * chore(odyssey-react): add text component to tooltip (#1170) * chore(odyssey-react): add text component to tooltip * chore(odyssey-react): remove text css for tooltip * build: use conventional commits for changelog and lint * test(odyssey-react): add coverage for controlled Select * refactor(odyssey-react): use Text for List * feat: support async select options * feat: expose hidden choices reference * fix: lint * fix: remove added dep / prop * fix: updates per review feedback * fix: type issue need cast to force union start type when using callback * fix: controlled select case by using to ref.current * docs: adds an Odyssey theme for Storybook (#1183) * docs(odyssey-storybook): adds an Odyssey theme for Storybook * docs(odyssey-storybook): updates contribution guidelines * fix(odyssey-design-tokens): call "value" instead of whole objects * build(odyssey-design-tokens): add prepare script * build(odyssey-design-tokens): add stylelint config to ignore dist Co-authored-by: Arnold Sandoval <62259644+arnoldsandoval-okta@users.noreply.github.com> Co-authored-by: Jeff Belser <63716167+jeffbelser-okta@users.noreply.github.com> * refactor(odyssey-react): move related types into useChoices module * docs: adds an Odyssey theme for Storybook (#1183) * docs(odyssey-storybook): adds an Odyssey theme for Storybook * docs(odyssey-storybook): updates contribution guidelines * fix(odyssey-design-tokens): call "value" instead of whole objects * build(odyssey-design-tokens): add prepare script * build(odyssey-design-tokens): add stylelint config to ignore dist Co-authored-by: Arnold Sandoval <62259644+arnoldsandoval-okta@users.noreply.github.com> Co-authored-by: Jeff Belser <63716167+jeffbelser-okta@users.noreply.github.com> * build: bump versions for v0.8.4 * docs: update CHANGELOG for v0.8.4 Co-authored-by: Edbury Enegren <edbury.enegren@okta.com> Co-authored-by: Jeff Belser <63716167+jeffbelser-okta@users.noreply.github.com> Co-authored-by: MACY ABBEY <macy.abbey@okta.com>
* chore(odyssey-react): add text component to tag (#1169) * chore(odyssey-react): add text component to infobox (#1171) * feat(odyssey-react): Text component refactor in Banner (#1160) * feat(odyssey-react): refactor Banner to use Text component. Add default font family to Heading * chore(odyssey-react): add semantic tag back in for banner * chore(odyssey-storybook): remove deprecated global styles from storybook * Revert "chore(odyssey-storybook): remove deprecated global styles from storybook" This reverts commit 247e5f0. * Add documentation template (#1166) * docs: added documentation template for contributors * chore(odyssey-react): fix Form type annotation and improve Toast.Provider story (#1175) * chore(odyssey-react): fix type annotations for form * chore(odyssey-react): use odyssey form component in Toast.Provider story * chore(odyssey-react): use relative path for form import in toast story * chore(odyssey-react): add text component to tooltip (#1170) * chore(odyssey-react): add text component to tooltip * chore(odyssey-react): remove text css for tooltip * build: use conventional commits for changelog and lint * test(odyssey-react): add coverage for controlled Select * refactor(odyssey-react): use Text for List * feat: support async select options * feat: expose hidden choices reference * fix: lint * fix: remove added dep / prop * fix: updates per review feedback * fix: type issue need cast to force union start type when using callback * fix: controlled select case by using to ref.current * docs: adds an Odyssey theme for Storybook (#1183) * docs(odyssey-storybook): adds an Odyssey theme for Storybook * docs(odyssey-storybook): updates contribution guidelines * fix(odyssey-design-tokens): call "value" instead of whole objects * build(odyssey-design-tokens): add prepare script * build(odyssey-design-tokens): add stylelint config to ignore dist Co-authored-by: Arnold Sandoval <62259644+arnoldsandoval-okta@users.noreply.github.com> Co-authored-by: Jeff Belser <63716167+jeffbelser-okta@users.noreply.github.com> * refactor(odyssey-react): move related types into useChoices module * docs: adds an Odyssey theme for Storybook (#1183) * docs(odyssey-storybook): adds an Odyssey theme for Storybook * docs(odyssey-storybook): updates contribution guidelines * fix(odyssey-design-tokens): call "value" instead of whole objects * build(odyssey-design-tokens): add prepare script * build(odyssey-design-tokens): add stylelint config to ignore dist Co-authored-by: Arnold Sandoval <62259644+arnoldsandoval-okta@users.noreply.github.com> Co-authored-by: Jeff Belser <63716167+jeffbelser-okta@users.noreply.github.com> * build: bump versions for v0.8.4 * docs: update CHANGELOG for v0.8.4 Co-authored-by: Edbury Enegren <edbury.enegren@okta.com> Co-authored-by: Jeff Belser <63716167+jeffbelser-okta@users.noreply.github.com> Co-authored-by: MACY ABBEY <macy.abbey@okta.com> Co-authored-by: Edbury Enegren <edbury.enegren@okta.com> Co-authored-by: Jeff Belser <63716167+jeffbelser-okta@users.noreply.github.com> Co-authored-by: MACY ABBEY <macy.abbey@okta.com>
Customizes our SB UI via the theming interface with values from @josesolano-okta.