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

docs: adds an Odyssey theme for Storybook #1183

Merged
merged 16 commits into from
Nov 16, 2021

Conversation

edburyenegren-okta
Copy link
Contributor

Customizes our SB UI via the theming interface with values from @josesolano-okta.

@edburyenegren-okta edburyenegren-okta requested a review from a team as a code owner November 15, 2021 18:36

brandTitle: "Odyssey Design System",
//brandUrl: 'https://odyssey.okta.com',
//brandImage: 'https://place-hold.it/350x150',
Copy link

@ghost ghost Nov 15, 2021

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?

Copy link
Contributor Author

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.

Copy link

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

Copy link
Contributor

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.

Copy link
Contributor Author

@edburyenegren-okta edburyenegren-okta Nov 15, 2021

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?

Copy link
Contributor Author

@edburyenegren-okta edburyenegren-okta Nov 16, 2021

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.

Copy link
Contributor Author

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 💯.

Comment on lines +23 to +25
.sbdocs .sbdocs-a {
color: #1662dd;
}
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Comment on lines +15 to +21
order: [
"Welcome",
"Contributing",
"Guidelines",
"Components",
"Utilities",
],
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

Copy link
Contributor

@arnoldsandoval-okta arnoldsandoval-okta left a 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
@edburyenegren-okta edburyenegren-okta merged commit 63a9458 into develop Nov 16, 2021
@edburyenegren-okta edburyenegren-okta deleted the ee/theme-storybook branch November 16, 2021 22:53
macyabbey-okta pushed a commit that referenced this pull request Nov 17, 2021
* 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>
arnoldsandoval-okta added a commit that referenced this pull request Nov 18, 2021
* 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>
arnoldsandoval-okta added a commit that referenced this pull request Nov 19, 2021
* 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>
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.

2 participants