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

JSVariable variable names invalid, possible docs update? #31

Closed
littleninja opened this issue Oct 28, 2020 · 3 comments · Fixed by #33
Closed

JSVariable variable names invalid, possible docs update? #31

littleninja opened this issue Oct 28, 2020 · 3 comments · Fixed by #33
Assignees
Labels
released Completed work has been released Status: Work In Progress Issue or Pull Request work is in Progress Type: Bug Bug or Bug fixes

Comments

@littleninja
Copy link
Contributor

Sorry, there might be a few issues rolled into this. I tried playing with jss and went for our Javascript tokens but wasn't sure how to consume them, so I started with our Auro docs. There are several JS* files. I noticed JSData--color.js has an object structure and I can pull the color like so:

import { color } from '@alaskaairux/orion-design-tokens/dist/tokens/JSData--color';
console.log(color.background.lightest.value); // #ffffff 👍🏻

Issue 1

I think token documentation for ESModules might be out of date. It references title case variables like ColorAlertNotificationOnLight from JSVariables--color.js but current variable names are kebab (see below). Can I use JSData--color.js too?

Issue 2

Next, because the docs suggested JSVariables--color.js I looked for the titlecase variables. From the StyleDictionary configuration, and from a quick search it looks like this doesn't conform with rules for accepted identifiers (variable names). The question here is a bit more complicated: the object syntax above is fine, what was the hopeful goal of autogenerated variable names vs. object? Assuming we need the variable name case, I think this would be fixed by using camel or title case (just not kebab).

image

@blackfalcon blackfalcon self-assigned this Nov 13, 2020
@blackfalcon blackfalcon added the Type: Bug Bug or Bug fixes label Nov 13, 2020
@blackfalcon blackfalcon added this to Backlog in Auro (general board) via automation Nov 13, 2020
@blackfalcon blackfalcon moved this from Backlog to Current WIP Release in Auro (general board) Nov 13, 2020
@blackfalcon
Copy link
Member

Good catch. This file is not really used and what I think happened is with the last major refactor the output file was altered and not caught.

I am working on a major release for the Tokens that removes all legacy Orion and Classic support, this update will be added to that branch.

I will also retroactive update the previous version of Tokens to address this bug.

@blackfalcon blackfalcon linked a pull request Nov 13, 2020 that will close this issue
6 tasks
@blackfalcon blackfalcon mentioned this issue Nov 13, 2020
6 tasks
@blackfalcon blackfalcon added the Status: Work In Progress Issue or Pull Request work is in Progress label Nov 13, 2020
Auro (general board) automation moved this from Current WIP Release to Done/Deployed/Closed Nov 14, 2020
AuroDesignSystem pushed a commit that referenced this issue Nov 14, 2020
## [2.12.3](v2.12.2...v2.12.3) (2020-11-14)

### Bug Fixes

* [#31](#31) update config to output correct data from Tokens ([7e1dc82](7e1dc82))
@AuroDesignSystem
Copy link
Collaborator

🎉 This issue has been resolved in version 2.12.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@AuroDesignSystem AuroDesignSystem added the released Completed work has been released label Nov 14, 2020
AuroDesignSystem pushed a commit that referenced this issue Nov 14, 2020
# [3.0.0](v2.12.3...v3.0.0) (2020-11-14)

### Bug Fixes

* [#31](#31) update config to output correct data from Tokens ([c548d98](c548d98))

### Build System

* update repo url ([e0a8701](e0a8701))

### Performance Improvements

* remove deprecated tokens ([7545302](7545302))

### BREAKING CHANGES

* forcing chance; previous build failed
* This update will effectively remove all legacy colors and Orion references
@AuroDesignSystem
Copy link
Collaborator

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Completed work has been released Status: Work In Progress Issue or Pull Request work is in Progress Type: Bug Bug or Bug fixes
Projects
Auro (general board)
  
Done/Deployed/Closed
Development

Successfully merging a pull request may close this issue.

3 participants