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

Http modal prompt #89

Merged
merged 17 commits into from Jul 8, 2016
Merged

Http modal prompt #89

merged 17 commits into from Jul 8, 2016

Conversation

jasonpang
Copy link
Contributor

@jasonpang jasonpang commented Jul 8, 2016

This changeset adds an HTTP prompt, redesigns the HTTP modal prompt, shortens the routes for the popup, iFrame, and modal.


This change is Reviewable

Jason Pang added 15 commits July 7, 2016 17:14
Save commit before tearing out block state on HTTP popover.
The methods waitUntilShown() and waitUntilHidden() were not working
correctly for the notify button after we switched over to using events
from EventEmitter. These methods have now been updated and hopefully
this fixes the black circle on the notify button some users see
sometimes.

Updated popover show condition to not show if the autoRegister is false.
- Increased popup window dimensions by 100 pixels each
- Fixed bug with notify button showing black small circle badge
- Consolidate mobile and desktop prompt options
- Pass parent HTTP site hostname so that if a user does not configure
siteName, a reasonable default is shown "e.g. google.com"
- Truncate customization values for HTTP prompt and popup
  - Site name is at most 30 characters long
  - Action message is at most 90 characters long
  - Buttons are at most 15 characters long
- Do not allow prompt to be shown twice
- Share prompt customization values from HTTP popup's promptOptions variable
- Rename public API from showHttpPopover() -> showHttpPrompt()
- showHttpPrompt() resolves to brief string reasons if prompt was not shown
- Fix multiple showings of showHttpPrompt() opening multiple windows by
listening to event handlers once
iFrame, popup, and modal routes have been shortened from
'initOneSignalHttp' to '/subscribe', '/webPushIframe', and
'/webPushModal'.

The HTTP popup is also now loaded via a POST call instead of a GET call
which allows hiding the long URL query parameters and presents the user
which a much simpler URL of "https://subdomain.onesignal.com/subscribe".
The routes in the Rails backend and the web SDK have been modified to
accomodate these shorter routes.
Jason Pang added 2 commits July 7, 2016 18:43
HTTP popup autoAccept was broken because the data wasn't being POSTed.
Fixed and refactored the helper methods getPromptOptionsQueryString to
use getPromptOptionsQueryHash.
@jasonpang jasonpang merged commit dc32b3e into master Jul 8, 2016
@jasonpang jasonpang deleted the http-modal-prompt branch July 8, 2016 03:01
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