fix: show iOS NativeList quick-tap press state and add pager tab press animation switch OK-63487 - #114
Merged
Conversation
UICollectionView inherits UIScrollView's delaysContentTouches = true, so a row receives touch-down only after about 150 ms, once UIKit knows the touch is not a scroll. A tap released inside that window gets the delayed touch-down and the touch-up back to back: the row is highlighted, unhighlighted and selected in one run loop turn, so the pressed background never renders. Android rows set their pressed background on ACTION_DOWN, so the same tap shows feedback there. - use a NativeListCollectionView subclass with delaysContentTouches = false; didHighlightItemAt, and with it pressInActionKey, now runs on touch-down as it does on Android - return true from touchesShouldCancel(in:) for UIControl views so a drag that starts on an in-row button (tag badge, accessory, checkbox) still scrolls the list Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bump all 40 publishable packages to 3.0.142 and record the iOS NativeList quick-tap press state fix in the changelog. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
originalix
pushed a commit
to OneKeyHQ/app-monorepo
that referenced
this pull request
Sep 17, 2026
#13514) * fix: disable pull-to-refresh on market home pager lists iOS still attached a UIRefreshControl to the Market home NativeList pages; Android had it disabled already. A pull showed a spinner that disappeared almost immediately. Drop the refresh wiring from NativeMarketList and its token, watchlist, stock, top coins and perps callers so the snapshot keeps pullToRefresh off on both platforms. Error and load-more retry rows still refetch. * fix: upgrade native modules to 3.0.142 for iOS row press state Pin all @onekeyfe native modules to 3.0.142. It ships the iOS NativeList fix from OneKeyHQ/app-modules#114: the list's UICollectionView no longer delays touch-down by about 150 ms, so a quick tap on a Market row renders the pressed background before the detail page opens, matching Android. * chore: add iOS 27 device install script for local builds Local Xcode 27 builds link against the iOS 27 SDK, and iOS 27 then stops any app that has not adopted the UIScene lifecycle at launch (_UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption). Until OneKeyWallet adopts UIScene, development/scripts/ios27-device-install.sh copies the device Debug build and rewrites the main executable's LC_BUILD_VERSION SDK to 26.0. It re-signs the copy with the original identity and entitlements, then installs and launches it against Metro.
…3487
CollapsiblePagerView dispatched an animated setPage for every native tab
press. The iOS direct pager animates its content offset and Android's
ViewPager2 smooth-scrolls, so pressing a distant tab scrolled through every
page in between. With pageRetentionDistance={1} those pages are unmounted,
so they showed blank while neighboring lists slid past under a sticky
header that had already switched to the pressed tab. app-monorepo's Market
home had to send a second, non-animated command from onNativeTabPress to
supersede it.
- add nativeTabPressAnimationEnabled, default true; when false a native
tab press dispatches setPageWithoutAnimation through the same
retain-then-dispatch path, so the pressed page is still mounted before
the pager moves
- document the prop in the pager README
- cover the default and disabled modes in the native wrapper tests
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bump all 40 publishable packages to 3.0.144 and record the pager-view nativeTabPressAnimationEnabled prop in the changelog. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
5 tasks
ByteZhang1024
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RNCNativeListView.swiftchanges for this fix. Props, the snapshot schema and Android are unchanged.nativeTabPressAnimationEnabledtoCollapsiblePagerView, defaulttrue. Withfalse, a native tab press jumps straight to the pressed page instead of animating through every page in between (OK-63487). JS-only; the default behavior is unchanged.latestdist-tag. 3.0.143 was skipped.Root cause
UICollectionViewkeeps UIScrollView's defaultdelaysContentTouches = true. UIKit holds touch-down back from the cells for about 150 ms while it decides whether the touch is a scroll.shouldHighlightItemAt→NativeListCell.isHighlighted→updateBackgroundColor()).pressedRowBackgrounddirectly onACTION_DOWNinNativeListRowView, so a quick tap renders a few pressed frames there.The ancestor
CollapsiblePagerViewscroll views already setdelaysContentTouches = NO, so the delay came only from the list itself.Change
NativeListCollectionViewsubclass setsdelaysContentTouches = false.touchesShouldCancel(in:)returnstrueforUIControlviews. Without the delay, in-row buttons (tag badges, accessories, checkboxes) receive touches first, and UIScrollView's default would otherwise stop a drag that starts on them from scrolling the list. Other views keepsuper's behavior. Cells contain onlyUIButtoncontrols, and the section index rail is outside the collection view.didHighlightItemAt, and with itpressInActionKey(for exampleprewarm-detail), now runs on touch-down, including touches that turn into a scroll.Verification
app-monorepo
x(native modules 3.0.141) with this change applied innode_modules. The shell was rebuilt withdev-shell --platform ios --shell local, and the compiledOneKeyWallet.debug.dylibcontainsNativeListCollectionView. The baseline used the remote CI shell for the same lockfile. Both ran on an iPhone 17 Pro simulator (iOS 26.5): Market home, Stocks and Trending lists, recorded withsimctl io recordVideo. The recorder writes a frame only when the screen changes.UIButton)Real device: iPhone 17 Pro, iOS 27.0 (24A437), app-monorepo Market home with this change in
node_modules. Quick taps on rows now show the pressed background before the detail page opens, which they did not before.Local Xcode 27 builds of app-monorepo currently crash at launch on iOS 27 in
_UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption, because the app has not adopted the UIScene lifecycle. That is unrelated to this change. For this device test only, the built main executable'sLC_BUILD_VERSIONSDK was set to 26.0 withvtool, and the app was re-signed with the same development identity.Not covered:
rail) layouts, reorderable lists and the wallet group rows.keyboardShouldPersistTaps/keyboardDismissModescreens with a focused text input.pager-view:
nativeTabPressAnimationEnabled(OK-63487)Problem
CollapsiblePagerView.onNativeTabPressalways dispatched an animatedsetPage. The iOS direct pager animates its content offset over 0.28 s and Android'sViewPager2smooth-scrolls, so pressing a distant tab scrolled through every page in between. WithpageRetentionDistance={1}those pages are unmounted, so app-monorepo's Market home showed blank pages and neighboring lists sliding past under a sticky header that had already switched to the pressed tab. Before the native pager migration, Market tab presses switched without animation (app-monorepo #12842,tabPressAnimationEnabled={false}).app-monorepo currently works around it in
MobileLayout.native.tsx: itsonNativeTabPresshandler sends a secondsetPageWithoutAnimation, which supersedes the queued animated command, and it tracks the last native page selection so a repeated press on a pending tab is superseded as well.Change
nativeTabPressAnimationEnabled?: boolean, defaulttrue. Withfalse,onNativeTabPressdispatchessetPageWithoutAnimationthrough the samedispatchNativeTabPageCommandpath, so the pressed page is still added to the retained pages before the command runs.setPage/setPageWithoutAnimationmethods are unchanged.Verification
example/react-native:jest __tests__/CollapsiblePagerView.web.test.tsxpasses 10/10. The new native wrapper cases press a distant native tab and assert that the default dispatchesCommands.setPageandnativeTabPressAnimationEnabled={false}dispatches onlyCommands.setPageWithoutAnimation. The disabled case failed before the change.react-native-pager-view:yarn typecheckpasses; Prettier passes on the changed files.setPageWithoutAnimationcommand on every tab press. Recorded on an iPhone 17 Pro simulator (iOS 26.5) and an Android 15 emulator: distant taps and rapid double taps switch in one frame without showing intermediate pages, and swipes still animate. The prop itself has not run on a device yet. app-monorepo adopts it and drops the workaround in fix: switch market tabs without the pager animation OK-63487 app-monorepo#13523.Release
e4a27ebea4195671ece5bd5bfaf3c1a744d1Published from this branch with the
latestdist-tag. For 3.0.142, the run's registry check passed for all packages, and the downloaded@onekeyfe/react-native-native-list@3.0.142tarball'sios/RNCNativeListView.swiftis byte-identical to the file verified on the simulator and on the iPhone.For 3.0.144, the run's registry check passed and
npm viewreports 3.0.144 aslatestfor all 40 packages. The downloaded@onekeyfe/react-native-pager-view@3.0.144tarball'ssrc/CollapsiblePagerView.tsxis byte-identical to3c1a744d1, and its compiledlib/moduleand type declarations includenativeTabPressAnimationEnabled.4195671ec3c1a744d1🤖 Generated with Claude Code