Skip to content

feat(typed effect): add fall typed effect (@d1rshan)#7793

Open
d1rshan wants to merge 13 commits intomonkeytypegame:masterfrom
d1rshan:feat/tumble-typed-effect
Open

feat(typed effect): add fall typed effect (@d1rshan)#7793
d1rshan wants to merge 13 commits intomonkeytypegame:masterfrom
d1rshan:feat/tumble-typed-effect

Conversation

@d1rshan
Copy link
Copy Markdown
Contributor

@d1rshan d1rshan commented Apr 8, 2026

tumble.mp4

This PR adds a new typed effect called fall.

When a correctly submitted word becomes typed, it creates a temporary animated clone that falls off the screen while the original word is hidden. Incorrect submitted words stay in place so error feedback remains visible.

This PR also introduces a dedicated typed-effects module for typed effects that need JavaScript behavior, so effect-specific logic does not have to live directly in test-ui.

also addresses #7847, makes sure fall works for reduced motion.

Copilot AI review requested due to automatic review settings April 8, 2026 20:16
@monkeytypegeorge monkeytypegeorge added frontend User interface or web stuff packages Changes in local packages labels Apr 8, 2026
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Apr 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new tumble typed effect for the test page, with a JS-driven animation that spawns a falling clone of correctly typed words while hiding the original word.

Changes:

  • Extend typed effect config schema + settings UI to include tumble.
  • Add a new frontend/src/ts/test/typed-effects.ts module to host JS-driven typed effects (currently tumble).
  • Wire typed effect lifecycle into test-ui (trigger on word typed, clear on show/finish) and add corresponding SCSS + keyframes.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/schemas/src/configs.ts Adds tumble to TypedEffectSchema enum.
frontend/src/ts/test/typed-effects.ts Implements JS behavior for tumble (clone + fall animation + cleanup).
frontend/src/ts/test/test-ui.ts Hooks typed-effects into word-typing flow and clears clones/styles on lifecycle events.
frontend/src/styles/test.scss Adds typed-effect-tumble hiding rule + .tumble-clone animation styling.
frontend/src/styles/animations.scss Adds @keyframes typedEffectTumble.
frontend/src/html/pages/settings.html Adds tumble button to typedEffect settings.

Comment thread frontend/src/ts/test/typed-effects.ts Outdated
Comment thread frontend/src/ts/test/test-ui.ts
Comment thread frontend/src/ts/test/test-ui.ts Outdated
Comment thread frontend/src/styles/test.scss Outdated
Comment thread frontend/src/ts/test/typed-effects.ts Outdated
@d1rshan d1rshan requested a review from nadalaba April 16, 2026 13:59
Comment thread frontend/src/ts/test/typed-effects.ts Outdated
@Miodec
Copy link
Copy Markdown
Member

Miodec commented Apr 28, 2026

Tumble makes me think the words would spin. I think rename to 'fall'?

@Miodec Miodec added the waiting for update Pull requests or issues that require changes/comments before continuing label Apr 28, 2026
@github-actions github-actions Bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Apr 29, 2026
@d1rshan d1rshan changed the title feat(typed effect): add tumble typed effect (@d1rshan) feat(typed effect): add fall typed effect (@d1rshan) Apr 29, 2026
@d1rshan
Copy link
Copy Markdown
Contributor Author

d1rshan commented Apr 29, 2026

hey mio, i updated it to 'fall'.

@Miodec
Copy link
Copy Markdown
Member

Miodec commented Apr 29, 2026

Maybe instead of having to define the animation via css we could use animejs for this? Also, the color of the fall clone is incorrect when using colorful mode or flip test colors.

@Miodec Miodec added waiting for update Pull requests or issues that require changes/comments before continuing and removed frontend User interface or web stuff packages Changes in local packages waiting for review Pull requests that require a review before continuing labels Apr 29, 2026
@monkeytypegeorge monkeytypegeorge added frontend User interface or web stuff packages Changes in local packages labels May 1, 2026
@github-actions github-actions Bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label May 1, 2026
@d1rshan
Copy link
Copy Markdown
Contributor Author

d1rshan commented May 2, 2026

hey @Miodec, i am not very familiar with animejs and i did try doing it with ai but the effect feels bit weird with animejs and since rest of the typed effects use css i think it's just cleaner to keep this effect as css too ? if u still insist, i can move the effect to animejs.

and i fixed the fall-clone color in modes affecting word colors.

@fehmer
Copy link
Copy Markdown
Member

fehmer commented May 2, 2026

Well, the other effects use just CSS and no JavaScript. It is already a special case.

@d1rshan
Copy link
Copy Markdown
Contributor Author

d1rshan commented May 2, 2026

Well, the other effects use just CSS and no JavaScript. It is already a special case.

okay, will do it.

@d1rshan
Copy link
Copy Markdown
Contributor Author

d1rshan commented May 2, 2026

updated to animejs, works almost the same now. works in flip colors and colorful mode too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff packages Changes in local packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants