USWDS - Utilities: Fix inaccuracies in utility code comments#5700
Closed
aduth wants to merge 1 commit into
Closed
Conversation
This was referenced Apr 10, 2024
Contributor
|
Thanks for this submission, @aduth! I am confirming that many of our comments in the I have opened issue #5860 for tracking, and also found a few more changes that I've added to PR #5859. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Internal code comments for utility classes now accurately reflect output CSS classes.
Related issue
Closes #5860
Problem statement
As a developer interested in optimizing the output size of bundles, I would like to eliminate utility classes not in use by configuring the
$output-these-utilitiestheme setting.This is already difficult enough as-is since there's not an easy reference of utility name to the associated output CSS classes, but it's made worse by inaccuracies within code documentation for the utility class implementations.Edit: In fairness, there is a list within the v3.0 migration guide, but it's not easy to find, and my instinct was to trust the source comments as a reference.
Solution
The changes here attempt to correct inaccuracies based on incorrect "usage" class name patterns, as well as removing invalid example keys for classes which don't exist.
Testing and review
Verify that the usage patterns and examples accurately reflect the expected outputs for that utility class.
These changes only affect code comments, so there should be no expected impact on the actual output of these utilities.