chore(examples): update RNOneSignalTS demo to match Android design + functionality#1911
Merged
sherwinski merged 46 commits intomainfrom Feb 18, 2026
Merged
chore(examples): update RNOneSignalTS demo to match Android design + functionality#1911sherwinski merged 46 commits intomainfrom
sherwinski merged 46 commits intomainfrom
Conversation
Collaborator
|
Lets rename example to |
Collaborator
|
For status, it should be a green "Logged In" text |
Collaborator
|
Next Activity doesnt work, see android project for what to do |
Collaborator
|
Dont need the "Home" bar at the top |
- `components/dialogs/LoginUserDialog.tsx`: New modal dialog for user login with: - Title: "External User Id" - Text input prepopulated with "test" - "Login" and "Cancel" buttons - Calls `OneSignal.login()` on confirm - Change title on buttons to better match native Android example app
- Fixed the backdrop - Now uses a single Pressable that properly fills the entire screen with the semi-transparent overlay - Wider dialog - Increased width from 80% to 85% - Better structure - The backdrop handles dismiss-on-outside-tap, while the dialog container uses stopPropagation() to prevent accidental closes - Adjusted styling - Slightly reduced border radius (4 instead of 8) and adjusted padding to better match Material Design dialogs
- Red background buttons - Changed from gray (Colors.background) to red (Colors.primary) - White text - Changed title color from dark to white - Updated section titles - "Send Push Notification" and "Send In-App Message" to match native - Larger buttons - Increased minHeight from 80 to 100 - Larger icons - Increased icon font size from 32 to 36 - Bolder text - Changed font weight to bold and size to 14 - Removed Card wrapper - Using a simpler container with margins, similar to the native app layout - Improved spacing - Better gap between buttons using marginBottom and justifyContent: 'space-between'
- Add new state fields: externalUserId, isLoading, permissionGranted - Add bulk actions: SET_ALL_*, CLEAR_ALL_* for aliases, tags, triggers, emails, sms - Add UserData interface for REST API responses - Create OneSignalService.ts for fetching user data from REST API
- AppInfoSection: Add guidance banner, consent toggle, logged-in display - PushSubscriptionSection: Conditional PROMPT PUSH button, auto-request permission - NotificationDemoSection: Simplify to 3 buttons (Simple, With Image, Custom) - IamDemoSection: Full-width red buttons with icons - AliasesSection: Add Remove All button - EmailSection/SmsSection: Add collapsible behavior for >5 items - TagsSection: Remove Get Tags button - OutcomeSection: Add dropdown with 3 outcome types (Normal, Unique, With Value) - Create TrackEventSection and TrackEventDialog - Update ToggleRow to support description prop - Update ActionButton to support disabled prop
- Create TooltipContent.ts with all tooltip data - Create TooltipHelper.ts for showing tooltip dialogs - Create TooltipButton component - Update SectionHeader to support tooltipKey prop - Add tooltips to all sections
…rdering - Add loading overlay with semi-transparent background - Implement user data fetching from REST API on user change - Fetch user data on cold start if OneSignal ID exists - Reorder sections to match Android V2 specification: 1. App (with Privacy Consent) 2. Push 3. Send Push Notification 4. In-App Messaging 5. Send In-App Message 6. Aliases 7. Emails 8. SMSs 9. Tags 10. Outcome Events 11. Triggers 12. Track Event 13. Location 14. Live Activities (iOS) 15. Navigation - Remove standalone PrivacyConsentSection (now integrated in AppInfoSection)
UI/Styling Changes: - Add red branded header bar (#E9444E) with OneSignal logo text - Update buttons to 56dp height, 19sp font, 6dp border radius - Add uppercase text transform to all button labels - Convert side-by-side buttons to full-width stacked layout Label Updates: - Notification buttons: "Simple Notification", "Notification With Image", "Custom Notification" - Location button: "Prompt Location" (was "Request Permission") - Aliases button: "Remove All Aliases" (was "Remove All") - Remove "Clear All" button from Triggers section Toggle Descriptions: - Location: "Location Shared:" with "Location will be shared from device" - IAM: "Pause In-App Messages:" with "Toggle in-app messages" Other Changes: - Remove redundant NavigationSection (bottom tabs provide navigation) - Add retry mechanism with exponential backoff for OneSignal ID fetch on startup
Design Changes: - Update button styling to match Android (44dp height, 10dp radius, 13sp semibold text with letter spacing) - Update card styling to bordered outline (no shadow, 12dp radius) - Update section headers to uppercase with secondary text color - Update header bar to "OneSignal Sample App" matching Android branding - Replace OSConsole with collapsible LOGS panel (dark background, count display, clear/collapse controls) - Update color palette to match Android (primary #E54B4D, updated background, text, and divider colors) Structural Changes: - Add separate User section with Status/External ID display matching Android - Split consent into two toggles: "Consent Required" (always visible) and "Privacy Consent" (shown conditionally) matching Android - Remove Card wrapper from sections that Android shows without cards (Send Push, Send IAM, Outcome Events, Track Event) - Add outline button variant for destructive/secondary actions - Add NEXT ACTIVITY button at bottom of scroll view Feature Additions: - Add MultiPairInputDialog for batch adding aliases, tags, and triggers - Add MultiSelectRemoveDialog for selectively removing tags and triggers - Add "Add Multiple" buttons to Aliases, Tags, and Triggers sections - Add "Remove Selected" buttons to Tags and Triggers sections - Add "Clear All" button to Triggers section - Update TrackEventDialog with JSON properties field and validation - Make Aliases list read-only (no delete icons) matching Android Label Updates: - Shorten notification buttons: "Simple", "With Image", "Custom" - Shorten section buttons: "Add" / "Add Multiple" (not "Add Alias") - Update toggle labels/descriptions to match Android exactly - Replace emoji icons with Unicode arrows in IAM demo buttons - Update "Push Subscription ID" to "Push ID" State Management: - Add consentRequired state to AppState and reducer Co-authored-by: Cursor <cursoragent@cursor.com>
9120909 to
0f9e5ea
Compare
0f9e5ea to
ffbfe7d
Compare
a1fc3ca to
8caa634
Compare
8caa634 to
1b1ce8b
Compare
217df1e to
cd948ed
Compare
df89c7b to
a6d5bd2
Compare
45d057d to
d60ecd8
Compare
f8d465d to
86a29db
Compare
a588e13 to
bfc97ac
Compare
fadi-george
approved these changes
Feb 18, 2026
a4e54c6 to
3de55a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Updates the RNOneSignalTS Demo to match the https://github.com/OneSignal/OneSignal-Android-SDK/tree/main/Examples/OneSignalDemoV2 demo both in design and functionality.
Details
Motivation
A more consistent demo app experience that can be tested in the same way across all SDK platforms.
Scope
Scope only includes everything under
examples/Testing
Manual testing
Test by building the app and running on your emulator/device of choice. Utilize the log view to inspect API calls made as you interact with the app.
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is