fix(token-detail): rest the sheet on the top of the chart - #5982
Conversation
The resting height stopped at the action row, and the cut-edge fade covered the 40dp gap under it, so nothing showed below the actions and the sheet did not read as scrollable. When a chart is present, the resting height now reaches past the card's price header so the fade falls across the top of the chart line. The peek is added at composition rather than in the size callback because the chart arrives after the block above it is measured. Coins without a chart keep the previous resting height.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: vultisig/vultisig-android/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour. 📝 WalkthroughWalkthroughThe token detail sheet now rests at the measured actions block height plus a chart preview when a chart exists. Without a chart, the preview adds no height. The chart gap and preview height use named constants. ChangesToken sheet chart preview
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk was established; normal validation should still include large-font-scale coverage. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Closes #5959
Summary
onSizeChangedcallback. The chart arrives after the block above it has been measured, and without a size change that callback never fires again.ExpandingBottomSheetis unchanged, so expand-on-scroll and pull-down-to-dismiss behave as before.Note: the issue says iOS rests this sheet at half the screen. On iOS
main,CoinDetailScreenuses.presentationDetents([.large]), so this follows the issue's own fix (peek the top of the chart) rather than a half-screen fraction.Before / After
Test plan
./gradlew assembleDebugSummary by CodeRabbit