Skip to content

Conversation

rubencarvalho
Copy link
Contributor

@rubencarvalho rubencarvalho commented Feb 6, 2025

Description

Make tasks/process-spectrum more robust to changes in CSS theme overrides. This is needed for the upcoming component icon and component CSS dependency updates, to make sure we don't leave stale files behind!

Motivation and context

  • The CSS pulled from the latest s2-foundations-redux branch no longer defined several theme-specific variables that had been present in earlier released versions of the CSS components used by SWC (likely because they were no longer necessary - great!).
  • The logic in SWC’s tasks/process-spectrum script was not designed to handle cases where previously existing CSS theme files were removed. Specifically, process-spectrum skipped writing *-overrides.css files for missing or empty theme files. While this seems logical, it created issues by leaving behind outdated (or “stale”) *-overrides.css files when corresponding theme files were removed.

To fix this, I updated the logic in process-spectrum to always write *-overrides.css files, even for empty or removed theme files, which successfully resolved the issue.

Picked up from #4999 draft.

How has this been tested?

  • Test case 1
    1. Go here
    2. Do this
  • Test case 2

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

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.

Copy link

changeset-bot bot commented Feb 6, 2025

⚠️ No Changeset found

Latest commit: c46f039

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Feb 6, 2025

Branch preview

Review the following VRT differences

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link
Contributor

github-actions bot commented Feb 6, 2025

Tachometer results

Currently, no packages are changed by this PR...

Copy link
Contributor

github-actions bot commented Feb 6, 2025

Lighthouse scores

Category Latest (report) Main (report) Branch (report)
Performance 0.99 0.98 0.98
Accessibility 1 1 1
Best Practices 1 1 1
SEO 1 0.92 0.92
PWA 1 1 1
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 main ("Main"). Higher scores are better, but note that the SEO scores on Netlify URLs are artifically constrained to 0.92.

Transfer Size

Category Latest Main Branch
Total 251.028 kB 236.288 kB 🏆 236.29 kB
Scripts 61.689 kB 54.399 kB 54.367 kB 🏆
Stylesheet 53.308 kB 47.377 kB 🏆 47.517 kB
Document 6.221 kB 5.458 kB 🏆 5.46 kB
Font 126.928 kB 126.645 kB 126.596 kB 🏆

Request Count

Category Latest Main Branch
Total 52 52 52
Scripts 41 41 41
Stylesheet 5 5 5
Document 1 1 1
Font 2 2 2

@coveralls
Copy link
Collaborator

coveralls commented Feb 6, 2025

Pull Request Test Coverage Report for Build 13187849064

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.003%) to 98.189%

Totals Coverage Status
Change from base Build 13141300428: -0.003%
Covered Lines: 33099
Relevant Lines: 33528

💛 - Coveralls

@rubencarvalho rubencarvalho force-pushed the ruben/improve-process-spectrum branch from a6cedd5 to 3253497 Compare February 6, 2025 17:49
@rubencarvalho rubencarvalho force-pushed the ruben/improve-process-spectrum branch from c12eecc to c46f039 Compare February 6, 2025 20:53
@rubencarvalho rubencarvalho changed the title Ruben/improve process spectrum chore(tooling): make process-spectrum more robust Feb 6, 2025
@rubencarvalho rubencarvalho changed the title chore(tooling): make process-spectrum more robust chore(tooling): make process-spectrum more robust and always generate overrides Feb 6, 2025
@rubencarvalho rubencarvalho marked this pull request as ready for review February 6, 2025 21:45
@rubencarvalho rubencarvalho requested a review from a team as a code owner February 6, 2025 21:45
Copy link
Contributor

@TarunAdobe TarunAdobe left a comment

Choose a reason for hiding this comment

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

LGTM!!!

@rubencarvalho rubencarvalho merged commit 8c15bbd into main Feb 7, 2025
27 checks passed
@rubencarvalho rubencarvalho deleted the ruben/improve-process-spectrum branch February 7, 2025 08:38
nikkimk pushed a commit that referenced this pull request Feb 27, 2025
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.

3 participants