-
Notifications
You must be signed in to change notification settings - Fork 153
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mmmavis
changed the base branch from
master
to
youtube-newsletter-button-n-style-tweaks
October 9, 2019 22:22
Design and functionality of this look good to me! |
mmmavis
force-pushed
the
issue-3756-youtube-mobile-newsletter-form
branch
from
October 11, 2019 18:41
eb1f1d6
to
62d2089
Compare
mmmavis
changed the base branch from
youtube-newsletter-button-n-style-tweaks
to
master
October 11, 2019 18:42
mmmavis
changed the title
(WIP) YouTube mobile newsletter sign up
YouTube mobile newsletter sign up
Oct 11, 2019
kristinashu
approved these changes
Oct 11, 2019
Pomax
reviewed
Oct 11, 2019
There was a problem hiding this 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
Pomax
approved these changes
Oct 11, 2019
Big thank you for all the awesomeness, speediness, and multi-tasking from both of you! |
This was referenced Jun 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #3756
Add a
Join 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 theJoin 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)
toX
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 toX
when the form is expanded by theJoin Mozilla
button (functionality works fine though).