feat(ios): add iOS home-screen token widget with 24h change + sparkline#32132
feat(ios): add iOS home-screen token widget with 24h change + sparkline#32132ChingizMardanov wants to merge 2 commits into
Conversation
Adds the iOS token widget (App Group bridge, payload builder, sync manager, SwiftUI views) and enriches each row with the real 24h price change (green/red with a ▲/▼ arrow) and a mini price chart. Row/container margins tightened so more content fits. The 24h change is sourced synchronously from Redux market data (mirroring useTokenPricePercentageChange). Sparkline data is currently mock but produced by a modular buildSparkline() so a real historical-price fetch can be dropped in later — the rest of the pipeline already passes a number[] through unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
CLA Signature Action: Thank you for your submission, we really appreciate it. We ask that you read and sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just by adding a comment to this pull request with this exact sentence:
By commenting with the above message you are agreeing to the terms of the CLA. Your account will be recorded as agreeing to our CLA so you don't need to sign it again for future contributions to this repository. 0 out of 1 committers have signed the CLA. |
PR template — items to address before "Ready for review"Blocking — these items fail the workflow until fixed:
Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
|
⚡ Performance Test Results
✅ All tests passed · 2 tests · 1 device 📱 Devices tested (1)Android: Google Pixel 8 Pro (v14.0) ✅ Passed Tests (2)
Branch: |
…ative The widget bridge previously did logo downloading, image downscaling, JSON parsing and field-remapping in Swift (~196 lines). All of that moves to JS, keeping only what RN can't do natively in the bridge. - RCTWidgetBridge.swift slimmed to two methods: getLogosDirectoryPath (so JS can write into the App Group container) and a verbatim setTokens + reload. Removed processTokens/cacheLogo/downscale/sanitize and all URLSession/UIImage code. - New syncWidgetLogos.ts downloads logos via react-native-fs straight into the App Group dir (skip-if-exists, skips empty/non-http/SVG); failures fall back to the widget monogram. - buildWidgetPayload now emits the final widget field names (deeplink), so Swift does no remapping; WidgetSyncManager.sync pushes through the JS logo step. - SwiftUI widget views unchanged (WidgetKit can't run RN — irreducible). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |


Adds the iOS token widget (App Group bridge, payload builder, sync manager, SwiftUI views) and enriches each row with the real 24h price change (green/red with a ▲/▼ arrow) and a mini price chart. Row/container margins tightened so more content fits.
The 24h change is sourced synchronously from Redux market data (mirroring useTokenPricePercentageChange). Sparkline data is currently mock but produced by a modular buildSparkline() so a real historical-price fetch can be dropped in later — the rest of the pipeline already passes a number[] through unchanged.
Description
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist