Skip to content

feat: weather widget v61 + OS widget#927

Open
jvsena42 wants to merge 11 commits intofeat/facts-v61from
feat/weather-v61
Open

feat: weather widget v61 + OS widget#927
jvsena42 wants to merge 11 commits intofeat/facts-v61from
feat/weather-v61

Conversation

@jvsena42
Copy link
Copy Markdown
Member

@jvsena42 jvsena42 commented May 4, 2026

FIGMA

  1. Adds a Glance-backed Bitcoin Weather home screen widget with Wide and Compact layouts
  2. Migrates WeatherCard, WeatherEditScreen, and WeatherPreviewScreen to the v61 design
  3. Replaces the legacy showTitle / showDescription / showCurrentFee / showNextBlockFee toggles with a single selectedOption (current fee in fiat, current fee in sats, or next block inclusion)
  4. Wires Weather preferences through the shared AppWidgetConfigActivity / preferences store / refresh worker
  5. Adds a WeatherConfigContent for the OS widget config flow with the new option list

Description

WeatherGlanceWidget uses SizeMode.Responsive with the shared COMPACT_WIDGET_SIZE / WIDE_WIDGET_SIZE thresholds. Wide layout puts the title, description, and selected fee block on the left with the weather emoji at 72sp on the right; Compact stacks the emoji on top with a short condition title and the fee block below. The selected fee value uses the condition color (green / yellow / red) from FeeCondition.

In-app, WeatherCard is split into wide / compact variants and WeatherPreviewScreen mirrors Headlines / Blocks / Facts (top-bar, description, divider, WidgetSizeCarousel, Save / Delete). WeatherEditScreen is rebuilt around the new single-option model and removes the title / description / show-toggles UI. The shared AppWidgetConfigActivity plumbing now supports AppWidgetType.WEATHER via WeatherConfigContent and the new HomeWeatherPreferences projection on AppWidgetEntry.

MigrationService maps the legacy showMedian / showNextBlockFee flags onto the new WeatherDataOption enum (CURRENT_FEE_FIAT / CURRENT_FEE_SATS / NEXT_BLOCK_INCLUSION), defaulting to CURRENT_FEE_FIAT. Legacy on-disk JSON is safe (ignoreUnknownKeys = true).

Manifest and appwidget_info_weather.xml register the provider with the shared default placement and resize bounds, and string resources gain *__short_title variants plus widgets__widget__display.

Preview

os-widget.webm
in-app-widget.webm

QA Notes

System widget

  1. Widgets picker → "Bitcoin Weather" preview shows the wide layout with emoji on the right.
  2. Drop at default size — Wide, title + description + fee block visible, emoji right.
  3. Resize to compact — Compact, emoji on top, short condition title, fee block at the bottom.
  4. Open the configure activity from the widget tap — the option list shows current fee (fiat), current fee (sats), and next block inclusion with the live preview value next to each.
  5. Pick each option and Save — the widget re-renders with the corresponding label and value; fee text color matches the current FeeCondition (green / yellow / red).
  6. Reset — the option returns to the default (CURRENT_FEE_FIAT).
  7. Wait for refresh tick — fee values update.
  8. Remove widget — entry cleared from appwidget_data.json.

In-app widget

  1. Widgets feed → Bitcoin Weather — preview screen shows v61 layout (top-bar, description, divider, carousel, Save / Delete).
  2. Swipe carousel — small / wide cards render with the selected option's value and condition color.
  3. Open Edit — only the option list is shown (no Show Title / Show Description / Show Source toggles). Switching between options updates the live card.
  4. Save and verify the in-app WeatherCard on Home reflects v61 and the chosen option.
  5. With widget added, reopen preview — Delete + Save both appear; Delete removes the in-app card.
  6. Existing install with legacy {"showStatus": true, "showText": false, "showMedian": true, "showNextBlockFee": false} on disk — app launches without serialization errors and the widget defaults to current-fee-fiat (or next-block-inclusion if the legacy flag was set).

@jvsena42 jvsena42 self-assigned this May 4, 2026
@jvsena42 jvsena42 added this to the 2.3.0 milestone May 4, 2026
@jvsena42 jvsena42 marked this pull request as ready for review May 4, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant