Skip to content

Conversation

@staskus
Copy link
Contributor

@staskus staskus commented Jan 30, 2026

Description

Context: pdfdoF-8Ff-p2
WOOMOB-1980

Mobile announcements tool supports passing a learn more URL (detailsUrl). However, it is not used in the app. This PR adds optional "Learn more" link support for What's New feature announcements.

Announcement Display States

State Description UI Behavior
No URL No detailsUrl provided Standard list with "Continue" CTA button
With URL detailsUrl provided "Learn more" as primary CTA, "Not now" as secondary action

For easier testing:

  • Moved debug panel to Settings as on Android
  • Added Announcements section to force fetch and show announcement for app version 999 so it could be tested without modifying code or project settings

Testing

A. Live Test via Debug Panel

  1. Ensure test announcement is enabled:

    • Go to the Mobile Announcements tool
    • Verify announcement ID 302 with APP VERSION = 999.0 and for Woo iOS is enabled (Wait a minute or two after enabling, disable after testing)
  2. Fetch and display the announcement:

    • Open the app → SettingsDebug Panel
    • Tap "Fetch Test Announcement (v999.0)"
    • The What's New modal should appear with the test content
    • Verify the "Learn more" button works correctly
  3. Re-test as needed:

    • Tap "Reset Announcement State" to clear saved state
    • Fetch again to re-display the modal

B. Preview All States

View SwiftUI previews to see announcement display variations:

  • ReportList previews show both states (with and without learn more URL)

Video

Test announcement

Test.Announcement.mov

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@staskus staskus added type: enhancement A request for an enhancement. feature: app settings Related to settings accessed via the gear icon in the My Store section. labels Jan 30, 2026
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 30, 2026

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16591-b737210
Version24.0
Bundle IDcom.automattic.alpha.woocommerce
Commitb737210
Installation URL745911bk7tqlg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@staskus staskus marked this pull request as draft January 30, 2026 10:55
@staskus staskus changed the title [WOOMOB-1980] Add Learn more CTA to What’s New [WOOMOB-1980] Add Learn more CTA to Mobile Annoucements Jan 30, 2026
@staskus staskus changed the title [WOOMOB-1980] Add Learn more CTA to Mobile Annoucements [WOOMOB-1980] Add Learn more CTA to Mobile Announcements Jan 30, 2026
Add ability to fetch test announcements targeting version 999.0 and reset
announcement state from the Debug Panel. This allows testing the What's New
modal without affecting production users.

- Add synchronizeAnnouncementsForDebug action to fetch with custom app version
- Add deleteSavedAnnouncement action to reset announcement state
- Add Identifiable conformance to Announcement for SwiftUI sheet presentation
- Add Announcements section to DebugPanelView with fetch and reset buttons
@staskus staskus added this to the 24.1 milestone Feb 3, 2026
@staskus staskus marked this pull request as ready for review February 3, 2026 07:41
Test the new synchronizeAnnouncementsForDebug and deleteSavedAnnouncement
actions to ensure proper functionality of the debug panel features.
Add missing learnMoreURL parameter to ReportItem initializer in test.
The test uses MockInMemoryStorage but deleteSavedAnnouncement uses
FileManager.default directly, causing the test to fail when the file
doesn't exist on disk.
The API provides detailsUrl at the announcement level, not per feature.
Simplified the implementation to:
- Show "Learn more" + "Not now" if detailsUrl exists
- Show "Continue" if no detailsUrl

Removed per-feature learnMoreURL from ReportItem and IconListItem.
Rename keys to follow naming convention:
- learnMore.link → reportList.learnMore.link
- wpcomPushNotificationsBenefitsView.notNowButton → reportList.notNow.button
- Show generic "Failed to fetch announcement" error
- Silently ignore reset errors (file may not exist)
No longer needed after removing per-feature learn more links.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: app settings Related to settings accessed via the gear icon in the My Store section. type: enhancement A request for an enhancement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants