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

[fix bug 1254309] - Update Fx friends signup #3958

Merged

Conversation

jpetto
Copy link
Contributor

@jpetto jpetto commented Mar 10, 2016

Description

Instead of linking off to friends.mozilla.org, we instead want to present a newsletter subscribe form on mozilla.org/contribute/friends/.

Bugzilla

bug 1254309

Testing

  • Click the "Sign Me Up" button in the header area to reveal the sign up form
  • Complete the sign up form and ensure thank you message is displayed
  • Check no-JS and RTL

Checklist

  • Requires l10n changes.
  • Related functional & integration tests passing.

Waiting on new newsletter to be created (bug 1254685) and for GA to be verified (bug 1254368).

<h1>{{_('Join Firefox Friends today!')}}</h1>
<p>{{_('Step to the frontline to help us tell the world how awesome Firefox is and about all the important work Mozilla does every day.')}}</p>
<a href="https://friends.mozilla.org" id="ff-join" class="ff-join-now" rel="external">{{_('Join now')}}</a>
<h1>{{ _('Sign up. Read up. Pass it on.') }}</h1>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think copy can get more American than this 👎

@jpetto jpetto force-pushed the bug-1254309-firefox-friends-signup-updates branch from e57f958 to 452d05c Compare March 10, 2016 15:18
{% if l10n_has_tag('contribute_friends_signup_update') %}
{% include 'mozorg/contribute/friends-new.html' %}
{% else %}
{% include 'mozorg/contribute/friends-old.html' %}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@flodolo - Since so many strings have changed, will something like this work? I'd rather not have a single template littered with l10n_has_tag conditionals.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it makes sense, I'd just need to test it locally to verify that everything works as expected when it comes to template activations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, great. When you verify it works from an L10n standpoint, can you report back? I'll open it up for code review after.

Thanks!

@jpetto jpetto force-pushed the bug-1254309-firefox-friends-signup-updates branch from 37fd43f to d2f3006 Compare March 10, 2016 19:27
@jpetto
Copy link
Contributor Author

jpetto commented Mar 10, 2016

Note - this page is intended to be en-US only for the time being.

@jpetto
Copy link
Contributor Author

jpetto commented Mar 10, 2016

We are still blocked on a new newsletter being created (TODO marked in code) and GA review from Gareth (some potential GA calls currently commented out), but otherwise code is now ready for review.

@alexgibson r?

@jpetto
Copy link
Contributor Author

jpetto commented Mar 10, 2016

Tested in Fx, Chrome, Safari, and IE 6 - Edge. Aside from varying levels of (expected) UI roughness in IE 6 -10, signup form is functional.



def contribute_friends(request):
# TODO: update newsletter ID - https://bugzilla.mozilla.org/show_bug.cgi?id=1254685
Copy link
Member

Choose a reason for hiding this comment

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

Just noting the #TODO here for clarity sake

@alexgibson
Copy link
Member

Signup button is cropped on small screens:

ff-mobile

top: $ffSignupArea.offset().top - 60
});

$('#id_email').focus();
Copy link
Member

Choose a reason for hiding this comment

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

Curious, the focus() here stops Firefox performing the native smooth scroll?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, this is odd. It only seems to prevent scrolling in Dev Edition and Nightly. Release and Beta work as expected. Simply calling focus() before smoothScroll seems to fix things, but I wonder if I should file a bug...

@alexgibson
Copy link
Member

Also not a blocker for this PR - I'm not clear on whether or not Firefox Friends replaces Student Ambassadors? We still have these pages:

https://www.mozilla.org/en-US/contribute/studentambassadors/
https://www.mozilla.org/en-US/contribute/studentambassadors/join/

As far as I see, the student ambassadors page is still linked from the manifesto:

https://www.mozilla.org/en-US/about/manifesto/

Perhaps they are two entirely separate things still, in which case ignore me completely 😄

[edit] - Ignore this - I totally got my wires crossed. Firefox friends was a replacement for Affiliates

}

.how-wrapper {
.flexbox();
Copy link
Member

Choose a reason for hiding this comment

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

Assuming we're ok with this part of the layout looking broken in IE? (content is still readable and accessible, just flagging things here).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This actually doesn't look too bad in IE. On the versions that actually load the CSS (8 and up), only 10 looks a little bad. 8 and 9 just stack, and 11 renders correctly. 10 renders the items side by side, just all left justified.

I'm okay with the above, but I'm pretty much always okay with older browsers not being perfect. 😁

@alexgibson
Copy link
Member

Looks good, just a few things to tidy up and an open question about student ambassadors, which might well be void anyway 👍

I'm assuming we're ok with parts of the layout / signup form not looking as expected in browsers that don't support flexbox for this page (fine with me if so 😉)

@jpetto jpetto force-pushed the bug-1254309-firefox-friends-signup-updates branch from 33ded40 to 70fcfc3 Compare March 29, 2016 16:36
@jpetto
Copy link
Contributor Author

jpetto commented Mar 30, 2016

@alexgibson - While we're still waiting on confirmation/testing from the project owner/basket side, the coding is complete. If you could review my latest commits, I'll squash so we can be ready to merge when given the green light. No rush though.


_url = '{base_url}/{locale}/contribute/friends'

_privacy_policy_checkbox_locator = (By.ID, 'id_privacy')
Copy link
Member

Choose a reason for hiding this comment

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

Is this locator still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, nope. Will remove.

vertical-align: top;

h3 {
.font-size(1.2rem);
Copy link
Member

Choose a reason for hiding this comment

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

Nit: use px for consistency with rest of the file? (here and below)

Copy link
Member

Choose a reason for hiding this comment

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

If this is becoming a pain to manage, feel free to ignore it btw. But I'd like us to start using one convention consistently. Personally, I think 14px is easier to remember than something like 0.875rem (the end result is rem either way). But I would be happy to defer to other opinions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These rem values are carryover from the existing/current file. Agree px is better though, so will update.

@alexgibson
Copy link
Member

Could of small nits but otherwise looks good 👍

It would be nice to have some more test coverage for the form (e.g. test default expected default values, test form submission success/failure), but we can always follow up with this later if need be, so not a blocker.

@alexgibson
Copy link
Member

r to squash and merge when ready 🍟

@jpetto jpetto force-pushed the bug-1254309-firefox-friends-signup-updates branch from 186f4c1 to 4cff437 Compare March 31, 2016 16:28
@jpetto jpetto removed the L10N label Mar 31, 2016
@jpetto
Copy link
Contributor Author

jpetto commented Mar 31, 2016

Basket craziness has been resolved. Last thing before merge is for email template to be updated. Bug 1254685 will be updated to give the green light.

@flodolo
Copy link
Contributor

flodolo commented Mar 31, 2016

Just to confirm: I need to take down the existing localizations, right?

@jpetto
Copy link
Contributor Author

jpetto commented Mar 31, 2016

Yes, please take down existing localizations. The page is purposefully en-US only for now.

@flodolo
Copy link
Contributor

flodolo commented Mar 31, 2016

Pages disabled in prod, will remove the files later in my periodic cleanups
mozilla-l10n/bedrock-l10n@7261c32

@alexgibson alexgibson merged commit 86b70ab into mozilla:master Apr 1, 2016
@jpetto jpetto deleted the bug-1254309-firefox-friends-signup-updates branch July 27, 2016 21:27
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.

3 participants