fix(perps): android token scroll tap, share dialog scope, desktop chart expand(OK-52513,OK-52302,OK-52078)#11087
Merged
Conversation
…rt expand(OK-52513,OK-52302,OK-52078) - Fix Android bottom scroll tap in token selector by enabling nestedScrollEnabled - Fix share prompt dialog appearing outside Perps tab by tracking real-time focus state - Add desktop chart expand/fullscreen toggle via TradingView header button with version gating (>=6.2.0) - Use display:none instead of unmounting panels to preserve state during expand/collapse
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
originalix
previously approved these changes
Apr 7, 2026
originalix
reviewed
Apr 7, 2026
originalix
reviewed
Apr 7, 2026
originalix
previously approved these changes
Apr 7, 2026
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
huhuanming
approved these changes
Apr 8, 2026
limichange
approved these changes
Apr 8, 2026
PatrickChoo
pushed a commit
to PatrickChoo/app-monorepo
that referenced
this pull request
Apr 8, 2026
…rt expand(OK-52513,OK-52302,OK-52078) (OneKeyHQ#11087) * fix(perps): android token scroll tap, share dialog scope, desktop chart expand(OK-52513,OK-52302,OK-52078) - Fix Android bottom scroll tap in token selector by enabling nestedScrollEnabled - Fix share prompt dialog appearing outside Perps tab by tracking real-time focus state - Add desktop chart expand/fullscreen toggle via TradingView header button with version gating (>=6.2.0) - Use display:none instead of unmounting panels to preserve state during expand/collapse * fix: prettier format for import statement * fix: use functional updater for chartExpanded reset and fix spellcheck * fix: exclude modal-covered state from share prompt focus check * fix: re-check focus after async gap in share prompt * fix: align @stoprocent/noble version to 2.3.10 across desktop packages * fix: update yarn.lock for @stoprocent/noble version alignment --------- Co-authored-by: morizon <sidmorizon@outlook.com> Co-authored-by: huhuanming <huanming@onekey.so>
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
Intent & Context
Three perps-related issues addressed in one PR:
Root Cause
hasBeenFocusedRefwas a one-time flag (set totrueon first Perps visit, never reset). WhentradesDataupdated while user was on another tab,checkAndShowPrompt()ran and showed the dialog globally viaDialog.show()Design Decisions
nestedScrollEnabled={platformEnv.isNativeAndroid}— the established pattern across the codebase (DeFiContainer, PortfolioContainer, etc.)isFocusedReffor real-time tab focus tracking alongside existinghasBeenFocusedRef. When not focused, setspendingCheckRef = trueso the check retries on next tab focusdisplay: 'none'instead of conditional rendering (null) to hide panels — preserves component state (order form inputs, WebSocket connections, scroll positions) during expand/collapse. Version-gated toappVersion >= 6.2.0on the TradingView sidechartExpandedtofalseon layout mount to avoid desync between persisted atom state and iframe state after app restartChanges Detail
MoblieTokenSelector.tsxnestedScrollEnabledfor AndroidusePerpsSharePrompt.tsxisFocusedRef+ pending mechanism for tab-aware dialogperps.tschartExpandedto layout state atommessageTypes.tsCHART_EXPANDmessage constantusePerpsTradingViewMessageHandler.tstradingview_chartExpandmessage from iframePerpDesktopLayout.web.tsxdisplay:none, reset state on mountPerpDesktopLayout.tsxcontentContainerStylefor RN ScrollViewRisk Assessment
Related PR
feat/chart-expand-buttonbranch (adds ChartExpandManager with version gating)Test plan