Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

[WIP] add an SMS install link form #3573

Closed
wants to merge 1 commit into from

Conversation

seanmonstar
Copy link
Contributor

@seanmonstar seanmonstar commented Mar 8, 2016

I believe I need a test for the view, which I'm still reading how I should test. And this is also missing showing a success or failure...

Closes #3497

@@ -26,6 +26,15 @@
{{#t}}Download Firefox for mobile devices.{{/t}}
</p>

<form class="marketing-sms-link">

Choose a reason for hiding this comment

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

I dig it. Are we going to show this to users we can reasonably assume to be in the US, maybe based off of locale? What happens if a non-US number is entered, will basket return an error message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Basket will return an error, yes. I could also add some simple validation, basically /^\d{9,10}$/, and maybe something to filter out dashes. Still looking where I would put that in the code...

Choose a reason for hiding this comment

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

I could talk myself into several places.

  • marketing-email-client->sendSms. Whether the number should/shouldn't contain dashes, dots, spaces, etc seems a bit like a detail that mostly concerns the server. Another upside is the code is shared if we ever decide to add the form somewhere else. The downside is it's far from where the input originates.
  • marketing-email-snippet-ios->submit because that's close to the user input. The downside is the code wouldn't be shared if we move the form elsewhere.
  • marketing-email-prefs->sendSms. Shared code, seems reasonable, but far from user input.

@seanmonstar
Copy link
Contributor Author

Well hey, got the tests passing. Probably need more though...

And:

  • what should I do after the request finishes. Success, swap the form for a success message? Failure... show an error?
  • Need to add validation to the phone number field
  • How would I best only show this to US folk? If lang is en-US?

@@ -26,6 +26,15 @@
{{#t}}Download Firefox for mobile devices.{{/t}}
</p>

<form class="marketing-sms-link">
<div class="input-row">
<input type="text" id="phone-number" class="phone" />

Choose a reason for hiding this comment

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

Ahha, the form will be presented in addition to the other links, not in lieu of. @ryanfeeley - does that match your expectations?

@shane-tomlinson
Copy link

Hey @seanmonstar - are you still working on this feature? If so, ignore the rest of this message. If not, mind shutting this PR down and re-opening when you get back to it?

@seanmonstar seanmonstar removed their assignment May 23, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants