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

16065 Коммитов

Автор SHA1 Сообщение Дата
Alex Gibson f90d8bf0a5 Add UK influencer campaign page (Fixes #15841) 2025-01-23 13:06:43 +00:00
Rob Hudson eefdbfa44f Update ruff to >=0.9
Update `ruff` and code for the "2025 style guide"
2025-01-16 13:19:06 -08:00
Alex Gibson 95a5abb5e3
Prevent JS errors on IE8 (#15871)
* Prevent loading GA on IE8 and below (Issue #15867)

* Prevent loading newsletter JS on old IE (Issue #15867)
2025-01-16 10:11:56 -08:00
Alex Gibson 2dfdef4f83 Fix aria states for mobile side menu component 2025-01-16 10:05:37 -08:00
Steve Jalim 7e7306b757
Revert "Revert "Revert "Add helpers to support a 'hybrid cache' option that u…" (#15883)
This reverts commit d1cc91723c.
2025-01-16 18:43:42 +04:00
Steve Jalim d1cc91723c
Revert "Revert "Add helpers to support a 'hybrid cache' option that uses locm…" (#15882)
This reverts commit c2343c25ff.
2025-01-16 18:17:42 +04:00
Steve Jalim c2343c25ff
Revert "Add helpers to support a 'hybrid cache' option that uses locmem + DB …" (#15881)
This reverts commit c35203635e.
2025-01-16 16:57:53 +04:00
Steve Jalim c35203635e
Add helpers to support a 'hybrid cache' option that uses locmem + DB cache (#15859)
* Add helpers to support a 'hybrid cache' option that uses locmem + DB cache

In order to balance the need for a distributed cache with the speed of a
local-memory cache, we've come up with a couple of helper functions that wrap
the following behaviour:

Getting values:
* If it's in the local-memory cache, return that immediately.
* If it's not, fall back to the DB cache, and if the key exists there,
return that, cacheing it in local memory again on the way through
* If the local memory cache and DB cache both miss, just return the
default value for the helper function

Setting values:
* Set the value in the local memory cache and DB cache at (almost) the same time
* If the DB cache is not reachable (eg the DB is a read-only replica), log
this loudly, as it's a sign the helper has not been used appropriately, but
still set the local-memory version for now, to prevent total failure.

IMPORTANT: before this can be used in production, we need to create the
cache table in the database with ./manage.py createcachetable AFTER this
code has been deployed. This sounds a bit chicken-and-egg but we hopefully can
do it via direct DB connection in the worst case.

* Add support to the sqlite export command to boostrap the DB cache table, to keep demos and other sqlite-powered things happy

* Remove debugging print statement

* Comment fixups

* Improve configurability of hybrid cache timeouts + add relevant tests

* Set a very long default cache time for the DB-backed cache, which can still be set to None/no-expiry when needed
2025-01-16 16:14:37 +04:00
Rob Hudson 25ff14beff Update Python deps, incl Django sec release 2025-01-15 13:50:53 -08:00
maureenlholland cef4b3ddc3 Migrate /privacy to use Sass @use 2025-01-15 10:20:07 +00:00
Jan Brasna 47948ed1e2
Show current logo in old IE nav fallback (#15869) 2025-01-15 09:19:08 +00:00
Alex Gibson c188a007b4
Migrate /foundation scss from @import to @use (issue #10896) (#15860) 2025-01-14 13:40:38 +00:00
maureenlholland b3110e2c45 Migrate /security scss from @import to @use (issue #10896) 2025-01-14 12:34:07 +00:00
Basma A 515b1b27fe
update the prod image tag (#15848)
Signed-off-by: Basma1912 <basad@mozilla.com>
2025-01-13 18:31:22 +04:00
Steve Jalim 25b38f7f04
Bedrock performance tooling and initial optimisations (#15513)
* Add support for Django-silk profiling in local/non-prod only

Also add script to hit some common/popular URLs
to give djanjo-silk some traffic to capture

* Add cacheing to geo.valid_country_code for performance boost

Saves 11 SQL queries on the releasnotes page by cacheing the country code
lookup for an hour.

Tested on /en-US/firefox/132.0.1/releasenotes/

Cold cache: 14 queries / 2066ms
Warm cache: 3 queries / 222ms

* Rename 'default' cache time to CACHE_TIME_SHORT to make it more meaningful a name

* Add cacheing to Careers views to reduce number of DB hits

Caches derived values (location options, etc) for longer than the actual page of positions

Takes careers listing page down from 9 queries to 2 for the CMS deployment and 0
on the Web deployment

* Cache the newsletter lookup for 6 hours

It's used on the newsletter form which shows up
in a bunch of places on the site.

* Add missing subdep to hashed requirements

* Reinstate missing function call in _log() helper 🤦
2025-01-13 17:30:19 +04:00
maureenlholland 9db97b80d6
Fix chasing underline under multiple lines (fixes #15683) (#15781)
Box decoration break cloning doesn't work as expected with an
inline-block element.

All of our current CTA uses are inside a containing block element,
so that container can handle block-level layout and let the CTA
be inline display.
2025-01-10 14:41:21 -04:00
Alex Gibson a092ffcd9d
Update @mozmeao/consent-banner to v1.1.0 (Fixes #15839) (#15842) 2025-01-10 11:20:23 -04:00
Steve Jalim ad2aa5e14b
Support wagtail-localize-smartling 0.10 (#15830)
* Remove Bedrock-held code for sending 'translation imported' emails

This has been moved to wagtail-localize-smartling 0.10.0

* Add option to enable the Wagtail Styleguide

This is handy when developing features.
https://docs.wagtail.org/en/stable/contributing/styleguide.html

* Prepare Bedrock for wagtail-localize-smartling==0.10.2

It needs django.contrib.humanize to be in INSTALLED_APPS, in order to
support markup for the task dashboard added to w-l-s
2025-01-10 19:16:54 +04:00
Steve Jalim 2455253681
Rearrange some documentation for CMS building, to make it easier to know what's relevant and to where (#15840) 2025-01-10 16:04:08 +04:00
Jan Brasna f5193cd284
Fixup :visited:focus specificity (#15838) 2025-01-10 11:29:03 +00:00
Alex Gibson bb3f3a80e2
Migrate /cms scss from @import to @use (Issue #10896) (#15834) 2025-01-09 18:54:35 +00:00
Alex Gibson 8ccf7bd979 Exclude googlebot from experiment redirects (Fixes #15773) 2025-01-09 10:04:54 -08:00
Jingwen Zhu bc23ddf990
wnp 135 beta copy change (fix #15832) (#15835) 2025-01-09 13:44:08 -04:00
Rob Hudson ca9bc7b18e On hosts with wagtail admin enabled set `frame-ancestors 'self'` 2025-01-09 08:54:48 -08:00
Jingwen Zhu 4be9180469
make footer readable and functional for IE 11 (fix #15536) (#15827)
* make footer readable and functional for IE 11 (fix #15536)

* add comment to clarify hard-coded value
2025-01-09 09:43:09 -04:00
Jan Brasna 1eb382d90d
Fix font specificity in CTA and WNP (#15802) 2025-01-09 10:41:22 +00:00
Alex Gibson 2b3f89139e Migrate /careers to use Sass @use (Issue #10896) 2025-01-09 09:26:57 +00:00
maureenlholland 9e2aca2147
Fix Animation button accessibility issues (fixes #15762, #15763, #15764) (#15776)
* Keep animation toggle label on small screens (fixes #15762)

* Better high contrast mode support (fixes #15763)

* Ensure focused animation button appears above sticky nav (fixes #15764)
2025-01-08 18:17:45 +00:00
Rob Hudson 85b59432a9
Update newsletter recovery to use new JSON API (#15787) 2025-01-08 07:47:44 -08:00
Jan Brasna 11ef8d39e9 Don't hide all locales link in nonJS 2025-01-08 13:25:45 +00:00
Jan Brasna 9d597c38e2
Fix RTL launchpad & links padding (#15799) 2025-01-08 13:17:22 +00:00
Steve Jalim d69fc08cfe
Backend dependency bumps (#15815)
* Backend dependency bumps

Most things from Rob's lovely ./bin/check-pinned-requirements.py script,
but not the pytest-related ones (which will take more work) or granian
(which we want to check out more on basket first)

* Port over smarter dep-check script from Basket - handles mismatched casing

* Reinstate docs.in to bin/check-pinned-requirements.py
2025-01-08 13:50:15 +04:00
Alex Gibson 4b57292c94
Remove WNP templates for FF 125 - 129 (Fixes #15807) (#15808) 2025-01-07 15:29:45 +00:00
Alex Gibson 7b4eb05d7d
Improve top level landmarks (Fixes #15814) (#15816) 2025-01-07 11:13:03 -04:00
Alex Gibson 73c9740ed4
Remove VPN wave VII switch and expand test coverage (Fixes #15514) (#15806) 2025-01-07 15:01:07 +00:00
Jan Brasna 8399e34310 Don't use JAN title for MAR cert moments 2025-01-07 14:23:25 +00:00
Steve Jalim 035871775b
Fix extraction of paths from CMS for the sitemap - don't over-strip the locale string (#15812)
Resolves #15805
2025-01-06 19:43:03 +04:00
Alex Gibson 1dae810683
Fix navigation heading levels (Fixes #15809) (#15811) 2025-01-06 10:52:34 -04:00
Jan Brasna 35d9517f46
Skip GHA GAR push from forks (#15813) 2025-01-06 14:00:28 +00:00
Jan Brasna 8c8541729e Hide firefox-app-store overflow 2025-01-06 13:36:06 +00:00
dependabot[bot] 78b5f5af20 Bump webpack-cli from 5.1.4 to 6.0.1
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 5.1.4 to 6.0.1.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@5.1.4...webpack-cli@6.0.1)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-06 10:23:28 +00:00
dependabot[bot] fcffede711 Bump the dev-dependencies group with 4 updates
Bumps the dev-dependencies group with 4 updates: [concurrently](https://github.com/open-cli-tools/concurrently), [globals](https://github.com/sindresorhus/globals), [jasmine-core](https://github.com/jasmine/jasmine) and [webpack-dev-server](https://github.com/webpack/webpack-dev-server).


Updates `concurrently` from 9.1.0 to 9.1.2
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v9.1.0...v9.1.2)

Updates `globals` from 15.12.0 to 15.14.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v15.12.0...v15.14.0)

Updates `jasmine-core` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/jasmine/jasmine/releases)
- [Changelog](https://github.com/jasmine/jasmine/blob/main/RELEASE.md)
- [Commits](https://github.com/jasmine/jasmine/compare/v5.4.0...v5.5.0)

Updates `webpack-dev-server` from 5.1.0 to 5.2.0
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: concurrently
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: globals
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: jasmine-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-06 10:14:27 +00:00
dependabot[bot] fd20ac14ab Bump the frontend group with 6 updates
Bumps the frontend group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [@sentry/browser](https://github.com/getsentry/sentry-javascript) | `8.41.0` | `8.47.0` |
| [caniuse-lite](https://github.com/browserslist/caniuse-lite) | `1.0.30001684` | `1.0.30001690` |
| [sass](https://github.com/sass/dart-sass) | `1.81.0` | `1.83.0` |
| [sass-loader](https://github.com/webpack-contrib/sass-loader) | `16.0.3` | `16.0.4` |
| [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) | `5.3.10` | `5.3.11` |
| [webpack](https://github.com/webpack/webpack) | `5.96.1` | `5.97.1` |


Updates `@sentry/browser` from 8.41.0 to 8.47.0
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/8.47.0/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/8.41.0...8.47.0)

Updates `caniuse-lite` from 1.0.30001684 to 1.0.30001690
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001684...1.0.30001690)

Updates `sass` from 1.81.0 to 1.83.0
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.81.0...1.83.0)

Updates `sass-loader` from 16.0.3 to 16.0.4
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v16.0.3...v16.0.4)

Updates `terser-webpack-plugin` from 5.3.10 to 5.3.11
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.3.10...v5.3.11)

Updates `webpack` from 5.96.1 to 5.97.1
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.96.1...v5.97.1)

---
updated-dependencies:
- dependency-name: "@sentry/browser"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: frontend
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend
- dependency-name: sass-loader
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: frontend
- dependency-name: terser-webpack-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: frontend
- dependency-name: webpack
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-06 09:49:23 +00:00
dependabot[bot] 94f250938f Bump the playwright group in /tests/playwright with 2 updates
Bumps the playwright group in /tests/playwright with 2 updates: [@playwright/test](https://github.com/microsoft/playwright) and [dotenv](https://github.com/motdotla/dotenv).


Updates `@playwright/test` from 1.49.0 to 1.49.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.49.0...v1.49.1)

Updates `dotenv` from 16.4.5 to 16.4.7
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](https://github.com/motdotla/dotenv/compare/v16.4.5...v16.4.7)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: playwright
- dependency-name: dotenv
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: playwright
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-06 09:44:26 +00:00
Rob Hudson 4283006c47 Disable `upgrade-insecure-requests` for local dev 2024-12-24 12:28:34 -08:00
Craig Cook 2c1388bb67
Copy updates for WNP134 [#15750] (#15785)
Also some minor code fixes I missed in review.
2024-12-20 14:08:48 -04:00
Alex Gibson 2deb68bd70
Add WNP 134 (fixes #15750) (#15779) 2024-12-20 09:41:05 -08:00
Rob Hudson 692d76ab29 Promote CSP `frame-ancestors` directive 2024-12-19 14:55:39 -08:00
Rob Hudson 041814fa12 Update CSP to move `upgrade-insecure-requests` to enforced policy 2024-12-19 12:43:43 -08:00
Stephanie Hobson 12806d5b25
Remove obsolete l10n strings (Fix #15496) (#15770)
* Remove obsolete l10n strings (Fix #15496)

* Hard code CTD page title translations
2024-12-19 11:11:29 -08:00