Skip to content

Preserve explicitly configured zero typing delays - #30

Merged
liuliu-dev merged 2 commits into
github:mainfrom
feritcemkahraman:fix/preserve-zero-typing-delays
Oct 20, 2026
Merged

liuliu-dev merged 2 commits into
github:mainfrom
feritcemkahraman:fix/preserve-zero-typing-delays

Conversation

@feritcemkahraman

@feritcemkahraman feritcemkahraman commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Setting characterDelay or lineDelay to zero still returns the default 40 ms, so callers cannot turn off the corresponding delay. Both setters already accept zero, and the typing implementation already supports it.

Preserve numeric zero before applying the existing fallback. Missing, empty or whitespace-only attributes keep their default, and reduced-motion handling is unchanged. The regression covers delay attributes, property assignments, and empty/whitespace/fractional fallbacks.

Validation: the regression first returned 40 instead of zero; all 9 Chromium tests now pass through the repository's Karma runner. The TypeScript distribution build and full ESLint check pass with the installed lockfile dependencies on Node 24. The Windows cleanup wrapper was bypassed by running the same tools directly; Firefox and WebKit were not run.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Whitespace-only delay attributes now disable delays instead of retaining the 40 ms default.

1 open issue
What changed in this PR

Allows callers to disable character and line delays explicitly in the typing-effect element.

Changes:

  • Preserves numeric zero in both delay getters.
  • Adds regression coverage for attributes, property assignments, and empty-attribute defaults.
File Description
test/​test.js Tests zero delays and empty-attribute fallback.
src/​index.ts Preserves zero before applying the existing fallback.

Review effort: Max

Comment thread src/index.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The localized changes match the intended behavior and include focused regression coverage.

No open issues 🎉

1 resolved since last review

Review effort: Max

@liuliu-dev
liuliu-dev merged commit ca039a4 into github:main Oct 20, 2026
2 checks passed
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.

3 participants