Skip to content

feat: redesign price widget to Figma v61#542

Open
jvsena42 wants to merge 23 commits intofeat/os-widgetsfrom
feat/price-widget-v61
Open

feat: redesign price widget to Figma v61#542
jvsena42 wants to merge 23 commits intofeat/os-widgetsfrom
feat/price-widget-v61

Conversation

@jvsena42
Copy link
Copy Markdown
Member

@jvsena42 jvsena42 commented May 6, 2026

Description

This PR redesigns the Bitcoin Price widget to match Figma v61.

The home-screen widget now picks between two layouts based on its rendered family: a Wide layout (medium) with a 34pt headline price and a thin chart, and a Compact layout (small) with a stacked title, change %, and a taller chart. The Large family is removed. The chart drops its previous gradient fill in favor of a line-only stroke, and the period overlay is removed since the timeframe label now lives in the header.

Currency selection moves from a multi-toggle list to single-select. PriceWidgetOptions.selectedPairs: [String] becomes selectedPair: String ("BTC/USD" by default), with a custom Codable shim that decodes legacy v60 storage by reading the first element of the old array — so existing users upgrade without losing their pair.

The edit screen is restructured into two single-select sections — Currency and Timeframe — with the active row in white text and a brand-orange checkmark. Timeframes display as full words ("Day", "Week", "Month", "Year") on the edit screen but as their abbreviations ("1D", "1W", "1M", "1Y") inside the widget itself. The showSource toggle is gone.

The preview screen replaces the headline + icon header with a centered "Bitcoin Price" top bar, description block, "Widget Settings" cell, and a horizontal carousel that swipes between the small and wide widget previews with a size label and dot indicator below. The Save button reads "Save Widget", and the navigation drawer/menu is hidden on both Preview and Edit screens.

While in there: fixed an ordering bug in BitkitWidget/PriceWidgetService.fetchFreshPrices flagged on #538withTaskGroup results are now paired with their input index and sorted before returning so the headline pair stays stable across cache↔fresh refreshes.

Mirrors the v61 redesign shipped on Android in bitkit-android#914.

Linked Issues/Tasks

N/A

Screenshot / Video

os-widget.mp4
in-app-widget.mp4
migration.mp4

QA Notes

1. Home-screen widget

  • Long-press the home screen, tap +, find "Bitcoin Price". Confirm only Small and Medium previews appear (no Large).
  • Add at Medium and confirm the Wide layout (BTC/USD 1D caption, 34pt price, change % on the right, line-only chart).
  • Add at Small and confirm the Compact layout (BTC/USD left / 1D right, 22pt price, change % below, taller line chart).
  • Verify positive (green) and negative (red) price changes render with the correct color.

2. In-app price widget

  • Open the wallet home and confirm the widget renders the new Wide layout (no multi-pair list, no source row, line-only chart).
  • Verify loading and error states still work (toggle network).

3. Preview screen

  • From the widgets feed, open Bitcoin Price. Confirm: centered "Bitcoin Price" top bar with back arrow (no menu/drawer button), description text, "Widget Settings" cell with default/custom value, Compact↔Wide carousel, size label ("Small" / "Wide"), dot indicator, "Save Widget" button.
  • Swipe the carousel and confirm both previews render correctly and the size label flips.
  • If the widget is already saved, both Delete and Save Widget buttons appear.

4. Edit screen

  • Tap "Widget Settings". Confirm: centered "Bitcoin Price" top bar with back arrow (no menu/drawer button), Currency section, Timeframe section, Reset / Preview buttons.
  • Currency rows are single-select; picking a different pair deselects the previous.
  • Timeframe rows show full words (Day / Week / Month / Year) and are single-select.
  • Selected rows are white with a brand-orange checkmark; unselected rows are dimmed without a checkmark.
  • There is a noticeably bigger top gap between the Currency rows and the Timeframe header.

5. Upgrade safety

  • Existing users coming from v60 (with selectedPairs: ["BTC/USD", "BTC/EUR"] and showSource: true stored on disk) launch without crashes; the first pair is picked up as the new selectedPair and showSource is silently ignored.

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: 4dfd9a80d0

ℹ️ 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/Views/Widgets/WidgetEditItemView.swift Outdated
Comment thread changelog.d/next/542.changed.md
Comment thread Bitkit/Views/Widgets/PriceWidgetPreviewView.swift Outdated
Comment thread Bitkit/Components/Widgets/PriceWidget.swift Outdated
@jvsena42 jvsena42 self-assigned this May 6, 2026
@jvsena42 jvsena42 marked this pull request as draft May 6, 2026 12:30
@jvsena42 jvsena42 marked this pull request as ready for review May 6, 2026 16:34
@jvsena42 jvsena42 requested a review from pwltr May 6, 2026 16:34
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 6, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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