fix: correct 48 drifted prop-table defaults and align 4 variant default mismatches - #1060
Open
Agnik47 wants to merge 2 commits into
Open
fix: correct 48 drifted prop-table defaults and align 4 variant default mismatches#1060Agnik47 wants to merge 2 commits into
Agnik47 wants to merge 2 commits into
Conversation
…nt sources The `propData` tables rendered on the component docs pages had drifted from the actual defaults declared in each component. 48 entries across 16 components documented a value the code does not use, so anyone reading the table (or pasting it into an AI assistant) got code that behaves differently from what the docs promised. Each corrected value is taken from the JS-CSS source, which is the variant the docs page renders. Worst case was TextPressure, whose table was shifted by one row: `textColor` showed `stroke`'s default, `strokeColor` showed `textColor`'s, and `className` showed `strokeColor`'s. Refs DavidHDev#1058 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019zcJiZJ3Y6DoLvLT2gKLfC
CONTRIBUTING requires the 4 variants to stay in sync, but three props shipped a different default depending on which variant you installed. In each case 3 of the 4 variants agree and the documented default agrees with that majority, so the odd one out is corrected: - GlitchText `speed` JS-CSS 1 -> 0.5 - GlitchText `enableOnHover` JS-CSS true -> false - MetaBalls `enableTransparency` JS-CSS true -> false - SideRays `falloff` TS-TW 2.0 -> 1.6 GlitchText was the user-visible one: the JS-CSS variant glitched continuously while the other three only glitched on hover. The MetaBalls demo never passed `enableTransparency`, so it relied on the JS-CSS default. It now passes the prop explicitly, which keeps the rendered preview exactly as it is today. Registry items for the three affected variants are rebuilt to match. Two further splits are deliberately left alone because the intended value is not mine to pick - see the PR description. Refs DavidHDev#1058 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019zcJiZJ3Y6DoLvLT2gKLfC
2 tasks
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.
Fixes the two defects reported in #1058. Split into two commits so you can take one and drop the other.
1.
fix(docs)— 48 prop-table defaults corrected (15 files, docs only)propDatainsrc/demo/**/*Demo.jsxhad drifted from the components. 48 entries across 16 components documented a value the code does not use. Every corrected value is read from the JS-CSS source, which is the variant the docs page renders.No runtime behaviour changes in this commit — it only touches the documented values.
The clearest one was
TextPressure, whose table was shifted by a row:textColortrue(that'sstroke's default)#FFFFFFstrokeColor#FFFFFF(that'stextColor's)#FF0000className#FF0000(that'sstrokeColor's)""Others of note:
ClickSparkhad all four ofsparkColor/sparkSize/sparkRadius/durationwrong;SideRayshad seven props wrong;Lightfallseven;LightRaysfour.2.
fix(variants)— 3 components where the 4 variants disagreedCONTRIBUTING rule 5 asks for the variants to stay in sync, but these shipped a different default depending on which variant you installed. In each case 3 of the 4 agree and the documented default agrees with that majority, so I corrected the outlier:
GlitchTextspeed1→0.50.5GlitchTextenableOnHovertrue→falsefalseMetaBallsenableTransparencytrue→falsefalseSideRaysfalloff2.0→1.61.6GlitchTextwas the user-visible one — install JS-CSS and it glitches continuously; install any other variant and it only glitches on hover.Preview impact: the
GlitchTextandSideRaysdemos pass these props explicitly, so nothing changes on screen. TheMetaBallsdemo did not passenableTransparencyand relied on the JS-CSS default, so flipping it would have made the preview opaque in light mode — the demo now passesenableTransparencyexplicitly, keeping the preview exactly as it is today.Registry items for the three affected variants (
GlitchText-JS-CSS,MetaBalls-JS-CSS,SideRays-TS-TW) are rebuilt to match, following the same pattern as the Hyperspeed and ShapeBlur fixes. Each is a one-line change; no other registry file is touched.Deliberately left alone — your call, not mine
Two splits have no majority and no tiebreaker, so I did not guess:
FuzzyTextfontSize— JS variants useclamp(2rem, 10vw, 10rem), TS variants useclamp(2rem, 8vw, 8rem). A 2-2 split, inconsistent since the component was first added. The docs currently say8vw.LiquidChromeamplitude/frequencyY— JS-CSS uses0.3/3, the other three use0.5/2, and the docs matched neither (0.6/1.5). I set the docs to the JS-CSS values since that is what the docs page renders, and left all four sources untouched.Tell me which value you want in each and I'll follow up.
RippleDistortion'ssrcis also flagged by my scan, but its table deliberately truncates a long Unsplash URL to'https://images.unsplash.com/...'. Left as-is.Verification
npm run lint— 44 problems (33 errors, 11 warnings), identical before and after; all pre-existing.npx prettier --checkon the touched files — same pass/fail set before and after; no new formatting deviations.npx vite build— passes.Scope note
My scan could not parse the prop signature of 60 of the 171 components, so this is a lower bound rather than a complete audit. The checker script I offered in #1058 is not included here to keep this PR reviewable — happy to send it separately if you want the class of bug prevented rather than just fixed.
Refs #1058