Граф коммитов

13597 Коммитов

Автор SHA1 Сообщение Дата
Craig Cook af7db12304 Delete redundant Fluent files for WNP 80 and 81 2021-10-27 14:14:11 +01:00
Craig Cook e01900ce54
Add MR2 promo to home page [fix #10620] (#10641) 2021-10-26 15:12:08 -07:00
Craig Cook 22a0091a20
Update to Protocol 15.0.0, update logos and wordmarks (#10635)
Remove welcome page 5 for Lockwise.
Remove old Focus and Send logos.
Add logos for structured data.
Use new video component for video embeds.
2021-10-26 08:21:37 -07:00
maureenlholland 7152b89817 Use server side yandex redirect (fixes #10607) 2021-10-26 10:26:12 +01:00
Steve Jalim 35e60ae543
Contentful: switch to using SQS-based signalling rather than polling API every 5 mins (#10610)
* 10544: Add Contentful-SQS settings, from env vars

* Update documentation re test service lacking custom env vars

* 10544: Switch from polling Contentful directly to checking a message queue

Prior to this changeset, the update_contentful management command would immediately pull all content from Contentful and then decide whether the local DB needed updating or not.
This change was run every few minutes as part of run-db-update.sh, called by a clock process, and resulted in lots of API calls to Contentful, even though content may not have changed.

This changeset now first checks an SQS message queue for a notification from Contentful (put there via a separately configured webhook at the Contentful side each time content state changes). The messages are checked and, if the indicate that a content update is worthwhile, only _then_ is the previous set of API calls triggered.

The 'go' actions vary depending on whether this is in use on Dev/Stage or Prod, to allow Dev to pull in updated draft/preview content, too. Note that Dev needs a preview-compatible API key to work in DEV=True mode

Also note that the --force option now does two things:
 * [ADDED] poll contentful regardless of queue state
 * [RETAINED] update stored data even if the data hash matches

* 10544: Ensure we check the entire queue, not just the first 10 messages

...because our first 'go' signal might be 11+ messages deep in the queue

* 10544: A little tuning of the contentful importer + add MPL atop the code

* 10544: Add in tests for new contentful syncing logic

* 10544: minor typing tweak

* 10544: Make the update_contentful management command tolerant of absent config

If either Contentful or AWS SQS config is not provisioned (eg locally, or in an environment where we currently lack SQS config), we handle things gracefully so that we do not block the rest of any script that calls this command

* 10544: Remove duplicated MPL text

* 10544: Back out misleading documentation change
2021-10-25 22:37:50 +01:00
Steve Jalim 7ffe59bbbb 10631: Add term-missing as a coverage.py param 2021-10-25 15:59:53 -04:00
Steve Jalim a8d2e59939 10631: Reinstate support for python-coverage
This changeset makes Bedrock tests use coverage.py once more, but this time via the pytest-cov plugin

The configuration set up ignores a (seemingly) sensible set of files and folders, while also outputting HTML and XML reports, for human and [future] machine enjoyment.

Key changes:
* Config expanded for coverage.py
* Main test-running script updated to invoke pytest with the appropriate coverage-logging options
* Docs updated with a small note.
2021-10-25 15:59:53 -04:00
Steve Jalim 7df1114d1f 10631: Add pytest-cov; upgrade coverage.py, pytest-django and pytest-html
All hashed-in for 3.7, 3.8 and 3.9
2021-10-25 15:59:53 -04:00
Paul McLanahan 6c2b673386 Fix #10632: Add umbrella image
This will be uploaded to the CDN and then Firefox will use it during
onboarding.
2021-10-25 15:27:57 -04:00
Alex Gibson b7eeda8edb Remove google domains from Sentry JS allowList (Fixes #10615) 2021-10-25 15:04:01 +01:00
Reem H 2f9f3f73f0
Adding FF Relay to products page (#10611)
* added ftl strings and drafted it on the page

* added relay image and updated some tags

* reverting cunnecessary changes on irrelevant file

* added better sized image for relay

* added fluent conditional

* added period
2021-10-22 10:50:47 -04:00
Steve Jalim a8ed6ae9c4
Add pre-commit hook for including the MPLv2 in all source code files (#10617)
* 10614: Add pre-commit hook for including the MPLv2

Adds to Python, JS, SCSS, Jinja HTML, Fluent templates and shell scripts

Note that the order of application of the hooks is important - we want to add a missing license before we check the formatting of files

* 10614: Update MPLv2 comments on all templates to match standard format produced by pre-commit hook

* Updates existing MPLv2 text to use a https URL
* Amend a handful of Fluent templates that used a token instead of the string "Mozilla" - this standardised things; translation was not used or needed
* Add missing MPLv2 where needed
* Update three tests that regressed with these changes, above

* 10614: Update pre-commit config to not add MPL to JS libraries; Remove MPL from the four files which should not have had it
2021-10-22 13:09:44 +01:00
Ayushsunny d8389a1e8a Removed yarn as a dependencies and updated the docs 2021-10-22 10:13:39 +01:00
Ayushsunny cb86fb67b1 Fixed footer links 2021-10-22 09:54:38 +01:00
Paul McLanahan 0cff976a89 Make Contentful environment configurable
And make the "master" alias the default.
2021-10-21 16:03:03 -04:00
Paul McLanahan de54d4c1af Add tests for changes to geo CDN headers 2021-10-20 20:51:43 -04:00
Paul McLanahan a281c148c5 Support CloudFront geo header
In addition to supporting the CloudFlare header, we should add
support for the CloudFront one so that we can more easily switch
CDN providers should we need to.
2021-10-20 18:27:39 -04:00
Alex Gibson 45dfd699ca Add helper to determine whether to run experiments (Fixes #10559) 2021-10-19 12:06:34 +01:00
Craig Cook f9afb58e08
Add Imo Udom to leadership page [fix bug #1735900] (#10609) 2021-10-18 16:23:44 +01:00
Alex Gibson 9706ced5fe
Fix 500 error for missing macro on /ru/firefox/new/ (Fixed #10605) (#10606) 2021-10-18 10:29:33 +01:00
Craig Cook 68804fee65 Update home page functional tests [#10560] 2021-10-18 09:02:24 +01:00
maureenlholland ede5335c57
Remove deprecated picto cards [#10500] (#10541) 2021-10-15 16:21:35 -07:00
Reem H 10e95dbc5b
remove MR1 banner from Contentful homepage (#10603) 2021-10-15 15:25:20 -07:00
Paul McLanahan 06ebf0b8bf Avoid crash when updating Contentful page with errors 2021-10-15 17:47:27 -04:00
Reem H 0c99fac5af
removed links to research.mozilla.org (#10597) 2021-10-15 14:41:16 -07:00
Craig Cook 52859d9170 Restore WNP92 for French 2021-10-15 16:14:30 +01:00
Steve Jalim 30c427e9ce 10586: Backfill test for WhatsNewChina page
Adds some regression protection after the fix
2021-10-15 15:35:04 +01:00
maureenlholland 4c53d94a98
Remove sticky nav if user prefers reduced motion (#10592) 2021-10-15 15:14:59 +01:00
Alex Gibson 88b996331a
Fix /whatsnew 91 page 500 error (#10599) 2021-10-15 10:09:04 +01:00
Craig Cook c7c437a895
Remove old whatsnew pages for Firefox 86 through 90 (#10589) 2021-10-15 09:20:57 +01:00
Steve Jalim 72609c9029
Documentation tweaks while in the neighbourhood (#10595) 2021-10-14 14:45:14 +01:00
Alex Gibson 0801611b06 Upgrade NodeJS Docker image to 14 (Fixes #10464) 2021-10-13 16:02:30 +01:00
Steve Jalim c917bdfab9
Fixup HTTP 500 when certain WNPs for China are loaded (#10587)
Sentry flagged that some pages were blowing up for specific, earlier, versions of FF and a specific locale

This changeset remedies that.

Fixes #10586

Manually tested on the following:

Failing before fix, working after:

http://localhost:8080/en-US/firefox/87.0/whatsnew/china/
http://localhost:8080/en-US/firefox/88.0/whatsnew/china/
http://localhost:8080/en-US/firefox/92.0.1/whatsnew/china/
http://localhost:8080/en-US/firefox/93.0/whatsnew/china/

Working before and after (lots, but a cherry-pick)
http://localhost:8000/en-US/firefox/73.0/whatsnew/china/
http://localhost:8000/en-US/firefox/whatsnew/china/

Unit test for regression protection will follow in a separate fixup
2021-10-13 14:24:33 +01:00
Craig Cook 66d2e79ad2 Return whatsnew template as a list in China view [fix #10584]
Preserves the original whatsnew view with all the Fluent references.
2021-10-13 09:42:07 +01:00
Francesco Menghi 002e49a50c
Hide overflow to fix RTL issues on /firefox/developer/ [fix #10255] (#10583) 2021-10-12 13:41:52 -07:00
Steve Jalim e41c6df191 10575: Update git-blame-ignore-revs for this issues's crucial commit 2021-10-12 13:58:30 +01:00
Steve Jalim 5f3865dbee
10575: Allow black to format migrations + reformat (#10578)
* 10575: Update black configs to stop it skipping migration files

This brings it into line with isort running on all things.

Note: removing the `migrations` dir from the exclusions will broaden the scope of other tools that pre-commit uses, but this makes sense as black and isort will be targetting these, so why not flake8 too?

* 10575: Apply updated Black config to Bedrock migrations

* 10575: Update git-blame history ignoring for previous commit
2021-10-12 11:38:57 +01:00
Craig Cook c0fbb656dd
Update Mozilla DMB link on history page [no bug] (#10576) 2021-10-11 13:12:16 -07:00
Paul McLanahan acbfcfcfe5
Update .git-blame-ignore-revs for isort (#10577) 2021-10-11 20:12:33 +01:00
Steve Jalim ab38b080ab
10570: Add isort support to project (#10573)
* Update requirements to avoid requests version clash

* 10570: Add isort to project

* 10570: Add isort config to project

* 10570: Add isort as a test run/CI step

* 10570: Add isort to pre-commit config

* 10570: Update isort config to allow tests/pages.py to be first-party, which is more appropriate

* 10570: Apply isort to entire codebase, using project config

* 10570: Explicitly include lib/ as a first-party import

This behaviour is already implicit in the current config, but making it explicit, partly to protect against a future change. Also makes it easier to grok what will happen to various bedrock-codebase imports

* 10570: Update isort config to stack Django imports above third-party ones

* 10570: [nit-fix] Update run-tests.sh to call isort with the same syntax pattern as we call black
2021-10-11 18:08:58 +01:00
Alex Gibson e1ad669b32 Update .git-blame-ignore-revs 2021-10-08 16:07:35 +01:00
Alex Gibson 7305098445 Format JS files using Prettier (Fixes #10468, #10479) 2021-10-08 16:07:35 +01:00
Steve Jalim 2ef16dc299 NOTICKET: Minor documentation updates, encountered during onboarding 2021-10-08 16:03:17 +01:00
Steve Jalim b8ec9b368f NOTICKET: Making local doc building work again following urllib upgrade
In order to `make livedocs`, one needs to install requirements/docs.txt locally. However, upgrading urllib3 from 1.25.8 to 1.26.5 in #10555 broke the installation of `requests`.

This changeset upgrades `requests`, adds a hashed dependency introduced by requests, and also upgrades attrs, so that installation works on Python 3.9. Python 3.10 is not yet supported for this installation - it was about getting it back on its feet first.
2021-10-08 16:03:17 +01:00
Steve Jalim d5376bf80c NOTICKET: Add paul-mclendahand config to bedrock
https://github.com/willkg/paul-mclendahand makes maintenance-PR handling so much easier than one-by-one

This changeset adds a default config to make it pretty much instant to use after installation.

Note that this addition doesn't specify which remote to use, so we may need to tune this if 'origin' means different things to different contributors.
2021-10-08 14:07:03 +01:00
maureenlholland 126f7a194d Update to dart-sass, update scss division (fixes #10459, #10469) 2021-10-08 12:45:52 +01:00
Reem H 563a8cc993
Updated extension link in Brave comparison page [fix #10561] (#10567) 2021-10-07 14:28:03 -07:00
Steve Jalim 1a847bacfc
Update dependency prs (#10555)
* Bump pillow from 8.1.1 to 8.3.2 in /requirements (from PR #10427)

Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.1.1 to 8.3.2.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/8.1.1...8.3.2)

* Bump django from 2.2.21 to 2.2.24 in /requirements (from PR #10266)

Bumps [django](https://github.com/django/django) from 2.2.21 to 2.2.24.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/2.2.21...2.2.24)

* Bump urllib3 from 1.25.8 to 1.26.5 in /requirements (from PR #10246)

Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.8 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.8...1.26.5)

* Bump lxml from 4.3.3 to 4.6.3 in /requirements (from PR #10067)

Bumps [lxml](https://github.com/lxml/lxml) from 4.3.3 to 4.6.3.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.3.3...lxml-4.6.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-07 11:42:59 +01:00
Ayushsunny 9c9ca4ec07 Removed incorrect email for academic question on contact page 2021-10-07 11:32:42 +01:00
Craig Cook 95bdaeeb7a
Update more Focus logos [fix #10552] (#10554) 2021-10-06 13:27:48 -07:00