Add a config action to remove effects from image styles

Created on 23 July 2024, about 2 months ago
Updated 5 September 2024, 8 days ago

Problem/Motivation

Create a config action to remove effects from image styles

Steps to reproduce

Proposed resolution

Create a config action that accepts the uuid of an effect and removes it from the image style using Drupal\image\ImageStyleInterface::deleteImageEffect

Remaining tasks

  • Review the approach
  • Finalize the config action name
  • Create tests
  • Commit

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

โœจ Feature request
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Image systemย  โ†’

Last updated about 20 hours ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @phenaproxima
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone New Zealand
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Akhil Babu Chengannur

    akhil babu โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Canceled
    8 days ago
    #274308
  • Pipeline finished with Failed
    8 days ago
    Total: 126s
    #274310
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Akhil Babu Chengannur

    Image effects have only uuids. So to remove an effect, we should pass it's uuid to the config action.
    I created a config action 'deleteImageEffect' which accepts the uuid of the effect to be removed, as a starting point. Moving this to 'needs review' for feedback. Haven't added any tests for now.

    config:
      actions:
        image.style.large:
          deleteImageEffect: 62f7b707-a0cc-459b-a8ee-1dd3eeb9b445
    
  • Status changed to Needs review 8 days ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Akhil Babu Chengannur
  • Pipeline finished with Failed
    8 days ago
    #274323
  • Status changed to Needs work 8 days ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Seems like a feature that needs test coverage

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    I'd advise holding off on this issue. I haven't even yet been able to convince @alexpott that it's a good idea, which makes sense -- recipes have an intentionally extremely limited ability to undo or remove things, so if we're going to do this for image styles, we'll want to think through the use cases for it.

    Personally I think it's justified, but without @alexpott's buy-in I'm not sure we'll get very far.

Production build 0.71.5 2024