feat: redesign price widget v61#914
feat: redesign price widget v61#914jvsena42 wants to merge 32 commits intofeat/system-widgets-foundationfrom
Conversation
This comment has been minimized.
This comment has been minimized.
…into feat/price-widget-v61 # Conflicts: # app/src/main/java/to/bitkit/appwidget/config/AppWidgetConfigScreen.kt # app/src/main/java/to/bitkit/appwidget/ui/price/PriceGlanceContent.kt
…gles, where it was being clipped and showing as gaps
|
@piotr-iohk The widget title was dropped in V61 |
| .background( | ||
| color = if (pagerState.currentPage == index) Colors.White else Colors.White32, | ||
| shape = CircleShape, | ||
| ), |
There was a problem hiding this comment.
CLAUDE.md violation: trailing comma after modifier = ... argument
Per CLAUDE.md: "ALWAYS add trailing commas in multi-line declarations, EXCEPT after a modifier = ... last argument — never add a trailing comma there, whether the modifier is a single call (modifier = Modifier.weight(1f)) or a chain (modifier = Modifier.fillMaxWidth().testTag("foo"))"
The Box inside WidgetCarousel has modifier = Modifier... as its only (last) argument, and a trailing comma is incorrectly added after it. See
| ), | |
| ) |
| .background( | ||
| color = if (pagerState.currentPage == index) Colors.White else Colors.White32, | ||
| shape = CircleShape, | ||
| ), |
There was a problem hiding this comment.
Trailing comma after modifier = ... last argument
Per CLAUDE.md: "ALWAYS add trailing commas in multi-line declarations, EXCEPT after a modifier = ... last argument — never add a trailing comma there, whether the modifier is a single call or a chain."
modifier is the only (and therefore last) argument to this Box call, so the trailing comma on its closing ) must be removed. See PricePreviewScreen.kt#L264-L274.
| ), | |
| ) |
FIGMA
This PR:
Description
The price widget has been redesigned to match Figma v61. The Glance widget now picks between two layouts based on its rendered size: a Wide layout (343×152dp) with a 34sp headline price and a thin chart, and a Compact layout (163×192dp) with a stacked title price, change % and a taller chart. The chart bitmap drops its previous gradient fill in favor of a line-only stroke, and the period overlay is removed from the chart since the timeframe label now lives in the header.
Currency selection moves from a multi-toggle list to single-select. The Glance widget always renders the first enabled pair; the in-app PriceCard does the same. Both edit screens (AppWidgetConfigScreen for the system widget, PriceEditScreen for the in-app feed) are restructured into two sections — CURRENCY and TIMEFRAME — with selectable rows that highlight the active option in white with a Brand-colored checkmark and dim the rest.
The preview screen drops the headline + chart icon header in favor of a centered Bitcoin Price top bar, a description block, a Widget Settings row, and a horizontal pager that swipes between the small and wide widget previews with a size label and dot indicator below. The widget metadata XML now allows a 2×2 placement (lower minWidth/minHeight) and defaults to a 4×2 cell target so the widget lands on the Wide layout out of the box.
Preview
os-widget.webm
app-widget.webm
QA Notes
System widget
In-app price widget