Skip to content

Commit

Permalink
Fix some typos (#5930)
Browse files Browse the repository at this point in the history
## Summary

#5888 introduced spell checker on our CI and it turns out that there are
some typos in web LA codebase. This PR aims to remove them.

Also I've decided to add "lightspeed", "easings" and "snapshotting" into
correct words list, let me know if I should replace them with something
else.

Here you can find that these forms are actually correct:

- [snapshotting](https://www.verbix.com/webverbix/english/snapshot)
- [easings](https://www.verbix.com/webverbix/english/snapshot)
- [lightspeed](https://en.wiktionary.org/wiki/lightspeed)

## Test plan

Check that CI passes.
  • Loading branch information
m-bert committed Apr 23, 2024
1 parent bb69466 commit dbc71c8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
11 changes: 5 additions & 6 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
"workletizes",
"workletized",
"barfoo",
"devs"
],
"ignorePaths": [
"node_modules",
"docs/src/components/Testimonials"
"devs",
"lightspeed",
"easings",
"snapshotting"
],
"ignorePaths": ["node_modules", "docs/src/components/Testimonials"],
"useGitignore": true
}

2 changes: 1 addition & 1 deletion src/reanimated2/layoutReanimation/web/animationsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function checkUndefinedAnimationFail(
}

console.warn(
"[Reanimated] Couldn't load entering/exiting animation. Current version supports only predefined animations with modifiers: duration, delay, easing, randomizeDelay, wtihCallback, reducedMotion."
"[Reanimated] Couldn't load entering/exiting animation. Current version supports only predefined animations with modifiers: duration, delay, easing, randomizeDelay, withCallback, reducedMotion."
);

return true;
Expand Down
2 changes: 1 addition & 1 deletion src/reanimated2/layoutReanimation/web/componentUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export function handleExitingAnimation(

const scrollOffsets = getElementScrollValue(element);

// Scroll does not trigger snapshoting, therefore if we start exiting animation after
// Scroll does not trigger snapshotting, therefore if we start exiting animation after
// scrolling through parent component, dummy will end up in wrong place. In order to fix that
// we keep last known scroll position in snapshot and then adjust dummy position based on
// last known scroll offset and current scroll offset
Expand Down
4 changes: 2 additions & 2 deletions src/reanimated2/layoutReanimation/web/createAnimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { FadingTransition } from './transition/Fading.web';
import { insertWebAnimation } from './domUtils';

// Translate values are passed as numbers. However, if `translate` property receives number, it will not automatically
// convert it to `px`. Therefore if we want to keep exisitng transform we have to add 'px' suffix to each of translate values
// convert it to `px`. Therefore if we want to keep existing transform we have to add 'px' suffix to each of translate values
// that are present inside transform.
function addPxToTranslate(
existingTransform: NonNullable<TransformsStyle['transform']>
Expand Down Expand Up @@ -43,7 +43,7 @@ function addPxToTranslate(
return newTransform;
}

// In order to keep exisitng transform throughout animation, we have to add it to each of keyframe step.
// In order to keep existing transform throughout animation, we have to add it to each of keyframe step.
function addExistingTransform(
newAnimationData: AnimationData,
newTransform: ReanimatedWebTransformProperties[]
Expand Down

0 comments on commit dbc71c8

Please sign in to comment.