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

Update Indonesian What's New Page (#6472) #6630

Merged
merged 7 commits into from
Jan 18, 2019

Conversation

amychurchwell
Copy link
Contributor

@amychurchwell amychurchwell commented Dec 17, 2018

Description

Update content and design on Indonesian What's New Page.

Issue / Bugzilla link

#6472
1504954

Testing

https://bedrock-demo-id-whatsnew.oregon-b.moz.works/id/firefox/62.0/whatsnew/

@craigcook
Copy link
Member

The balloon lady image is overlapping the content and it makes the left side of the form field unclickable. I think you can just do some z-index to bring the content in front.

@amychurchwell
Copy link
Contributor Author

Awaiting final stakeholder approval on send_yourself email being correct. Design has been approved.

@amychurchwell
Copy link
Contributor Author

Demo has been approved by stakeholder. 👍

@craigcook craigcook self-assigned this Jan 9, 2019
Copy link
Member

@craigcook craigcook left a comment

Choose a reason for hiding this comment

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

A few nitpicks and some things to make it look better in small viewports, but overall looking good. Nice work!

media/css/firefox/whatsnew/whatsnew-lite.scss Outdated Show resolved Hide resolved
media/css/firefox/whatsnew/whatsnew-lite.scss Outdated Show resolved Hide resolved
media/static-bundles.json Outdated Show resolved Hide resolved
media/css/firefox/whatsnew/whatsnew-lite.scss Outdated Show resolved Hide resolved
media/css/firefox/whatsnew/whatsnew-lite.scss Show resolved Hide resolved
bedrock/base/templates/macros.html Outdated Show resolved Hide resolved
bedrock/base/templates/macros.html Outdated Show resolved Hide resolved
media/css/firefox/whatsnew/whatsnew-lite.scss Show resolved Hide resolved
@amychurchwell amychurchwell force-pushed the id-whatsnew branch 2 times, most recently from 23cbc21 to 8cda14c Compare January 10, 2019 22:53
@alexgibson
Copy link
Member

alexgibson commented Jan 14, 2019

Note that this page has a test associated with it that will likely need updating. Happy to help assist here if you have any questions.

@amychurchwell
Copy link
Contributor Author

Note that this page has a test associated with it that will likely need updating. Happy to help assist here if you have any questions.

Thanks Alex! For this test, would you recommend rewriting to assert for send_yourself being visible?

assert not page.is_qr_code_displayed
assert page.send_yourself.is_displayed

@alexgibson
Copy link
Member

@amychurchwell Ideally it would be great to test the functionality of this new widget, like this test does here. I believe that would involve writing some new code however, since this new page uses the new send_yourself macro, and we have still to deprecate the old send_to_device widget 😕. I'd be happy to help out here, or to try and point you in the right direction. Let me know if I can help!

Copy link
Member

@alexgibson alexgibson left a comment

Choose a reason for hiding this comment

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

So close!

Just a couple more things, but I would push this branch to run-integration-tests just to make sure things pass before we merge.

tests/pages/firefox/whatsnew.py Outdated Show resolved Hide resolved
tests/functional/firefox/test_whatsnew.py Show resolved Hide resolved
@alexgibson
Copy link
Member

alexgibson commented Jan 17, 2019

@amychurchwell I took a look at the test failure here to try and work out what's wrong, and it looks like the failure is genuine, the form is broken 😅

If I load the page locally, enter [email protected] into the email field and hit enter, I'm presented with this raw json response:

screenshot_2019-01-17 screenshot

The test is failing becuse it's expecting the thank-you message to be displayed. I'll comment in the PR as to what I think is missing here.

I guess this is why it's important to have tests! 🙂

Copy link
Member

@alexgibson alexgibson left a comment

Choose a reason for hiding this comment

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

The mystery test failure seems genuine. I commented as to what i think needs doing to fix the form 👍

@@ -1595,10 +1595,17 @@
{
"files": [
"js/base/send-to-device.js",
"js/base/send-yourself.js",
Copy link
Member

@alexgibson alexgibson Jan 17, 2019

Choose a reason for hiding this comment

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

There's no need to add this file to the regular firefox_whatsnew bundle, it can be removed.

"js/firefox/whatsnew/whatsnew.js"
],
"name": "firefox_whatsnew"
},
{
"files": [
"js/base/send-yourself.js"
Copy link
Member

@alexgibson alexgibson Jan 17, 2019

Choose a reason for hiding this comment

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

You're loading the send-yourself.js script here, but you're missing JS that initialises the form:

    var form = new Mozilla.SendYourself('download-firefox-rocket');
    form.init();

You'll likely need to create a new JS file like whatsnew-id.js where this gets initialized.

I noticed that the page header also seems broken, with the mozilla logo bleeding into the page:

screenshot_2019-01-17 firefox lite

You'll likely need to include this snippet of JS like on other whatsnew pages that shows the up-to-date message (although the logo probably shouldn't look misaligned even if this message is not displayed):

"js/firefox/whatsnew/whatsnew.js"
],
"name": "firefox_whatsnew"
},
{
"files": [
"js/base/send-yourself.js"
Copy link
Member

Choose a reason for hiding this comment

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

I tried fixing the page locally, and I noticed the button on the thank-you message is unstyled:

screenshot_2019-01-17 firefox lite 1

Copy link
Member

Choose a reason for hiding this comment

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

I also had to include "js/libs/spin.min.js" in the bundle, which seems to be a dependency for send-yourself to work.

Copy link
Member

@alexgibson alexgibson left a comment

Choose a reason for hiding this comment

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

Spotted 2 last issues, then I think we're fine to merge 👍

tests/pages/regions/send_yourself.py Outdated Show resolved Hide resolved
media/js/firefox/whatsnew/whatsnew-id.js Show resolved Hide resolved
class SendYourself(FirefoxBaseRegion):

_root_locator = (By.CSS_SELECTOR, '.mzp-c-sendyourself')
_email_locator = (By.ID, '.mzp-c-sendyourself-input')
Copy link
Member

Choose a reason for hiding this comment

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

By.CSS_SELECTOR

if (client.isFirefoxDesktop) {
client.getFirefoxDetails(function(data) {
if (data.isUpToDate) {
document.querySelector('.c-page-header').classList.add('is-up-to-date');
Copy link
Member

Choose a reason for hiding this comment

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

When testing locally, the page header still looks a bit wonky:

screenshot_2019-01-18 firefox lite

Looking in your CSS, it looks like the JS class to apply should be:

classList.add('show-up-to-date-message');

Even if someone views this page when their browser is not up to date, it would be nice if the Mozilla logo was still centered by default (but not a blocker).

@alexgibson alexgibson merged commit 04ec69c into mozilla:master Jan 18, 2019
@stephaniehobson stephaniehobson removed the Needs Review Awaiting code review label Oct 16, 2019
@amychurchwell amychurchwell deleted the id-whatsnew branch January 10, 2020 17:11
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.

4 participants