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

672 Коммитов

Автор SHA1 Сообщение Дата
Rob Hudson b40aab065f Add docs on waffle switch migrations 2024-10-31 13:52:19 -07:00
Stephanie Hobson 087e994da5
Add data-cta-name to documentation (#15392) 2024-10-30 09:24:24 +00:00
Steve Jalim d0bf7e75d9
Update install.rst regarding pre-commit setup 2024-10-17 17:58:20 +04:00
Steve Jalim f005e72808
Update installation/setup docs to be clearer about some steps (#15322) 2024-10-17 14:05:38 +04:00
Alex Gibson c298f95084
Remove VPN + Relay bundle code (Fixes #15288) (#15290) 2024-10-15 11:39:04 +11:00
Rob Hudson eac0cbf9fd Fix #14596: Remove pocket-mode 2024-10-11 11:45:33 -07:00
Stephanie Hobson 5b3079fdc3
Update docs and code to remove GA3 references and match GA4 reality (#14910)
* Update analytics documentation, and reflect docs in code

Update analytics documentation to remove UA and edit the code to make it match the GA4 docs.

-    Re-write analytics documentation intro
-    Remove: UA documentation
-    Remove: UA dataLayer pushes
-    Remove: data-link-group (migrate into data-link-position where appropriate)
-    Remove: data-cta-type="button"
-    Remove: data-cta-type="link"
-    data-cta and data-link should not be used on the same attribute

* review fixes
2024-10-08 14:53:08 +11:00
Alex Gibson 2a7caf9f4e
Fix app store url examples in the docs (#15244) 2024-10-07 11:26:55 +11:00
Rob Hudson 9ba4d37cf5 Add note about switch in request/response cycle 2024-10-02 17:10:45 -07:00
Rob Hudson ab16fd3c0a Run docs through `blacken-docs` 2024-10-02 17:10:45 -07:00
Rob Hudson 7f3dda0613 Update waffle switch docs 2024-10-02 17:10:45 -07:00
Rob Hudson e3c41e75bd Import config waffles to django waffles 🧇 2024-10-02 15:25:44 -07:00
Steve Jalim 977dbf65b1
Fix the example of the rendition spec in the CMS docs (#15213)
1024x isn't one of the pregenerated/allowed widths
2024-09-24 18:20:37 +04:00
Rob Hudson c3d5e200d0 Update to Python 3.12.x 2024-09-20 11:46:52 -07:00
Alex Gibson 434bb4a29f Remove Pocket mode functional tests 2024-09-19 13:53:58 +01:00
Steve Jalim 84357af614
Allow the url() helper to get a path for a page that will only exist in the CMS (#15180)
* Support using the url() helper in a non-CMS page to get a path for a page that will only exist in the CMS

Depends on the CMS page being on a planned/known path in the tree. See the updates to cms.rst for more

* Fix italics in documentation
2024-09-19 13:15:27 +04:00
Steve Jalim a1a0ba7bc4
Developer experience improvements around DB downloads and getting CMS images (#15079)
* Update "make preflight" command to allow a -- --retain-db flag

This will help people avoid blatting their local DB and losing WIP CMS pages

* Improve formatting (line breaks) for the boostrap_local_admin management command

* Add tool to download images to match a fresh DB download

* Expand set to default rendition sizes exported, so that downloaded images all have appropriate sizes made

The 165x165 is what the Image Library in Wagtail needs, so we must ensure a local download of images regenerates that immediately

* Add docs for the image-download tool

* Exclude image renditions from the DB export

These are not needed, and indeed block the [re]generation of renditions after download. If a DB row exists for a rendition, even though the image does not, Wagtail won't regenerate an image rendition to replace it because it thinks it already exists.

* Test fixups

* Add extra line to Makefile help explain how to use --retain-db flag via make

* Add docs explaining how to get CMS state down to local dev

* Minor fixups following code review
2024-09-11 12:19:42 +04:00
Steve Jalim 04cb7fb45f
Sqlite DB exporter bugfixes (#15086)
* Exclude WorkflowState from DB export to avoid integrity errors

WorkflowState references TaskState, which cannot be dumped because it may
contain sensitive info.

We could dump TaskState and redact TaskState.comment, but this approach
is simpler and exporting the state of a workflow to local developers is
not something we need to do

* Add the LeadershipPage model to the DB export - essential

Without this, the LeadershipPage only exists as the Page metadata,
with no content, and cannot be edited or deleted locally

* Update documentation to point out that new CMS pages need to be added to the export script, too
2024-09-06 18:15:34 +04:00
Alex Gibson 01269de235
Fix node warning calling rmdirSync() when running Playwright setup (Fixes #15058) (#15061)
* Fix node warning calling rmdirSync() when running Playwright setup (Fixes #15058)

* Add linnks to Axe rules in testing docs

* Add link to a11y test job and fix heading levels in docs
2024-09-06 15:58:23 +10:00
Steve Jalim b8f5e766a6
Add docs about not enabling page-tree syncing between locales (#15067) 2024-09-03 17:12:40 +04:00
Alex Gibson 443aaf73aa Bump glean.js to v5.0.3 and glean-parser to v14.5.0 2024-08-29 11:01:03 -07:00
Alex Gibson b572136cc0 Add accessibility test job running against key pages (#14773) 2024-08-22 14:24:08 -07:00
Steve Jalim 970e524098
Amend all usage of docker-compose to be docker compose (#14954)
* Amend all usage of docker-compose to be docker compose

This is because the ubuntu-latest GHA image no longer supports the V1 compose API, which was breaking our CI.

https://github.com/actions/runner-images/issues/9692

This is a wholesale change, to ensure consistent use of the v2 syntax

* Address subtle container-naming change brough in with docker compose v2

With v1 we had Selenium Grid name containers ..._selenium-hub_1, but with v2
that changed to ...-selenium-hub-1, causing the jq filter to miss when trying
to extract the IP we needed.

* Remove now-redundant docker-compose.yaml version key
2024-08-02 22:27:37 +04:00
Alex Gibson 47e9ca5a2c
Add Playwright testing docs (#14905) 2024-07-31 09:10:58 +01:00
Alex Gibson 1b079d1f7c Add URL query param to show consent banner in the EU (Fixes #14853) 2024-07-25 16:17:37 +01:00
Jan Brasna 23c6e080aa
Update pytest entrypoints (#14868)
* Update pytest entrypoints

* Update testing docs pytest examples
2024-07-24 14:17:17 +04:00
Steve Jalim e7a9b14a45
Add support for controlling which CMS Page types can be used in the site (#14846)
* Add support for controlling which CMS Page types can be used in the site

This means we can control when a page is available for use in the CMS, versus
simply being in the codebase. Also, note that removing a particular page class
from this allowlist will not break existing pages that are of that class, but
will stop anyone adding a _new_ one.

NB: EVERY TIME we add a new Wagtail Page subclass to the CMS, we must add
to the CMS_ALLOWED_PAGE_MODELS setting if we want it to be selectable as
a new child page in Production (or ticket up when we do want to add it to
the setting)

* Fix DEV mode allowance of all page types
2024-07-23 22:20:48 +01:00
Steve Jalim 1829904358
Add wagtail-localize-smartling to the project, for Smartling L10N support (#14794)
* Add wagtail-localize-smartling to the project, for Smartling L10N support

* Add docs for wagtail-localize-smartling

* Minor reformatting

* Fix duplicated env var reference 🤦

* Add a management command that wraps the sync_smartling command so we can monitor it with a DMS
2024-07-23 02:09:49 +04:00
Alex Gibson 5fd5d4f524
Add docs for creating new page models in Wagtail (Fixes #14797) (#14852) 2024-07-22 09:28:42 +01:00
Steve Jalim 0de8389ebc
Add prefer_cms decorator to help with migrating pages from hard-coded to CMS (#14842)
* Update minimal_site pytest fixture to ensure only one Site exists

Previously, it was adding an additional site beyond the default one bootstrapped by Wagtail migrations

* Add a new decorator to help us transition gracefully from a Django-based view to a CMS-based replacement

See docstring on the decorator for all the details

* Add documentation for the prefer_cms decorator
2024-07-17 14:05:05 +04:00
Steve Jalim c4581f46df Update CMS docs to mention a non-SSO route for local dev, too 2024-07-10 14:36:25 +01:00
Alex Gibson a354eead57 Remove UA client ID from stub attribution data (Fixes #14406) 2024-07-09 18:16:04 +01:00
Alex Gibson 6bb1d21e5a
Update Glean documentation (#14736) 2024-07-03 09:30:19 +01:00
Alex Gibson adefc46644
Add note to testing docs about Playwright (#14777) 2024-07-03 15:00:50 +10:00
Alex Gibson 37ce3a6392 Track product click events in glean.js 2024-06-14 09:29:15 +01:00
Steve Jalim ed764987ed
Add SSO auth to Wagtail and Django admins (#14649)
* Add mozilla-django-oidc to the project dependencies

* Add SSO support to Bedrock for accessing Wagtail and Django admins
* Plumbs in mozilla-django-oidc
* Add custom login pages for Wagtail and Django admins that show an SSO button instead of form fields
* Retain support for username + password login (for local development)
* Tests

* Add custom CSRF page to help explain SSO-related session loss, if it occurs

Because a renewed/cycled OIDC/SSO session can zap a CSRF token and block
a user from submitting a CMS edit, we need to provide a bit more information
about what's happened. This changeset adds that, via a new template and a tiny view
to serve it, plugged in as Django's default CSRF view

Logged out users (who are very unlikely to see this anyway) get a simple
version of the message, while logged in users get more detail/context.

* Bump SSO lease time to 18 hours - trying to balance awkward signouts with wanting re-checks

* Update test.env so that Wagtail and Django admins are available by default when urlconf is generated. Oddly the reload trick didn't work here

* Update bedrock/base/templates/403_csrf.html

Co-authored-by: Alex Gibson <alexgibson@users.noreply.github.com>

* Make translation tagging consistent on new login templates

* Move new CSRF view to use a CSS bundle, not inline CSS

* Remove old, redundant CSRF view

It looks like this was no longer in use. It wasn't specified as settings.CSRF_FAILURE_VIEW so wouldn't have been used/found by Django I believe

* Drop translation markup from login templates to simplify

* Don't count the test 404 and 500 views as nonlocaled, because we do localize them

* Update bedrock/admin/templates/wagtailadmin/login.html

* Tweak wording re SSO for login pages

---------

Co-authored-by: Alex Gibson <alexgibson@users.noreply.github.com>
2024-06-07 14:47:33 +04:00
Steve Jalim c5e2b3b67f
Add background task queue support and use it for CMS image generation (#14617)
* Add django-rq to the project, with initial configuration for two redis-backed queues if redis is available

* Add Django-rq to project, including link from (now necessary) Django admin's userlinks

* Update Docker support to run a local worker node for RQ

* Add Sentry integration for Redis and for RQ

* Add a make command to run the worker queue

Temporarily loads env vars from .env, looking for REDIS_URL

* Make a new setting that makes it unambiguous whether a task queue is available

* Add helper that will enqueue a task or immediately execute it, depending on whether the task queue is available

Note that if it finds a queue is available it will put a job in there, regardless of whether the queue is being processed by a worker

* Switch image-rendition pre-generation to use the task queue, if available

* Add initial, basic, docs about the task queue

* Improve logging around task queue usage

* Fix formatting of Makefile

Thanks @janbrasna!

* Typo fixes in documentation

Thanks @janbrasna!
2024-06-04 14:27:34 +04:00
Alex Gibson 5507bb2a2f
Data consent updates and privacy improvements (Fixes #14213) (#14559) 2024-06-03 09:44:43 +01:00
Steve Jalim 14b5274425
Add in skeleton documentation for Wagtail integration (#14616) 2024-05-31 13:32:27 +01:00
Stephanie Hobson 7030e7219f
Add some docs for the privacy notice templates #14233 (#14562)
Co-authored-by: Jan Brasna <1784648+janbrasna@users.noreply.github.com>
2024-05-21 11:01:33 -07:00
Alex Gibson 95696a9bba
Update install docs with note to uncheck Rosetta emulation on macOS using Docker (Fixes #14588) (#14589) 2024-05-20 19:47:27 +04:00
Alex Gibson 75cab111a3 Omit non-essential fields from RTAMO flow (Fixes #14482) 2024-05-01 09:40:06 +01:00
Alex Gibson 04ff39607e Remove mozillaonline integrations 2024-04-30 10:09:56 +01:00
Alex Gibson 8fa3b01f64
Bump Traffic Cop to v3.0.0 (Fixes #14086) (#14087) 2024-04-29 14:50:53 -07:00
Jan Brasna b8ee8811be
Update l10n obsolete removal wording (#14474) 2024-04-17 10:36:28 +01:00
Steve Jalim 218bb2feea
Add a positive consequence to the Wagtail ADR (#14473) 2024-04-17 09:28:42 +01:00
Steve Jalim 21b0918434
Formatting tweaks to ADR0012, mainly to test RTD build (#14470) 2024-04-16 22:48:01 +01:00
Steve Jalim 69baed8399
Update docs and Makefile help to reference custom git hooks (#14450) 2024-04-15 17:26:32 +01:00
Alex Gibson a367117580 Move app store redirector docs to attribution docs 2024-04-15 16:54:31 +01:00
Steve Jalim aff470700f
Remove contentful_migrations from Bedrock; update ADRs to reflect new plans (#14449) 2024-04-15 13:27:29 +01:00