Skip to content

Commit fdabe19

Browse files
committed
chore(theme): remove repeated reduce-motion comments
1 parent 38d67ab commit fdabe19

10 files changed

Lines changed: 0 additions & 18 deletions

File tree

‎src/components/ActivityIndicator.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ const ActivityIndicator = ({
7373
);
7474

7575
const reduceMotion = useReduceMotion();
76-
// Read when a fade starts, so a reduce motion change doesn't restart the
77-
// rotation.
7876
const getFadeDuration = useLatestCallback(() => (reduceMotion ? 0 : 200));
7977

8078
const startRotation = React.useCallback(() => {

‎src/components/Banner.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ const Banner = ({
167167
const hideCallback = useLatestCallback(onHideAnimationFinished);
168168

169169
const reduceMotion = useReduceMotion();
170-
// Read when the animation starts, so a reduce motion change doesn't replay it
171-
// and call the callbacks again.
172170
const getDuration = useLatestCallback((duration: number) =>
173171
reduceMotion ? 0 : duration
174172
);

‎src/components/BottomNavigation/BottomNavigation.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,6 @@ const BottomNavigation = <Route extends BaseRoute>({
344344
}: Props<Route>) => {
345345
const theme = useInternalTheme(themeOverrides);
346346
const reduceMotion = useReduceMotion();
347-
// Read when an animation starts, so a reduce motion change doesn't run the
348-
// tab animation again.
349347
const getDuration = useLatestCallback(() => (reduceMotion ? 0 : 150));
350348
const compact = compactProp ?? false;
351349
let shifting = shiftingProp ?? false;

‎src/components/BottomNavigation/BottomNavigationBar.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,6 @@ const BottomNavigationBar = <Route extends BaseRoute>({
337337
const { colors } = theme;
338338
const { bottom, left, right } = useSafeAreaInsets();
339339
const reduceMotion = useReduceMotion();
340-
// Read when an animation starts, so a reduce motion change doesn't run the
341-
// tab animation again.
342340
const getDuration = useLatestCallback((duration: number) =>
343341
reduceMotion ? 0 : duration
344342
);

‎src/components/CrossFadeIcon.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ const CrossFadeIcon = ({
6060
const fade = useSharedValue(1);
6161

6262
const reduceMotion = useReduceMotion();
63-
// Read when the swap starts, so a reduce motion change doesn't replay it.
6463
const getDuration = useLatestCallback(() => (reduceMotion ? 0 : 200));
6564

6665
if (currentIcon !== source) {

‎src/components/Menu/Menu.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,6 @@ const Menu = ({
330330
});
331331

332332
const reduceMotion = useReduceMotion();
333-
// Read when an animation starts, so a reduce motion change doesn't start
334-
// opening the menu again.
335333
const getDuration = useLatestCallback(() =>
336334
reduceMotion ? 0 : ANIMATION_DURATION
337335
);

‎src/components/Modal.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ function Modal({
211211

212212
const reduceMotion = useReduceMotion();
213213
const duration = reduceMotion ? 0 : DEFAULT_DURATION;
214-
// Read when a timer starts, so a reduce motion change doesn't restart it.
215214
const getDuration = useLatestCallback(() => duration);
216215

217216
const contentRef = React.useRef<React.ComponentRef<typeof View>>(null);

‎src/components/ProgressBar.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ const ProgressBar = ({
9999
React.useRef<Animated.CompositeAnimation | null>(null);
100100

101101
const reduceMotion = useReduceMotion();
102-
// Read when an animation starts, so a reduce motion change doesn't restart
103-
// the indeterminate loop.
104102
const getDuration = useLatestCallback(() => (reduceMotion ? 0 : 200));
105103

106104
React.useEffect(() => {

‎src/components/RadioButton/RadioButtonAndroid.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ const RadioButtonAndroid = ({
8383
const isFirstRendering = React.useRef<boolean>(true);
8484

8585
const reduceMotion = useReduceMotion();
86-
// Read when the animation starts, so a reduce motion change doesn't replay
87-
// the last check or uncheck.
8886
const getDuration = useLatestCallback(() => (reduceMotion ? 0 : 150));
8987

9088
React.useEffect(() => {

‎src/components/Snackbar.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ const Snackbar = ({
185185
const [hidden, setHidden] = React.useState(!visible);
186186

187187
const reduceMotion = useReduceMotion();
188-
// Read when the animation starts, so a reduce motion change doesn't replay it
189-
// and restart the dismiss timer.
190188
const getDuration = useLatestCallback((duration: number) =>
191189
reduceMotion ? 0 : duration
192190
);

0 commit comments

Comments
 (0)