Skip to content

fix(ScrollVelocity): default parallax/scroller class in tailwind variants - #1079

Open
MauryaQbit wants to merge 1 commit into
DavidHDev:mainfrom
MauryaQbit:feat/fix-scrollvelocity-undefined-class
Open

MauryaQbit wants to merge 1 commit into
DavidHDev:mainfrom
MauryaQbit:feat/fix-scrollvelocity-undefined-class

Conversation

@MauryaQbit

Copy link
Copy Markdown
Contributor

Fixes #1078.

The Tailwind variants of ScrollVelocity rendered a literal undefined class on every default usage because parallaxClassName / scrollerClassName had no defaults while the render path interpolates them:

<div className={`${parallaxClassName} relative overflow-hidden`}>

Changes

  • src/tailwind/TextAnimations/ScrollVelocity/ScrollVelocity.jsx: parallaxClassName = 'parallax', scrollerClassName = 'scroller'
  • src/ts-tailwind/TextAnimations/ScrollVelocity/ScrollVelocity.tsx: same
  • public/r/ScrollVelocity-JS-TW.json, public/r/ScrollVelocity-TS-TW.json: regenerated content for the two affected variants only (patched without line-ending churn; full registry:build touches 687 files on Windows, so unrelated files left untouched per fix(LetterGlitch): smooth colour transitions freeze after one frame #1070 precedent)

Aligned to the majority + docs (content / ts-default / ScrollVelocityDemo.jsx:82,88 already use 'parallax' / 'scroller'), following the #1060 variant-parity precedent. '' would also remove undefined but would fail check:prop-docs variant agreement.

Testing

  • Repro before: `${undefined} relative overflow-hidden` -> "undefined relative overflow-hidden"; after: "parallax relative overflow-hidden", custom values still pass through.
  • npm run check:prop-docs PASS (1934 defaults, 171 tables/components).
  • npx eslint src/tailwind/TextAnimations/ScrollVelocity/ScrollVelocity.jsx --max-warnings 0 PASS.
  • npx tsc --noEmit --skipLibCheck PASS.
  • Verified desktop/mobile preview path unchanged (demo uses content variant explicitly; TW change only replaces undefined token with documented default).

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.

[BUG]: ScrollVelocity Tailwind variants render 'undefined' class when parallaxClassName/scrollerClassName omitted

1 participant