Skip to content

feat: redesign headlines widget v61 + OS widget#546

Open
jvsena42 wants to merge 12 commits intofeat/price-widget-v61from
feat/headlines-v61
Open

feat: redesign headlines widget v61 + OS widget#546
jvsena42 wants to merge 12 commits intofeat/price-widget-v61from
feat/headlines-v61

Conversation

@jvsena42
Copy link
Copy Markdown
Member

@jvsena42 jvsena42 commented May 7, 2026

This PR:

  1. Redesigns the in-app Bitcoin Headlines widget to match Figma v61.
  2. Adds a native iOS Home Screen Bitcoin Headlines widget built on the foundation introduced for the price widget.
  3. Refactors the news preview screen into a TabView carousel matching the price widget pattern.
  4. Forwards HTTPS deeplinks from widgets straight to Safari instead of routing them through the payment scanner.

Description

The in-app Bitcoin Headlines widget gets the v61 layout: a 22pt bold headline as the dominant element, with the source name in brand orange and the relative time in dim gray on a single row underneath. The compact (small) variant drops the source line and keeps the time pinned bottom-right. Tapping the in-app widget still opens the article in Safari.

The edit screen gains a "Content" section header to match Figma v61 and reorders rows so Title is shown first, followed by the Source and Time toggles. Title remains static; Source and Time can be toggled.

A new Bitcoin Headlines home-screen widget ships as BitkitNewsWidget, supporting .systemSmall and .systemMedium families. It mirrors the in-app widget's options via the existing group.bitkit App Group. The timeline provider caches the top 10 articles and rotates a random pick on each ~15-min refresh. The widget honors widgetRenderingMode so it renders correctly in both full-color and accented (Liquid Glass / StandBy) modes — the brand-orange source color falls back gracefully outside of full color. Tapping a Medium widget opens the article URL directly in Safari via Link. Tapping a Small widget delivers the URL through the host app's onOpenURL, where a new HTTP/HTTPS short-circuit forwards the URL to Safari before any payment-scanner parsing happens.

The news preview screen is rewritten as a TabView carousel mirroring the price widget pattern: description, "Widget Settings" cell, Compact↔Wide carousel, size label and dot indicator, and Save Widget / Delete buttons.

While in there: extracted the news feed base URL and articles endpoint to WidgetEnv so both the main app and the widget extension consume them the same way as the price feed URL.

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

Linked Issues/Tasks

N/A

Screenshot / Video

Simulator.Screen.Recording.-.iPhone.16.-.2026-05-07.at.15.32.43.mp4

QA Notes

Manual Tests

  • 1. Wallet home → in-app Bitcoin Headlines widget renders v61 layout: bold 22pt title, source in brand orange, time in dim gray.
  • 2. In-app Headlines widget → tap: opens article URL in Safari.
  • 3a. Widget feed → Bitcoin Headlines → preview: description, "Widget Settings" cell, Compact↔Wide carousel, size label and dot indicator, "Save Widget" button.
    • 3b. Preview → swipe carousel: size label flips between Small and Wide.
    • 3c. If widget already saved: Delete and Save Widget buttons both appear.
  • 4a. Preview → Widget Settings → edit screen: "Content" section header, Title (static, always on), Source and Time toggles.
    • 4b. Toggle Source off → Reset enabled, Preview enabled, save → in-app widget hides source.
    • 4c. Toggle Time off → save → in-app widget hides time.
  • 5. Home screen long-press → + → search "Bitkit": Bitcoin Headlines appears with Small and Medium previews (no Large).
  • 6a. Add Headlines at Medium → wide layout renders title + source/time row at the bottom.
    • 6b. Tap medium widget: article opens directly in Safari (no app launch flash).
  • 7a. Add Headlines at Small → compact layout renders title + time bottom-right (no source).
    • 7b. Tap small widget: app launches briefly, then forwards to Safari with the article URL.
  • 8. Edit Source/Time toggles in app → home-screen widget reloads within ~1s and reflects new toggles.
  • 9. iOS 18+ → switch home screen to Tinted/Liquid Glass: widget renders with clear background, title remains legible, accent colors flatten gracefully.

@jvsena42 jvsena42 self-assigned this May 7, 2026
@jvsena42 jvsena42 marked this pull request as ready for review May 7, 2026 11:37
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: 2e3f81cb8f

ℹ️ 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 BitkitWidget/NewsHomeScreenWidget.swift
@jvsena42 jvsena42 requested a review from pwltr May 7, 2026 12:20
@pwltr
Copy link
Copy Markdown
Contributor

pwltr commented May 7, 2026

Something seems wrong with the sorting, I'm consistently getting articles from last year.

Same layout shift on this screen, although I think for this one there should be grayed out checkmarks for unselected rows (see master), without it UX is unclear imo. Also, description has been removed in v61.

Simulator Screenshot - iPhone SE (3rd generation) - 2026-05-07 at 16 05 48

Comment thread Bitkit/Resources/Localization/en.lproj/Localizable.strings Outdated
@jvsena42 jvsena42 marked this pull request as draft May 7, 2026 15:18
@jvsena42
Copy link
Copy Markdown
Member Author

jvsena42 commented May 7, 2026

couldn't find any bug in the sorting. Could be something in the crapping?

same result calling the url directly https://feeds.synonym.to/news-feed/api/articles

also /latest returns a 2025 article

…/headlines-v61

# Conflicts:
#	Bitkit/ViewModels/WidgetsViewModel.swift
@jvsena42
Copy link
Copy Markdown
Member Author

jvsena42 commented May 7, 2026

Video updated

@jvsena42 jvsena42 requested a review from pwltr May 7, 2026 18:34
@jvsena42 jvsena42 marked this pull request as ready for review May 7, 2026 18:35
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: 955e293004

ℹ️ 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 on lines +8 to +10
private init() {
NewsWidgetCache.legacyDropStandardSuiteCache()
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the legacy news cache during migration

When an existing user upgrades while offline or while the news feed is failing, this initializer deletes the old news_widget_cache before the view model can use it, and the new getCachedData() path only reads news_widget_top_articles_v1. That turns a previously available stale headline into an error/blank widget until a fresh network request succeeds; consider migrating or falling back to the legacy WidgetData until the new App Group cache has been populated.

Useful? React with 👍 / 👎.

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.

2 participants