Skip to content

fix: correct 48 drifted prop-table defaults and align 4 variant default mismatches - #1060

Open
Agnik47 wants to merge 2 commits into
DavidHDev:mainfrom
Agnik47:fix/prop-table-defaults
Open

fix: correct 48 drifted prop-table defaults and align 4 variant default mismatches#1060
Agnik47 wants to merge 2 commits into
DavidHDev:mainfrom
Agnik47:fix/prop-table-defaults

Conversation

@Agnik47

@Agnik47 Agnik47 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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)

propData in src/demo/**/*Demo.jsx had 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:

Prop Was documented Actually
textColor true (that's stroke's default) #FFFFFF
strokeColor #FFFFFF (that's textColor's) #FF0000
className #FF0000 (that's strokeColor's) ""

Others of note: ClickSpark had all four of sparkColor / sparkSize / sparkRadius / duration wrong; SideRays had seven props wrong; Lightfall seven; LightRays four.

2. fix(variants) — 3 components where the 4 variants disagreed

CONTRIBUTING 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:

Component Prop Change Was
GlitchText speed JS-CSS 10.5 other 3 variants + docs: 0.5
GlitchText enableOnHover JS-CSS truefalse other 3 variants + docs: false
MetaBalls enableTransparency JS-CSS truefalse other 3 variants + docs: false
SideRays falloff TS-TW 2.01.6 other 3 variants: 1.6

GlitchText was the user-visible one — install JS-CSS and it glitches continuously; install any other variant and it only glitches on hover.

Preview impact: the GlitchText and SideRays demos pass these props explicitly, so nothing changes on screen. The MetaBalls demo did not pass enableTransparency and relied on the JS-CSS default, so flipping it would have made the preview opaque in light mode — the demo now passes enableTransparency explicitly, 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:

  • FuzzyText fontSize — JS variants use clamp(2rem, 10vw, 10rem), TS variants use clamp(2rem, 8vw, 8rem). A 2-2 split, inconsistent since the component was first added. The docs currently say 8vw.
  • LiquidChrome amplitude / frequencyY — JS-CSS uses 0.3 / 3, the other three use 0.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's src is 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 --check on the touched files — same pass/fail set before and after; no new formatting deviations.
  • npx vite build — passes.
  • Re-ran the audit script after the changes: 0 remaining mismatches apart from the three cases listed above.

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

Agnik47 and others added 2 commits August 31, 2026 21:36
…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
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.

1 participant