-
Notifications
You must be signed in to change notification settings - Fork 109
chore: [IOBP-1927] Improved the CGN webview playground usability, added a default user agent #7261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ult user agent used by merchants
PR Title Validation for conventional commit type✅ All good! PR title follows the conventional commit type. |
Jira Pull Request LinkThis Pull Request refers to Jira issues: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7261 +/- ##
=======================================
Coverage 59.08% 59.09%
=======================================
Files 1764 1764
Lines 37362 37371 +9
Branches 8489 8491 +2
=======================================
+ Hits 22077 22083 +6
- Misses 15205 15221 +16
+ Partials 80 67 -13
... and 13 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Short description
This PR introduces improvements to how the
WebviewComponent
handles user agent headers, as well as refactors the CGN landing playground to use a more robust source object for webview navigation. The main themes are enhanced webview header configuration and improved playground usability.List of changes proposed in this pull request
getDefaultUserAgent
function to set a platform-specific user agent string for webview requests, ensuring consistent identification across iOS, Android, and other platforms that CGN merchants will use.User-Agent
header, merging with any existing headers.Error handling improvements:
useEffect
to reset error state when the webview source changes, preventing stale error messages when navigating to new URLs.WebViewSourceUri
object for navigation, simplifying state management and making header manipulation more explicit.playgroundEnabled
prop to the webview component, enabling enhanced testing features that allow merchants to check the error pages if the webview goes into error without showing the standard umbrella.How to test