-
Notifications
You must be signed in to change notification settings - Fork 919
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
Fixup CTD landing & update promo link #14965
Conversation
<p><small>(Wir haben auch ein paar wirklich gute Argumente.)</small></p> | ||
|
||
<a href="{{ url('firefox') }}" class="mzp-c-button mzp-t-product" data-cta-text="Ich schau mir Firefox mal an" data-cta-type="button" data-cta-position="banner">Ich schau mir Firefox mal an</a> | ||
<a href="/de/firefox/challenge-the-default/" class="mzp-c-button mzp-t-product" data-cta-text="Ich schau mir Firefox mal an" data-cta-type="button" data-cta-position="banner">Ich schau mir Firefox mal an</a> |
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 is a /de/–only promo include with hardcoded de strings, so I felt it's okay to also hardcode a /de/* link, given it's not available in the defined url()s otherwise.
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.
BTW the only thing I have left as-is is the switch logic that still implies the original /firefox takeover:
bedrock/bedrock/firefox/templates/firefox/challenge-the-default/landing-switch.html
Line 20 in 36e8e9c
{% include 'firefox/index.html' %} |
which results in missing strings if the campaign is turned off, and the landing not removed and/or redirected away (see e.g. https://www.allizom.org/de/firefox/challenge-the-default/ …)
I contemplated monkey-patching a meta-redirect instead of said include, but the page should be removed or redirected from when the time comes instead of flipping the switch anyways now when it's not /firefox takeover, so I kept it as-is — maybe the switch logic can be removed completely to be on the safe side?
bedrock/firefox/templates/firefox/challenge-the-default/landing-base.html
Show resolved
Hide resolved
Needs a rebase 🙏 |
(I cowardly did a merge instead to better show the diff, it should only be tabindex additions and data-cta-type removals from the recently landed PRs.) |
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.
Wow, these are good changes and I'm sorry we left them to languish in the PR queue for so long. Many good simplifications and code deletions 💯
The only thing I think I would still carry over is the custom CTD social sharing image.
R+wc
bedrock/firefox/templates/firefox/challenge-the-default/landing-base.html
Show resolved
Hide resolved
{% block page_favicon_large %}{{ static('img/favicons/firefox/favicon-196x196.png') }}{% endblock %} | ||
{% block page_ios_icon %}{{ static('img/favicons/firefox/apple-touch-icon.png') }}{% endblock %} | ||
{% block page_title_suffix %} — {{ ftl('firefox-home-mozilla') }}{% endblock %} | ||
{% block page_desc %}{{ seo_desc }}{% endblock %} |
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.
We should bring the page_image
over for CTD social share images.
Changing the template did make the favicon updates unnecessary though 🙂
{% block page_desc %}{{ seo_desc }}{% endblock %} | |
{% block page_desc %}{{ seo_desc }}{% endblock %} | |
{% block page_image %} | |
{% if LANG == "fr" %} | |
{{ static('img/firefox/challenge-the-default/ctd-share-fr.png') }} | |
{% else %} | |
{{ static('img/firefox/challenge-the-default/ctd-share.png') }} | |
{% endif %} | |
{% endblock %} |
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.
Oh no worries, it started out as a simple a11y +runaway tag fix, but while testing it and after validating further it turned out there's more to tackle — maybe if I submitted the individual issues separately, It would have been easier to review in smaller focused chunks, instead of this seemingly unrelated lump of tiny changes…
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.
@stephaniehobson So this poster image thing is actually sorted out, just elsewhere:
bedrock/bedrock/firefox/templates/firefox/challenge-the-default/langs/landing.fr.html
Lines 7 to 9 in 7dfe742
{% extends "firefox/challenge-the-default/landing-base.html" %} | |
{% block page_image %}{{ static('img/firefox/challenge-the-default/ctd-share-fr.png') }}{% endblock %} |
Every language sets it. It only needed removing this hardcoded logic in base to start working for all;)
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.
All the three links I've chosen for testing above (de, pl, fr) should each render its own poster, as was originally intended in #14306/files additions.
NB: DE uses English branding, other languages have logos and such localized.
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.
R+ 🚀
One-line summary
Fixes link from /de home leading to CTD landing. (Also fixes random markup issues.)
Significant changes and points to review
The CTD was created in several phases and lived in a few places before settling where it is today, accumulating some fragments of its history that break things today. This aims to make it all work as expected:
Landing changed to fx base and cleaned up to just extend from base. Fixed:
Also fixed:
Issue / Bugzilla link
#14957
#14950
Testing
http://localhost:8000/de/
http://localhost:8000/de/firefox/challenge-the-default/
http://localhost:8000/fr/firefox/challenge-the-default/?v=6
http://localhost:8000/pl/firefox/challenge-the-default/