-
Notifications
You must be signed in to change notification settings - Fork 191
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
chore: updated tokens processing and now we're creating legacy-overrides
for S1/Express
#4442
base: main
Are you sure you want to change the base?
Conversation
… into jnjosh/theming-systems
…ctrum-web-components into jnjosh/theming-systems
Lighthouse scores
What is this?Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on Transfer Size
Request Count
|
Tachometer resultsChromeaction-bar permalinkbasic-test
action-menu permalinktest-basic
test-directive permalink
test-lazy permalink
test-open-close-directive permalink
test-open-close permalink
card permalinktest-basic
combobox permalinkbasic-test
light-dom-test permalink
illustrated-message permalinktest-basic
menu permalinktest-basic
overlay permalinkbasic-test
directive-test permalink
element-test permalink
lazy-test permalink
picker permalinkbasic-test
popover permalinktest-basic
slider permalinktest-basic
split-button permalinkbasic-test
tooltip permalinktest-basic
test-directive permalink
test-element permalink
test-lazy permalink
truncated permalinkbasic-test
Firefoxaction-bar permalinkbasic-test
action-menu permalinktest-basic
test-directive permalink
test-lazy permalink
test-open-close-directive permalink
test-open-close permalink
card permalinktest-basic
combobox permalinkbasic-test
light-dom-test permalink
illustrated-message permalinktest-basic
menu permalinktest-basic
overlay permalinkbasic-test
directive-test permalink
element-test permalink
lazy-test permalink
picker permalinkbasic-test
popover permalinktest-basic
slider permalinktest-basic
split-button permalinkbasic-test
tooltip permalinktest-basic
test-directive permalink
test-element permalink
test-lazy permalink
truncated permalinkbasic-test
|
spectrum-css
's S2 bridgelegacy-overrides
for S1/Express
// check if spectrumPath exists | ||
if (fs.existsSync(spectrumPath)) { | ||
let spectrum = fs.readFileSync(spectrumPath, 'utf8'); | ||
spectrum = removeImporantComments(targetHost(spectrum)); |
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.
spectrum = removeImporantComments(targetHost(spectrum)); | |
spectrum = removeImportantComments(targetHost(spectrum)); |
Small spelling note ^
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.
Oh question - I'm assuming this function removes the copyright which you're also adding to files - why not just keep the copyright and strip duplicates after merge? The postcss-discard-comments
plugin offers a removeAllButFirst
option which is a nice way to preserve the first copyright in the file.
Summary
This PR introduces changes to the Spectrum Web Components (SWC) project to facilitate the transition from Spectrum 1 (S1) to Spectrum 2 (S2) CSS. It includes the addition of a new index file
(component/{bridge,spectrum,express}/index.css)
in the@spectrum-css/tokens@14.1.0-alpha.3
package to assist in loading component-specific CSS. Additionally, it updates the SWC library to process the bridge file (referred to as legacy-overrides in SWC for now) and import it into the components.Changes Made
1.
@spectrum-css
added a new bridge file in the@spectrum-css/tokens@14.1.0-alpha.3
package to aid in loading component-specific CSS from the tokens module directly.2. Updated the
generate-token
script to include component's system levels inglobal-vars.css
3. Updated the
process-spectrum
script to create alegacy-override
css file from the@spectrum-css/tokens.../bridge.css
Note: Investigated and identified VRT failures due to changes in global CSS tokens in the new
sp-action-button
from the CSS side. For example,--mod-actionbutton-content-color-default
now points togray-25
instead ofgray-50
for the selected state, which might be a breaking change for S1.Questions and Discussions
Next Steps
Ensure there are no breaks to the existing code before merging.
Implement a PR off SWC’s main that swaps out loading bridge tokens from the tokens package instead of the component packages, and ensure there are no regressions.
Motivation and context
This PR is important to bring in S1/Express core tokens with S2 overrides keeping in mind
How has this been tested?
main
branch should just work as it is !!Screenshots (if appropriate)
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.