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

YouTube mobile newsletter sign up #3761

Merged
merged 6 commits into from
Oct 11, 2019

Conversation

mmmavis
Copy link
Collaborator

@mmmavis mmmavis commented Oct 9, 2019

Closes #3756

Add aJoin Mozilla button on mobile that serves as a trigger to toggle mobile newsletter sign up section.

https://foundation-mofostaging-pr-3761.herokuapp.com/en/campaigns/youtube-regrets/

BUT

I'm not able to get the burger icon on mobile to chang its look to X when the form is expanded by the Join Mozilla button (functionality works fine though). It's too risky and time-consuming to modify the existing nav logic just make this one-off version work so I had to go with a workaround with this downside.

If we do find this downside really troublesome, I'll need more engineer support on this one as I don't have the brain power and time to come up with a risk-free solution without changing the existing code drastically.

Detailed Reason

By design we want the Join Mozilla button on mobile to trigger the newsletter sign up form that's hidden as the second screen in the nav menu. We also want the hamburger icon change its look from (three horizontal lines) to X depending on the newsletter section's open state.

However, since the hamburger icon was implemented solely as the control to toggle the mobile nav (with nav links being the first screen and newsletter form as the second), we have to make quite a bit of code changes to make the Join Mozilla button toggle the hidden nav AND jump to the second screen (newsletter signup) directly.

Our existing <PrimaryNav> and <NavNewsletter> React components have very intertwined logics already to make our regular nav, zen nav, mobile nav, desktop nav, and newsletter sign up section on nav work. I spent quite some time yesterday but couldn't achieve what we want with minor code modification to these two components. I ended up using a workaround but the downside is the hamburger icon doesn't change its look to X when the form is expanded by the Join Mozilla button (functionality works fine though).

@patjouk patjouk temporarily deployed to foundation-mofostaging-pr-3761 October 9, 2019 22:22 Inactive
@mmmavis mmmavis changed the base branch from master to youtube-newsletter-button-n-style-tweaks October 9, 2019 22:22
@mmmavis mmmavis temporarily deployed to foundation-mofostaging-pr-3761 October 10, 2019 05:05 Inactive
@kristinashu
Copy link

Design and functionality of this look good to me!

@mmmavis mmmavis force-pushed the issue-3756-youtube-mobile-newsletter-form branch from eb1f1d6 to 62d2089 Compare October 11, 2019 18:41
@mmmavis mmmavis temporarily deployed to foundation-mofostaging-pr-3761 October 11, 2019 18:42 Inactive
@mmmavis mmmavis changed the base branch from youtube-newsletter-button-n-style-tweaks to master October 11, 2019 18:42
@mmmavis mmmavis changed the title (WIP) YouTube mobile newsletter sign up YouTube mobile newsletter sign up Oct 11, 2019
@mmmavis mmmavis marked this pull request as ready for review October 11, 2019 18:45
Copy link
Contributor

@Pomax Pomax left a comment

Choose a reason for hiding this comment

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

this works well and code looks good

@kristinashu
Copy link

Big thank you for all the awesomeness, speediness, and multi-tasking from both of you!

@mmmavis mmmavis temporarily deployed to foundation-mofostaging-pr-3761 October 11, 2019 20:03 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging-pr-3761 October 11, 2019 20:03 Inactive
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.

YouTube: add newsletter signup to mobile
4 participants