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

Update CSS token per new design system theming capability #16

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

fajar-apri-alaska
Copy link
Contributor

Alaska Airlines Pull Request

Fixes: #15

Summary:

  • Update the design tokens to reflect the new theming conventions regarding tokens from the AuroDesignTokens and JetstreamDesignTokens repo.
  • Keep the old legacy tokens for now.
  • Fix the postCSS script to only use newest standard of WC-generator.
  • remove unused npm packages (used in postCss).

Type of change:

Please delete options that are not relevant.

  • Revision of an existing capability

Checklist:

  • My update follows the CONTRIBUTING guidelines of this project
  • I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!

-- Auro Design System Team

@fajar-apri-alaska fajar-apri-alaska linked an issue Nov 8, 2023 that may be closed by this pull request
@fajar-apri-alaska fajar-apri-alaska force-pushed the fajarapri/updateCSSToken/#15 branch 2 times, most recently from 05d67bc to ce74805 Compare November 8, 2023 08:28
- fix the postCSS script to only use newest WC-standard
- remove unused npm packages
- keep the old legacy tokens for now
- fix the test script

Changes to be committed:
	modified:   demo/index.html
	modified:   demo/style.scss
	modified:   package-lock.json
	modified:   package.json
	modified:   scripts/postCss.js
	deleted:    scripts/removeNonRemPlugin.js
	deleted:    src/style-fixed.css.map
	deleted:    src/style-fixed.map
	deleted:    src/style-fixed.scss
	modified:   src/style.css.map
	modified:   src/style.scss
@jason-capsule42 jason-capsule42 merged commit 113b97d into main Nov 8, 2023
3 checks passed
@jason-capsule42 jason-capsule42 deleted the fajarapri/updateCSSToken/#15 branch November 8, 2023 17:22
Comment on lines +35 to +39
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs/prism.js"></script>
<script>
// import 'https://unpkg.com/marked@latest/marked.min.js';
// import 'https://unpkg.com/prismjs@latest/prism.js';
Copy link
Member

Choose a reason for hiding this comment

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

@jason-capsule42 and @fajar-apri-alaska not sure why this was passed though? Why were lines 38 and 39 commented out and 35 and 36 added? This is not how we have things laid out in the generator.

https://github.com/AlaskaAirlines/WC-Generator/blob/4a488a19c82508e4882626de03474ac555e1ba6a/template/demo/index.html#L31-L36

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this one was my bad, I should just add <script type=module> instead of did above changes. I forgot that this changes is not mandatory, just the marked.parse part that is.

Comment on lines +24 to +25
"@alaskaairux/design-tokens": "^3.15.5",
"@aurodesignsystem/design-tokens": "^4.2.0",
Copy link
Member

Choose a reason for hiding this comment

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

If the new tokens were added and the code updated to support the --ds namespace, why is the legacy library still installed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh for this one I follow this hyperlink feedback, a need to keep the legacy tokens around for the time being.
AlaskaAirlines/auro-hyperlink#185 (comment)

FYI I did this for the other currently open PR's, so if this is not needed, then I should remove those as well in the other components.

Copy link
Member

Choose a reason for hiding this comment

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

Oh... that may be a misunderstanding. We do not need to keep the package dependency if both tokens and WCSS is updated and there is no other internal dependency to the element that needs this.

But there are external peer dependencies that need the legacy tokens, so all we need to do is keep that on the ./demo/index.html page.

await expect(el.shadowRoot.innerHTML).contains(`--insetSm:var(--inset)`);
await expect(el.shadowRoot.innerHTML).contains(`--insetMd:var(--insetSm)`);
await expect(el.shadowRoot.innerHTML).contains(`--insetLg:var(--insetMd)`);
await expect(el.shadowRoot.innerHTML).contains(`--inset: var(--auro-size-none)`);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this have been updated to use a --ds value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure about this, it does refer to this render function though, should I make the changes on this also?

image

@fajar-apri-alaska
Copy link
Contributor Author

I will create another PR that will address above feedbacks since this one is already merged.
@jason-capsule42, @blackfalcon

@blackfalcon
Copy link
Member

🎉 This PR is included in version 2.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@blackfalcon blackfalcon added the released Completed work has been released label Jan 9, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auro-background: Theming Support
3 participants