Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3c14aae
fix: Animation: Many Pages: The displayed animation cannot be stopped…
TaduJR Jan 25, 2026
8c92d31
fix: guard against state update on unmounted component in useReducedM…
TaduJR Jan 25, 2026
c4222c3
fix: use early return pattern in useReducedMotion to satisfy linter
TaduJR Jan 25, 2026
b94d527
test: add unit tests for useReducedMotion hook
TaduJR Jan 25, 2026
a0114cc
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Jan 31, 2026
76262aa
fix: hide all illustrations (SVG and Lottie) when reduce motion is en…
TaduJR Jan 31, 2026
a2e477b
fix: keep overlay content visible when reduce motion hides illustration
TaduJR Jan 31, 2026
6af3d75
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Feb 3, 2026
ade5003
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Feb 5, 2026
b2bb34d
fix: pause Lottie animations instead of hiding when reduced motion is…
TaduJR Feb 5, 2026
07bd271
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Feb 13, 2026
784f54a
fix: render paused Lottie first frame instead of empty view when redu…
TaduJR Feb 13, 2026
73952e7
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Feb 13, 2026
0924657
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Feb 21, 2026
5b950c7
fix: cache reduced motion value to prevent animation flash on compone…
TaduJR Feb 21, 2026
dbcd1f6
fix: show stable animation frame instead of blank first frame when re…
TaduJR Feb 21, 2026
65a2868
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Mar 4, 2026
6a8ac62
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Mar 5, 2026
9fdc4bb
fix: show static SVGs on native when reduced motion is enabled for so…
TaduJR Mar 5, 2026
d5497b9
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Mar 8, 2026
09d7180
fix: add SVG fallbacks for remaining Lottie consumers when reduced mo…
TaduJR Mar 8, 2026
bff4d6f
fix: resolve lint and type errors
TaduJR Mar 9, 2026
c58757a
fix: only use Fireworks SVG fallback when the illustration is actuall…
TaduJR Mar 9, 2026
f6f8e05
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Mar 12, 2026
23dec07
fix: revert SVG fallbacks for Hands and Abracadabra to prevent web crash
TaduJR Mar 12, 2026
a5c6ae1
fix: re-add SVG fallbacks for Hands and Abracadabra with flattened st…
TaduJR Mar 12, 2026
ec974ca
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Mar 12, 2026
3eba845
Merge branch 'main' of https://github.com/TaduJR/App into fix-Animati…
TaduJR Mar 13, 2026
d109951
feat: add SVG fallbacks for TripsEmptyState and Update animations whe…
TaduJR Mar 13, 2026
19f9e4b
chore: CI restart
TaduJR Mar 13, 2026
c5a7230
refactor: address coding standards - useSyncExternalStore, shared ill…
TaduJR Mar 13, 2026
d28fe05
chore: CI restart
TaduJR Mar 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/images/product-illustrations/upgrade-rocket.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 22 additions & 9 deletions src/components/BankAccountVerificationView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import useBottomSafeSafeAreaPaddingStyle from '@hooks/useBottomSafeSafeAreaPaddi
import {useMemoizedLazyIllustrations} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import Accessibility from '@libs/Accessibility';
import Navigation from '@navigation/Navigation';
import variables from '@styles/variables';
import CONST from '@src/CONST';
Expand All @@ -24,7 +25,8 @@ type BankAccountVerificationViewProps = {
function BankAccountVerificationView({verificationState, children, onVerifiedButtonPress, verifiedButtonText, verifiedTitle, verifiedSubtitle}: BankAccountVerificationViewProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
const illustrations = useMemoizedLazyIllustrations(['Puzzle']);
const isReduceMotionEnabled = Accessibility.useReducedMotion();
const illustrations = useMemoizedLazyIllustrations(['Puzzle', 'Fireworks']);
const bottomSafeAreaPaddingStyle = useBottomSafeSafeAreaPaddingStyle({addBottomSafeAreaPadding: true});

if (!verificationState) {
Expand Down Expand Up @@ -69,14 +71,25 @@ function BankAccountVerificationView({verificationState, children, onVerifiedBut
case CONST.EXPENSIFY_CARD.VERIFICATION_STATE.VERIFIED:
return (
<>
<BlockingView
title={verifiedTitle ?? translate('workspace.expensifyCard.bankAccountVerified')}
subtitle={verifiedSubtitle ?? translate('workspace.expensifyCard.bankAccountVerifiedDescription')}
animation={LottieAnimations.Fireworks}
animationStyles={styles.loadingVBAAnimation}
animationWebStyle={styles.loadingVBAAnimationWeb}
subtitleStyle={styles.textLabelSupporting}
/>
{isReduceMotionEnabled ? (
Comment thread
TaduJR marked this conversation as resolved.
Resolved
<BlockingView
title={verifiedTitle ?? translate('workspace.expensifyCard.bankAccountVerified')}
subtitle={verifiedSubtitle ?? translate('workspace.expensifyCard.bankAccountVerifiedDescription')}
icon={illustrations.Fireworks}
iconWidth={Number(styles.loadingVBAAnimation.width)}
iconHeight={Number(styles.loadingVBAAnimation.height)}
subtitleStyle={styles.textLabelSupporting}
/>
) : (
<BlockingView
title={verifiedTitle ?? translate('workspace.expensifyCard.bankAccountVerified')}
subtitle={verifiedSubtitle ?? translate('workspace.expensifyCard.bankAccountVerifiedDescription')}
animation={LottieAnimations.Fireworks}
animationStyles={styles.loadingVBAAnimation}
animationWebStyle={styles.loadingVBAAnimationWeb}
subtitleStyle={styles.textLabelSupporting}
/>
)}
<Button
success
large
Expand Down
58 changes: 39 additions & 19 deletions src/components/ConfirmationPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react';
import type {StyleProp, TextStyle, ViewStyle} from 'react-native';
import {StyleSheet, View} from 'react-native';
import {useMemoizedLazyIllustrations} from '@hooks/useLazyAsset';
import useThemeStyles from '@hooks/useThemeStyles';
import Accessibility from '@libs/Accessibility';
import isIllustrationLottieAnimation from '@libs/isIllustrationLottieAnimation';
import type IconAsset from '@src/types/utils/IconAsset';
import Button from './Button';
Expand Down Expand Up @@ -93,30 +95,48 @@ function ConfirmationPage({
innerContainerStyle,
}: ConfirmationPageProps) {
const styles = useThemeStyles();
const isReduceMotionEnabled = Accessibility.useReducedMotion();
const illustrations = useMemoizedLazyIllustrations(['Fireworks']);
const isLottie = isIllustrationLottieAnimation(illustration);
const shouldShowStaticFallback = isLottie && isReduceMotionEnabled && illustration === LottieAnimations.Fireworks;

return (
<View style={[styles.flex1, containerStyle]}>
<View style={[styles.screenCenteredContainer, styles.alignItemsCenter, innerContainerStyle]}>
{isLottie ? (
<Lottie
source={illustration}
autoPlay
loop
style={[styles.confirmationAnimation, illustrationStyle]}
webStyle={{
width: (StyleSheet.flatten(illustrationStyle)?.width as number) ?? styles.confirmationAnimation.width,
height: (StyleSheet.flatten(illustrationStyle)?.height as number) ?? styles.confirmationAnimation.height,
}}
/>
) : (
<View style={[styles.confirmationAnimation, illustrationStyle]}>
<ImageSVG
src={illustration}
contentFit="contain"
/>
</View>
)}
{(() => {
if (shouldShowStaticFallback) {
return (
<View style={[styles.confirmationAnimation, illustrationStyle]}>
<ImageSVG
src={illustrations.Fireworks}
contentFit="contain"
/>
</View>
);
}
if (isLottie) {
return (
<Lottie
source={illustration}
autoPlay
loop
style={[styles.confirmationAnimation, illustrationStyle]}
webStyle={{
width: (StyleSheet.flatten(illustrationStyle)?.width as number) ?? styles.confirmationAnimation.width,
height: (StyleSheet.flatten(illustrationStyle)?.height as number) ?? styles.confirmationAnimation.height,
}}
/>
);
}
return (
<View style={[styles.confirmationAnimation, illustrationStyle]}>
<ImageSVG
src={illustration}
contentFit="contain"
/>
</View>
);
})()}
<Text style={[styles.textHeadline, styles.textAlignCenter, styles.mv2, headingStyle]}>{heading}</Text>
{!!descriptionComponent && descriptionComponent}
{!!description && <Text style={[styles.textAlignCenter, descriptionStyle, styles.w100]}>{description}</Text>}
Expand Down
27 changes: 20 additions & 7 deletions src/components/FeatureTrainingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ import type {ImageResizeMode, ImageSourcePropType, LayoutChangeEvent, ScrollView
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import type {MergeExclusive} from 'type-fest';
import useKeyboardState from '@hooks/useKeyboardState';
import {useMemoizedLazyIllustrations} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useSafeAreaInsets from '@hooks/useSafeAreaInsets';
import useStyleUtils from '@hooks/useStyleUtils';
import useThemeStyles from '@hooks/useThemeStyles';
import Accessibility from '@libs/Accessibility';
import Log from '@libs/Log';
import Navigation from '@libs/Navigation/Navigation';
import variables from '@styles/variables';
Expand Down Expand Up @@ -205,6 +207,8 @@ function FeatureTrainingModal({
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
const {translate} = useLocalize();
const isReduceMotionEnabled = Accessibility.useReducedMotion();
const illustrations = useMemoizedLazyIllustrations(['Hands']);
const {onboardingIsMediumOrLargerScreenWidth} = useResponsiveLayout();
const [isModalVisible, setIsModalVisible] = useState(false);
const [willShowAgain, setWillShowAgain] = useState(true);
Expand Down Expand Up @@ -301,13 +305,20 @@ function FeatureTrainingModal({
)}
{((!videoURL && !image) || (!!videoURL && videoStatus === 'animation')) && (
<View style={[styles.flex1, styles.alignItemsCenter, styles.justifyContentCenter, !!videoURL && {aspectRatio}, animationStyle]}>
<Lottie
source={animation ?? LottieAnimations.Hands}
style={styles.h100}
webStyle={shouldUseNarrowLayout ? styles.h100 : undefined}
autoPlay
loop
/>
{isReduceMotionEnabled && (animation ?? LottieAnimations.Hands) === LottieAnimations.Hands ? (
<ImageSVG
src={illustrations.Hands}
style={styles.h100}
/>
) : (
<Lottie
source={animation ?? LottieAnimations.Hands}
style={styles.h100}
webStyle={shouldUseNarrowLayout ? styles.h100 : undefined}
autoPlay
loop
/>
)}
</View>
)}
</View>
Expand All @@ -332,6 +343,8 @@ function FeatureTrainingModal({
animationStyle,
animation,
shouldUseNarrowLayout,
isReduceMotionEnabled,
illustrations.Hands,
]);

const toggleWillShowAgain = useCallback(() => setWillShowAgain((prevWillShowAgain) => !prevWillShowAgain), []);
Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/Illustrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import LaptopWithSecondScreenX from '@assets/images/laptop-with-second-screen-x.
import PendingTravel from '@assets/images/pending-travel.svg';
import EmptyStateTravel from '@assets/images/product-illustrations/emptystate__travel.svg';
import Fireworks from '@assets/images/product-illustrations/fireworks.svg';
import UpgradeRocket from '@assets/images/product-illustrations/upgrade-rocket.svg';
import Puzzle from '@assets/images/simple-illustrations/emptystate__puzzlepieces.svg';
import Abacus from '@assets/images/simple-illustrations/simple-illustration__abacus.svg';
import Alert from '@assets/images/simple-illustrations/simple-illustration__alert.svg';
Expand Down Expand Up @@ -100,4 +101,5 @@ export {
TravelCVV,
ThumbsUpStars,
TurtleInShell,
UpgradeRocket,
};
2 changes: 2 additions & 0 deletions src/components/Icon/chunks/illustrations.chunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ import TiltedCoinExpensify from '@assets/images/product-illustrations/tilted-coi
import ToddBehindCloud from '@assets/images/product-illustrations/todd-behind-cloud.svg';
import ToddInCar from '@assets/images/product-illustrations/todd-in-car.svg';
import ToddWithPhones from '@assets/images/product-illustrations/todd-with-phones.svg';
import UpgradeRocket from '@assets/images/product-illustrations/upgrade-rocket.svg';
import WorkspaceScene from '@assets/images/product-illustrations/workspace-scene.svg';
import ReceiptStack from '@assets/images/receipt-upload.svg';
import RunningTurtle from '@assets/images/running-turtle.svg';
Expand Down Expand Up @@ -276,6 +277,7 @@ const Illustrations = {
ToddInCar,
ToddWithPhones,
WorkspaceScene,
UpgradeRocket,

// Educational Illustrations
MultiScan,
Expand Down
11 changes: 5 additions & 6 deletions src/components/Lottie/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import type {AnimationObject, LottieViewProps} from 'lottie-react-native';
import LottieView from 'lottie-react-native';
import React, {useContext, useEffect, useRef, useState} from 'react';
import {InteractionManager, View} from 'react-native';
import {useReducedMotion} from 'react-native-reanimated';
import type DotLottieAnimation from '@components/LottieAnimations/types';
import useAppState from '@hooks/useAppState';
import useNetwork from '@hooks/useNetwork';
import useThemeStyles from '@hooks/useThemeStyles';
import Accessibility from '@libs/Accessibility';
import {getBrowser, isMobile} from '@libs/Browser';
import isSideModalNavigator from '@libs/Navigation/helpers/isSideModalNavigator';
import CONST from '@src/CONST';
Expand All @@ -24,7 +24,7 @@ function Lottie({source, webStyle, shouldLoadAfterInteractions, ...props}: Props
const {splashScreenState} = useSplashScreenState();
const styles = useThemeStyles();
const [isError, setIsError] = React.useState(false);
const isReducedMotionEnabled = useReducedMotion();
const isReduceMotionEnabled = Accessibility.useReducedMotion();

useNetwork({onReconnect: () => setIsError(false)});

Expand Down Expand Up @@ -64,12 +64,12 @@ function Lottie({source, webStyle, shouldLoadAfterInteractions, ...props}: Props
}
const unsubscribeNavigationFocus = navigator.addListener('focus', () => {
setHasNavigatedAway(false);
if (!isReducedMotionEnabled) {
if (!isReduceMotionEnabled) {
animationRef.current?.play();
}
});
return unsubscribeNavigationFocus;
}, [browser, navigationContainerRef, navigator, isReducedMotionEnabled]);
}, [browser, navigationContainerRef, navigator, isReduceMotionEnabled]);

useEffect(() => {
if (!browser || !navigationContainerRef || !navigator) {
Expand Down Expand Up @@ -118,13 +118,12 @@ function Lottie({source, webStyle, shouldLoadAfterInteractions, ...props}: Props
<LottieView
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
autoPlay={isReducedMotionEnabled ? false : props.autoPlay}
loop={isReducedMotionEnabled ? false : props.loop}
source={animationFile}
key={`${hasNavigatedAway}`}
ref={(newRef) => {
animationRef.current = newRef;
}}
autoPlay={!isReduceMotionEnabled}
style={[aspectRatioStyle, props.style]}
webStyle={{...aspectRatioStyle, ...webStyle}}
onAnimationFailure={() => setIsError(true)}
Expand Down
Loading
Loading