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

Don't default to document title if no notification title present #674

Closed
wants to merge 1 commit into from

Conversation

gardenFiend138
Copy link

@gardenFiend138 gardenFiend138 commented Jul 22, 2020

Don't default to document title if no notification title present

Detailed description

Notification titles used to be required in browsers. We allowed users to not provide a title, but if that happened, we defaulted to the document.title property. This is no longer a required field for notifications, and browsers handle it differently (i.e. Chrome says 'Google Chrome' if no title is present).

This continues to use the default title value if it is provided by the user by calling OneSignal.setDefaultTitle.

Checklist:

  • I have personally tested this on my machine or explained why that is not possible
  • I have included screenshots/recordings of the intended results

Jira Ticket(s):

OS-4666

Screenshots/Gifs/Video of All Changes:

With no title or default title set:
no-title

Default title set, then with an actual notification title:
title

Users Affected:

Estimated number of users this change will impact:

All end users who receive notifications without a set title

Validation:

  • Send notification without a title or default title
    • should see browser default title (i.e. 'Google Chrome' in Chrome)
  • Send notification without a title, but after setting a default title (call OneSignal.setDefaultTitle(<string>))
    • should see newly set default title
  • Send notification with a title set
    • should see title set on notification

This change is Reviewable

@gardenFiend138 gardenFiend138 self-assigned this Jul 22, 2020
@gardenFiend138 gardenFiend138 requested review from itrush and removed request for itrush July 22, 2020 21:23
Notification titles used to be required in browsers. We allowed
users to not provide a title, but if that happened, we defaulted
to the document.title property. This is no longer a required field
for notifications, and browsers handle it differently (i.e. Chrome
says 'Google Chrome' if no title is present).

This continues to use the default title value if it is provided
by the user by calling `OneSignal.setDefaultTitle`.
@gardenFiend138
Copy link
Author

This PR is being closed as @itrush came up with a solution that makes more sense. See OS-4876 for more details.

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.

None yet

1 participant