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

(#392) Update safelist for community #395

Merged
merged 2 commits into from
Apr 15, 2024
Merged

Conversation

st3phhays
Copy link
Member

Description Of Changes

This updates the safelist for the community repository when PurgeCSS is
ran. Before, we were able to look at the node_modules folder to compare
content, but now that most libraries are dev dependencies of
choco-theme, they are not installed on each repository. In this case,
they are no longer there to be looked at. The fix for this is to,
instead look at the source CSS, to find the top level CSS locater and
add it to the safelist of things not to be purged. By doing this, all
the necessary CSS shows up in the final purged CSS file.

Motivation and Context

The changes here a necessary for Community to look correct.

Testing

  1. Ran CCR
  2. Opened and used the search box to ensure all styles showed
  3. Used the Editor on /packages to ensure all styles showed

Operating Systems Testing

n/a

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

#392

This updates the safelist for the community repository when PurgeCSS is
ran. Before, we were able to look at the node_modules folder to compare
content, but now that most libraries are dev dependencies of
choco-theme, they are not installed on each repository. In this case,
they are no longer there to be looked at. The fix for this is to,
instead look at the source CSS, to find the top level CSS locater and
add it to the safelist of things not to be purged. By doing this, all
the necessary CSS shows up in the final purged CSS file.
@st3phhays st3phhays self-assigned this Apr 13, 2024
@st3phhays st3phhays requested a review from gep13 April 13, 2024 13:43
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gep13 gep13 merged commit 0097c72 into chocolatey:main Apr 15, 2024
2 checks passed
@gep13
Copy link
Member

gep13 commented Apr 15, 2024

@st3phhays thanks for getting this fixed up!

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