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

WNP135 for North America (#15852) #15876

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{#
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% extends "firefox/whatsnew/base.html" %}

{% block page_css %}
{{ css_bundle('firefox_whatsnew_135_pdf') }}
Copy link
Collaborator Author

@maureenlholland maureenlholland Jan 15, 2025

Choose a reason for hiding this comment

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

new css paths (js removed)

{% endblock %}

{% block wnp_content %}
<section class="wnp-content-main mzp-l-content mzp-t-content-md">
<h1 class="wnp-main-title">
{{ picture(
url="img/firefox/whatsnew/whatsnew135-pdf/edit-pdfs-light.svg",
Copy link
Collaborator Author

@maureenlholland maureenlholland Jan 15, 2025

Choose a reason for hiding this comment

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

new image paths

sources=[
{
"media": "(prefers-color-scheme: light)",
"srcset": {
"img/firefox/whatsnew/whatsnew135-pdf/edit-pdfs-light.svg": "default",
}
},
{
"media": "(prefers-color-scheme: dark)",
"srcset": {
"img/firefox/whatsnew/whatsnew135-pdf/edit-pdfs-dark.svg": "default",
}
}
],
optional_attributes={
"alt": "Edit PDFs in Firefox",
"width": "435",
"height": "222",
}
) }}
</h1>

<div class="wnp-editor">
<p class="wnp-main-tagline">
Say goodbye to the hassle of printing or filling out PDFs in other apps. Quickly and easily edit documents right in your browser.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated text

</p>


<p class="wnp-main-cta">
<a class="mzp-c-button mzp-t-product" href="https://assets.mozilla.net/wnp135-en/wnp-fx135-en.pdf" data-cta-type="button" data-cta-text="Try it now" target="_blank" rel="noopener">
Try it now
</a>
</p>
</div>

<p class="wnp-sign-off">
<strong>Powered by Mozilla.</strong> Putting people before profits since 1998.
</p>
</section>

{% endblock %}
22 changes: 22 additions & 0 deletions bedrock/firefox/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,28 @@ def test_fx_135_0_0beta_pl(self, render_mock):

# end 135 beta whatsnew tests

# begin 135 na whatsnew tests

@override_settings(DEV=True)
def test_fx_135_0_0_en_US(self, render_mock):
"""Should use whatsnew-fx135-na template for en-US locale"""
req = self.rf.get("/firefox/whatsnew/")
req.locale = "en-US"
self.view(req, version="135.0")
template = render_mock.call_args[0][1]
assert template == ["firefox/whatsnew/whatsnew-fx135-na.html"]

@override_settings(DEV=True)
def test_fx_135_0_0_en_CA(self, render_mock):
"""Should use whatsnew-fx135-na template for en-CA locale"""
req = self.rf.get("/firefox/whatsnew/")
req.locale = "en-CA"
self.view(req, version="135.0")
template = render_mock.call_args[0][1]
assert template == ["firefox/whatsnew/whatsnew-fx135-na.html"]

# end 135 na whatsnew tests

@override_settings(DEV=True)
def test_rv_prefix(self, render_mock):
"""Prefixed oldversion shouldn't impact version sniffing."""
Expand Down
3 changes: 3 additions & 0 deletions bedrock/firefox/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ class WhatsnewView(L10nTemplateView):
"firefox/whatsnew/whatsnew-fx134-de.html": ["firefox/whatsnew/whatsnew"],
"firefox/whatsnew/whatsnew-fx134-fr.html": ["firefox/whatsnew/whatsnew"],
"firefox/whatsnew/whatsnew-fx135-eu.html": ["firefox/whatsnew/whatsnew"],
"firefox/whatsnew/whatsnew-fx135-na.html": ["firefox/whatsnew/whatsnew"],
}

# specific templates that should not be rendered in
Expand Down Expand Up @@ -620,6 +621,8 @@ def get_template_names(self):
elif version.startswith("135."):
if locale in ["de", "fr", "en-GB"]:
template = "firefox/whatsnew/whatsnew-fx135-eu.html"
elif locale in ["en-US", "en-CA"]:
template = "firefox/whatsnew/whatsnew-fx135-na.html"
else:
template = "firefox/whatsnew/index.html"
elif version.startswith("134."):
Expand Down
31 changes: 31 additions & 0 deletions media/css/firefox/whatsnew/whatsnew-135-pdf.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

@import 'includes/base';
@import 'includes/dark-mode';
@import '~@mozilla-protocol/core/protocol/css/includes/lib';
@import '~@mozilla-protocol/core/protocol/css/components/notification-bar';

.wnp-content-main {
text-align: center;
}

.wnp-main-title {
margin: 0 auto $layout-md;
color: $color-black;
}

.wnp-main-tagline {
@include text-body-lg;
color: $color-black;
}

// Dark mode support
@media (prefers-color-scheme: dark) {
.wnp-main-title,
.wnp-main-tagline {
color: $color-white;
}
}
16 changes: 16 additions & 0 deletions media/img/firefox/whatsnew/whatsnew135-pdf/edit-pdfs-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions media/img/firefox/whatsnew/whatsnew135-pdf/edit-pdfs-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions media/static-bundles.json
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,12 @@
],
"name": "firefox_whatsnew_135"
},
{
"files": [
"css/firefox/whatsnew/whatsnew-135-pdf.scss"
],
"name": "firefox_whatsnew_135_pdf"
},
{
"files": [
"css/firefox/firefox-20th/firefox-20th.scss"
Expand Down
Loading