Fix @ccprop typo hiding four CSS properties from the docs - #132
Merged
Conversation
`--focus-width`, `--focus-color`, `--divider-width`, and `--divider-color` were tagged `@ccprop` rather than `@cssprop`, so web-component-analyzer skipped them. They have been supported all along, but never appeared in the published docs or in editor autocomplete. The existing manifest test only checks tags that are already spelled correctly, so it could never have caught this. Adds a companion test that rejects any `@…prop…` tag the analyzer would not recognize.
✅ Deploy Preview for image-compare-component ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Overview
Four of the component's themeable custom properties —
--focus-width,--focus-color,--divider-width, and--divider-color— were tagged@ccpropinstead of@csspropin the source JSDoc.web-component-analyzerdoesn't recognize that spelling, so it skipped them entirely. The properties have worked all along and consumers can set them today, but they never showed up in the published documentation, and editors readingmanifest-vscode.jsonwouldn't autocomplete them. This corrects the four tags and regenerates the manifests, which adds the missing entries tomanifest.jsonandmanifest.md.The manifest test added in #129 checks that every property tagged
@csspropin the source reaches the manifest — so it covered the four recovered properties automatically, with no changes needed. But that framing means it could never have caught this bug in the first place: a misspelled tag is invisible to a test that only looks at correctly spelled ones. So this also adds a companion test that rejects any@…prop…tag the analyzer wouldn't recognize, which fails with the offending spelling named.@csspropand@csspropertyare both accepted, since the analyzer honors both.Screenshots
Testing
npm ci, thennpm test— 54 tests should passmanifests/manifest.mdand confirm the CSS Custom Properties table now lists ten rows, including--divider-color,--divider-width,--focus-color, and--focus-widthsrc/index.js, change one@csspropback to@ccpropand runnpm test— a test should fail saying the tag isn't spelled the way the analyzer expects, namingccprop. Revert the change.npm startand open the demo page — this is a documentation-only change, so the component should look and behave exactly as it does onmainCloses #130