refactor(mobile): colocate chat pinch gesture hook and tests (#36690)

This commit is contained in:
Neil
2026-10-31 06:43:57 -07:00
committed by GitHub
parent 68a4bfb58f
commit 1804e44610
3 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ import {
type MobileNativeChatPendingItem
} from './mobile-native-chat-render-data'
import { useMobileNativeChatRowKeys } from './native-chat/transcript/mobile-native-chat-row-keys'
import { useMobileNativeChatPinchGesture } from './use-mobile-native-chat-pinch-gesture'
import { useMobileNativeChatPinchGesture } from './native-chat/transcript/use-mobile-native-chat-pinch-gesture'
import { useMobileNativeChatTailFollow } from './use-mobile-native-chat-tail-follow'
import { useMobileNativeChatTurnDisclosure } from './native-chat/transcript/use-mobile-native-chat-turn-disclosure'
import {
@@ -1,10 +1,7 @@
import { createElement } from 'react'
import { act, create } from 'react-test-renderer'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import {
FONT_SCALE_STEP,
quantizeFontScale
} from './native-chat/transcript/mobile-native-chat-message-text'
import { FONT_SCALE_STEP, quantizeFontScale } from './mobile-native-chat-message-text'
const handlers: { start?: () => void; update?: (e: { scale: number }) => void } = {}
@@ -1,7 +1,7 @@
import { useMemo, useRef, useState } from 'react'
import { Gesture } from 'react-native-gesture-handler'
import type { ComposedGesture } from 'react-native-gesture-handler'
import { quantizeFontScale } from './native-chat/transcript/mobile-native-chat-message-text'
import { quantizeFontScale } from './mobile-native-chat-message-text'
// Anchor each pinch on the committed scale so successive gestures compound.
export function useMobileNativeChatPinchGesture(): {