Skip to content

feat: weather widget v61 + OS widget#555

Open
jvsena42 wants to merge 45 commits into
feat/os-widgetsfrom
feat/weather-v61
Open

feat: weather widget v61 + OS widget#555
jvsena42 wants to merge 45 commits into
feat/os-widgetsfrom
feat/weather-v61

Conversation

@jvsena42
Copy link
Copy Markdown
Member

@jvsena42 jvsena42 commented May 18, 2026

This PR:

  1. Redesigns the in-app Bitcoin Weather widget to match Figma v61.
  2. Adds a native iOS Home Screen Bitcoin Weather widget supporting Small and Medium families.
  3. Restructures the Weather edit and preview screens to the v61 carousel pattern.
  4. Localizes the OS widget by mirroring the in-app language into the App Group.

Description

The in-app card collapses to a hero glyph (☀️/⛅/⛈️) with the condition title, description, and one big green fee metric. The four legacy show/hide toggles become a single-select WeatherDisplayMetric — Current Fee (fiat), Current Fee (sats), or Next Block Inclusion — matching the Figma. Existing on-disk preferences from older builds decode to the default metric.

The new BitkitWeatherWidget (Small + Medium) mirrors the in-app options through the group.bitkit App Group via WeatherHomeScreenWidgetOptionsStore, refreshes every ~2 minutes, and falls back to a direct mempool.space fetch when the cache is empty so the widget renders before the user opens the app.

OS widget localization is handled by sharing LocalizeHelpers.swift with the widget target. LanguageManager mirrors the selected language into the App Group and reloads all widget timelines on change; LocalizationHelper reads from the App Group first so the extension picks up the in-app selection. Localization keys align with bitkit-android (reuses widgets__weather__current_fee / next_block, adds shared widgets__widget__display and three condition__*__short_title variants).

Linked Issues/Tasks

FIGMA

Screenshot / Video

in-app-widget.mp4
translations.mp4
update-from-master.mp4
restore-from-android.mp4
change-currency.mp4

QA Notes

Manual Tests

  • 1. Wallet home → in-app Weather widget renders v61 layout: large ☀️/⛅/⛈️ glyph, title, description, one green fee metric.
  • 2a. Widgets → Bitcoin Weather → preview: "Bitcoin Weather" top bar, description, Widget Settings cell, Compact↔Wide carousel, SMALL/WIDE label, dot indicator, Save Widget button.
    • 2b. Swipe carousel: compact shows single-word title (Favorable / Average / Poor).
  • 3a. Widget Settings → edit screen: DISPLAY section, three radio rows (Current Fee fiat, Current Fee sats, Next Block Inclusion), default is fiat, single-select.
    • 3b. Pick sats .
    • 3c. Pick Next Block → save .
  • 4a. Home screen → add OS Weather widget at Small and Medium: both render correctly with selected metric.
    • 4b. Edit metric in-app → OS widget reloads within ~1s.
    • 4c. Install OS widget before opening the app: fallback fetch from mempool.space renders correctly.
  • 5a. Settings → Language → Portuguese: OS widget strings flip to Portuguese.
    • 5b. Switch back to English: OS widget reverts.
  • 6. regression: restore from Android backup with weatherPreferences: corresponding metric is selected (showCurrentFee → fiat; showNextBlockFee only → next-block).
  • 7. regression: Install over main version

@jvsena42 jvsena42 self-assigned this May 18, 2026
@jvsena42 jvsena42 marked this pull request as ready for review May 19, 2026 14:51
@jvsena42
Copy link
Copy Markdown
Member Author

@codex review

@jvsena42 jvsena42 marked this pull request as ready for review May 19, 2026 17:19
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1c0986bfb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Bitkit/ViewModels/CurrencyViewModel.swift
Comment thread Bitkit/Managers/LanguageManager.swift
@jvsena42 jvsena42 requested review from pwltr and removed request for pwltr May 19, 2026 19:55
@jvsena42
Copy link
Copy Markdown
Member Author

@piotr-iohk it needs update here too

@pwltr
Copy link
Copy Markdown
Contributor

pwltr commented May 20, 2026

On the iPhone SE home screen blocks and weather widgets are lacking some space. Looks like there are size differences between phone models for these widgets that we need to account for. I think the missing weather widget emojis can be ignored, cannot reproduce it on-device.

image

@jvsena42
Copy link
Copy Markdown
Member Author

a minimumScaleFactor should fix it

@jvsena42 jvsena42 marked this pull request as draft May 20, 2026 09:37
Comment thread Bitkit/Components/Widgets/WeatherWidgetContent.swift Outdated
Comment thread Bitkit/Components/Widgets/WeatherWidgetContent.swift Outdated
Comment thread Bitkit/Resources/Localization/en.lproj/Localizable.strings Outdated
@jvsena42 jvsena42 marked this pull request as ready for review May 20, 2026 12:29
@jvsena42
Copy link
Copy Markdown
Member Author

I'll polish Blocks and the other widgets in a stacked PR

iphone-16.mp4
iphone-se.mp4

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e85b8070dd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Bitkit/ViewModels/CurrencyViewModel.swift
…y even if the weather UI was never shown this session
@ovitrif ovitrif added this to the 2.3.0 milestone May 20, 2026
@jvsena42 jvsena42 requested a review from pwltr May 20, 2026 17:30
@pwltr
Copy link
Copy Markdown
Contributor

pwltr commented May 20, 2026

Still doesn't have enough space imo. Also on the wide variant the text is truncated. I guess it is ok for now if it only affects iPhone SE.

Screenshot 2026-05-20 at 20 05 30 IMG_0036

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.

3 participants