Skip to content

chore: [SDK-5612] standardize push subscription UI in the demo app - #212

Merged
fadi-george merged 4 commits into
mainfrom
fadi/sdk-5612
Oct 28, 2026
Merged

fadi-george merged 4 commits into
mainfrom
fadi/sdk-5612

Conversation

@fadi-george

@fadi-george fadi-george commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

One Line Summary

Standardize the demo push subscription UI and add a language selector.

dotnet_android_01_push_subscribed_opted_in dotnet_android_02_push_opted_out_unsubscribed dotnet_android_03_user_language_row dotnet_android_04_language_picker_open dotnet_android_05_language_spanish_selected dotnet_android_06_language_reset_device_default dotnet_ios_01_push_subscribed_opted_in dotnet_ios_02_push_opted_out_unsubscribed dotnet_ios_03_user_language_row dotnet_ios_04_language_picker_open dotnet_ios_05_language_spanish_selected dotnet_ios_05a_language_picker_spanish_highlighted dotnet_ios_06_language_reset_device_default

Details

Motivation

Part of SDK-5300 (standardize push subscription UI across SDK demo apps). Matches the Android demo (OneSignal/OneSignal-Android-SDK#2760).

Scope

Demo app only (examples/demo). SDK unchanged.

  • Push section: new read-only Status row above the toggle. It shows Subscribed only when the user is opted in, notification permission is granted, and a push token is present; otherwise Unsubscribed. It updates from the existing subscription and permission observers, and the push token is now tracked too.
  • The toggle label changes from "Enabled" to Opted In. The existing test ID is unchanged, so Appium selectors still work. The status row uses push_subscription_status, same as Android.
  • User section: new Language row after External ID with Device Default plus the same 43 languages, in the same order, as Android and iOS (user_language_dropdown). It calls setLanguage(code), and Device Default sends '', which the native SDK resolves to the device language. The choice is saved only so the picker shows it after a restart; it is not re-sent at launch, since native keeps its own value. Login and logout reset the picker to Device Default locally, without calling setLanguage.
  • The picker is a small DropdownMenu overlay instead of the MAUI Picker (iOS wheel, Android dialog): anchored under the row, right-aligned, capped at 320, opens upward near the bottom of the screen, and scrolls to the current choice. Items use a CollectionView so a drag that ends on an item doesn't select it. Each item has language_option_<code> as its AutomationId, matching RN, Expo and Unity.

Testing

Unit testing

No unit tests; demo UI reading existing SDK state.

Manual testing

csharpier check . passes; the demo builds for net10.0-android and net10.0-ios with 0 warnings. Not yet run on a device or simulator.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fadi-george
fadi-george requested a review from a team as a code owner October 27, 2026 02:53
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@abdulraqeeb33 abdulraqeeb33 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Picker sync with the suppress flag looks right, and PushSubscriptionStatus updates from all three inputs.

fadi-george and others added 2 commits October 27, 2026 13:39
…etLanguage

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the MAUI Picker (iOS wheel, Android dialog) with a page-level
overlay menu anchored under the row, capped at 320, with
language_option_<code> AutomationIds on each item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fadi-george
fadi-george merged commit 1559e59 into main Oct 28, 2026
3 checks passed
@fadi-george
fadi-george deleted the fadi/sdk-5612 branch October 28, 2026 00:11
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