Skip to content

Releases: torchbox/wagtail-grapple

v0.26 - nullable core chooser blocks

26 Jun 10:38
07edf85
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.25.1...v0.26.0

v0.25.1 - Clean up

22 Apr 08:27
b2c6a5a
Compare
Choose a tag to compare

Removes pre-Wagtail 5.2 conditional code.

Improves the logic for fetching renditions for SVGs when none of the passed filters are valid: now we return the original SVG, rather than throw an error

v0.25 - Wagtail 5.2+, Django 4.2+

12 Apr 11:58
460060e
Compare
Choose a tag to compare

This is mostly a tidy up release - adds Wagtail 6 and Django 5.0 support, and drops support for Wagtail < 5.2, Django < 4.2

What's Changed

Full Changelog: v0.24.0...v0.25.0

v0.24 - better redirects for multi-site setups

05 Jan 17:10
Compare
Choose a tag to compare

This release makes working with redirects in multi-site setups easier by adding more details. It:

  • Exposes the site field.
  • Supports redirects without a new_url or page thus making HTTP 410 handling possible.
  • Returns one result per associated site.

Warning

This is a breaking change release.

  • The new_url in results now takes into account the Redirect site. Previously, this would always use BASE_URL (from the settings file)
  • Redirects that apply to all sites (i.e. not associated with a specific site) now appear multiple times when querying - one for each Site created in Wagtail.

Upgrade considerations

In a multi-site setup, you should add the site field to any redirect queries to help disambiguate between redirects that apply to all sites.

For example, given we have two Sites created in Wagtail:

  1. https://www.example.com
  2. https://www.another-example.com

and a single Redirect from old-path to new-path that is not associated with any specific site (and thus applies to all sites).

Previously, querying for a redirect:

{
  redirects {
    newUrl
    oldUrl
    oldPath
    page {
      id
    }
    isPermanent
  }
}

would produce:

{
  "data": {
    "redirects": [
      {
        "isPermanent": true,
        "newUrl": "http://www.example.com/new-path",
        "oldPath": "/old-path",
        "oldUrl": "http://www.example.com/old-path",
        "page": null
      }
    ]
  }
}

which excludes the redirect that applies to https://www.another-example.com.

As of this release, the same query would produce:

{
  "data": {
    "redirects": [
      {
        "isPermanent": true,
        "newUrl": "http://www.example.com/new-path",
        "oldPath": "/old-path",
        "oldUrl": "http://www.example.com/old-path",
        "page": null,
      },
      {
        "isPermanent": true,
        "newUrl": "http://www.another-example.com/new-path",
        "oldPath": "/old-path",
        "oldUrl": "http://www.another-example.com/old-path",
        "page": null,
      }
    ]
  }
}

To disambiguate the results, you should add site to your query, for example:

{
  redirects {
    newUrl
    oldUrl
    oldPath
    page {
      id
    }
    isPermanent
    site {
      hostname
    }
  }
}

which would return:

{
  "data": {
    "redirects": [
      {
        "isPermanent": true,
        "newUrl": "http://www.example.com/new-path",
        "oldPath": "/old-path",
        "oldUrl": "http://www.example.com/old-path",
        "page": null,
        "site": {
          "hostname": "www.example.com"
        }
      },
      {
        "isPermanent": true,
        "newUrl": "http://www.another-example.com/new-path",
        "oldPath": "/old-path",
        "oldUrl": "http://www.another-example.com/old-path",
        "page": null,
        "site": {
          "hostname": "www.another-example.com"
        }
      }
    ]
  }
}

What's Changed

New Contributors

Full Changelog: v0.23.0...v0.24.0

v0.23 - preserveSvg everywhere, by default

29 Sep 10:52
5818f7b
Compare
Choose a tag to compare

This releases ensures srcSet supports the preserveSvg flag, and that the flag is True by default

What's Changed

Full Changelog: v0.22.0...v0.23.0

v0.22 - All about Interfaces

18 Sep 15:04
bc3493b
Compare
Choose a tag to compare

This release adds the ability to swap the default PageInterface as well as the ability to define additional interfaces for your model types

What's Changed

New Contributors

  • @mgax made their first contribution in #365

Full Changelog: v0.21.0...v0.22.0

v0.21.0 - a pinch of SVGs in a sea of consistency

04 Sep 16:21
c5913c9
Compare
Choose a tag to compare

This release adds better handling of SVG images.

It also introduced a couple of potentially breaking changes: passes the GraphQLResolveInfo object to StreamField callables, and uses consistent ID type for page queries. See below

What's Changed

  • Uniform ID Type for pages and page Queries by @estyxx in #350

    [!WARNING]
    if your query looked like

    query($id: Int) { 
        page(id: $id) { ... }
    }

    it need to change to

    query($id: ID) { 
        page(id: $id) { ... } 
    }
  • Pass the GraphQLResolveInfo object to the StreamField callables by @zerolab in #356

    [!WARNING]
    This is a breaking change and requires existing resolver signatures to be updated.

    # before
    def get_field(self, value=None):
       ...
    #  - or - 
    def get_field(self, *, value=None):
       ...
    
    # after
    def get_field(self, info, value=None):
       ...
    
    # - or -
    def get_field(self, *, info, value=None):
       ...
    
    # or, type-hinted
    from graphql import GraphQLResolveInfo
    
    
    def get_field(self, info: GraphQLResolveInfo, value: dict[str, Any] | None):
        ...
  • Switch to using tox by @zerolab in #360
    We now test with a wider combination of Django + Wagtail

  • Add coverage report by @zerolab in #362

  • Add SVG support by @zerolab in #359
    You can differentiate images using the isSVG property. The image rendition field accepts a preserveSvg argument which will help prevent raster image operations (e.g. format-webp, bgcolor, etc.) being applied to SVGs. Reference

    [!NOTE]
    The image rendition query will now surface any errors when:

    • using filters not present in the ALLOWED_IMAGE_FILTERS Grapple setting,
    • there are no filters to apply (for example you are requesting an SVG rendition but supply raster image operations)
    • the source image is not present

    Previously we would silently absorb them, returning null/None for the rendition.

New Contributors

Full Changelog: v0.20.0...v0.21.0

v0.20 - a fistful of changes

10 Jul 13:52
bf5cd10
Compare
Choose a tag to compare

⚠️ This release drops support for Wagtail < 4.1, and channels. It also removes the upper bound for the Wagtail dependency

What's Changed

  • Drop support for Wagtail < 4.1 by @zerolab in #314
  • Drop tests against Wagtail main by @zerolab in #316
  • chore: test with postgres by @dopry in #301
  • feat: add searchScore field to pages by @dopry in #320
  • Use all middleware defined in decorator by @seb-b in #281
  • Pass arguments to callables for resolving StreamField block values by @bbliem in #322
  • chore: re-organize test app by @dopry in #324
  • Fix: test embed raw value by @dopry in #328
  • Switch to using Ruff by @zerolab in #334
  • Use flit for packaging by @zerolab in #335
  • Drop channels support by @zerolab in #336
  • Consolidate handling when resolving Sites and avoid making assumptions about what data to return when it's ambiguous by @kbayliss in #342
  • Fix rendition definition by @zerolab in #337
  • Support graphene type arguments by @Morsey187 in #333
  • Switch to PyPI trusted publishing, and tidy up docs and pre commit by @zerolab in #344

New Contributors

Full Changelog: v0.19.2...v0.20.0

v0.19.2 - searching for order and relevance

17 Jan 22:46
2e7cb3e
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.19.1...v0.19.2

v0.19.1 - draft previews and deprecated settings

13 Jan 17:48
bd867d1
Compare
Choose a tag to compare

What's Changed

  • Fix DEPRECATED_SETTINGS breaks apps by @zerolab in #298
  • fix: previews for unpublished pages by @dopry in #277

Full Changelog: v0.19.0...v0.19.1