feat: facts widget v61 + OS widget#926
Conversation
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
|
The support for in-app compact widgets will be implemented in other PR. I did the redesign now to don't double work on OS widgets later https://www.figma.com/design/ltqvnKiejWj0JQiqtDf2JJ/Bitkit-Wallet?node-id=43100-273252&m=dev |
Fixed |
I'll check how the preview ordering works |
This comment has been minimized.
This comment has been minimized.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
piotr-iohk
left a comment
There was a problem hiding this comment.
LGTM, functionally.
Previous issue no longer observed.
The ordering suggestion is not directly related, can be addressed separately.
FIGMA
FactsCardandFactsPreviewScreento the v61 designshowSourcetoggle, and theFactsPreferencesplumbing (no per-widget settings)Description
FactsGlanceWidgetusesSizeMode.Exactand a singleBoxlayout: Wide places the headline + Bitcoin badge top-right with end-padding; Compact moves the badge to the bottom-right.maxLinesadapts to height (2 for Wide+1cell, 5 for Wide+2cells and Compact).WIDE_LAYOUT_MIN_WIDTH = CELL * 3 = 210dp, so 3+ cell widths use Wide. The widget skips the config activity — registration and the initialfetchFacts()happen insideprovideGlance. Fact rotation is deterministic (cachedFacts[factsRotationTick.mod(size)]) so the headline doesn't shuffle on size swaps.In-app,
FactsCardis split into wide / compact variants andFactsPreviewScreenmirrors Headlines and Blocks (top-bar, description, divider,WidgetSizeCarousel, Save / Delete).FactsEditScreen,FactsPreferences, thefactsPreferencesfield onWidgetsData/HomeUiState, and the relatedMigrationServiceblocks are deleted. Legacy on-disk JSON is safe (ignoreUnknownKeys = true).Manifest and
appwidget_info_facts.xmlregister the provider with a 4×1 default placement and 40dpminHeight/minResizeHeight.Preview
os-widget.webm
in-app-widget.webm
QA Notes
System widget
maxLinesjumps to 5.appwidget_data.json.In-app widget
FactsCardon Home reflects v61.{"factsPreferences": {...}}on disk — app launches without serialization errors.