-
Notifications
You must be signed in to change notification settings - Fork 114
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
isPushNotificationsSupported detection by types #541
isPushNotificationsSupported detection by types #541
Conversation
42961dc
to
9b4d224
Compare
* The implementation of isPushNotificationsSupported is now done by checking for presents of classes and properties instead of using userAgent checks * Removed FIREFOX_ESR_SCRIPT as we no longer need to check build numbers
* Shim before size 17.1KiB, now 8.4KiB! (before gzip) * Moved redetectBrowserUserAgent implementation into OneSignalUtils.ts
9b4d224
to
54f3657
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 6 of 6 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @jkasten2)
src/utils/OneSignalUtils.ts, line 76 at r1 (raw file):
''
use double quotes for strings to have them JS way
test/unit/modules/browserSupport.ts, line 18 at r1 (raw file):
export function browserWithPushAPIWithVAPIDEnv(): void {
If you export something with the intention of reusing it, then it should take sandbox as a parameter. Also it's weird that this one is the only one exported.
test/unit/modules/browserSupport.ts, line 18 at r1 (raw file):
export function browserWithPushAPIWithVAPIDEnv(): void {
Would setupBrowserWithPushAPIWithVAPIDEnv
be a better name? Same for the other methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all files reviewed, all discussions resolved
* Cleaned up delivery_platform, browser_name, browser_version, operating_system, operating_system_version, device_platform * These parameters are not valid on the api/v1/players endpoint so are unnecessary * Added NotificationIcons type
isPushNotificationsSupported
is now done bychecking for presents of classes and properties instead of using
userAgent
checksFIREFOX_ESR_SCRIPT.sh
, we no longer need to check build numbers17.1KiB
, now8.4KiB
! (before gzip)redetectBrowserUserAgent
implementation intoOneSignalUtils.ts
This change is