Skip to content
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

Merged
merged 3 commits into from
Sep 24, 2019

Conversation

jkasten2
Copy link
Member

@jkasten2 jkasten2 commented Sep 21, 2019

  • The implementation of isPushNotificationsSupported is now done by
    checking for presents of classes and properties instead of using
    userAgent checks
  • Deleted FIREFOX_ESR_SCRIPT.sh, we no longer need to check build numbers
  • Removed now unused bowser library use from shim
    • Shim before size 17.1KiB, now 8.4KiB! (before gzip)
    • Moved redetectBrowserUserAgent implementation into OneSignalUtils.ts

This change is Reviewable

@jkasten2 jkasten2 requested a review from itrush September 21, 2019 03:18
@jkasten2 jkasten2 force-pushed the is_push_supported_detection_by_types_and_props branch 2 times, most recently from 42961dc to 9b4d224 Compare September 21, 2019 04:28
* 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
@jkasten2 jkasten2 force-pushed the is_push_supported_detection_by_types_and_props branch from 9b4d224 to 54f3657 Compare September 21, 2019 05:26
Copy link
Contributor

@itrush itrush left a 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.

@jkasten2
Copy link
Member Author

jkasten2 commented Sep 24, 2019

@itrush I ended up fixing your comments in this PR in #543 by mistake

Copy link
Contributor

@itrush itrush left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: 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
@jkasten2 jkasten2 merged commit df8ed4d into master Sep 24, 2019
@jkasten2 jkasten2 deleted the is_push_supported_detection_by_types_and_props branch September 24, 2019 22:31
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