feat: system widgets foundation + price widget#895
feat: system widgets foundation + price widget#895
Conversation
|
I tested on device, works as described, except it did not seem to update price for me automatically (waited ~30minutes). Only after I tapped the widget did it reload. Still don't know anything about Kotlin so won't review code. EDIT: have seen it update now |
# Conflicts: # CHANGELOG.md
feat: redesign price widget v61
|
I've approved all individual stacked PRs. I think it looks good functionally. Also e2e tests updated to cover in app redesigned widgets. There are some outstanding items that I think would be good to address before releasing this feature:
|
ovitrif
left a comment
There was a problem hiding this comment.
Code LGTM 🎉
Going to test tomorrow.
| @Stable | ||
| @Serializable | ||
| data class HomePricePreferences( | ||
| val enabledPairs: List<TradingPair> = listOf(TradingPair.BTC_USD), |
There was a problem hiding this comment.
nit: according to AI, it’s safe to always use ImmutableList, also in business logic. Doing so would remove the need to convert for Compose UI stability.
|
I'll create a branch on top of the stacked with all the fixes, to reduce the work with conflicts |
This PR:
Description
Introduces the foundation for Android home screen widgets (AppWidgets) using Jetpack Glance, starting with the Price widget. The widget displays enabled trading pairs with price, change percentage, and a line chart — matching the in-app Price widget layout.
The architecture reuses the existing
PriceServicefor data fetching (via a newfetchData(period)overload) while keeping widget preferences completely independent from the in-app widget system through a dedicatedAppWidgetPreferencesStorebacked by its own DataStore file.A Glance design system (
GlanceTextStyles,GlanceColors) ports the app's typography and color tokens to Glance equivalents, and shared components (GlanceWidgetScaffold,GlanceDataRow) provide consistent widget layouts.Preview
Screen_recording_20260421_153032.webm
QA Notes