I have used an alternative approach to use the default image formatter and modify the result for svg images. This ensures that modifications in the default image formatter don't have to be re-implemented in this module.
- Status changed to RTBC
over 1 year ago 5:44am 6 June 2023 - 🇨🇭Switzerland znerol
Approach in #8 is much more future proof than the status quo. The improvement is most apparent when the patch is viewed in full context.
Similar implementation is done in https://www.drupal.org/project/svg_image/issues/3257729 📌 Formatters shouldn't repeat core code Needs review
- Status changed to Needs work
about 1 year ago 12:31pm 6 November 2023 - Status changed to Needs review
about 1 year ago 4:14pm 6 November 2023 - 🇨🇭Switzerland znerol
Relevant issues are:
- 🐛 SvgImageUrlFormatter parent construct wrong order Needs review Modified the way the plugin is instantiated. Additionally contains code style changes (underscore to camel case variable names).
- 📌 Schema inconsistent: width/height empty string vs null vs integer Fixed Changed the default values for @height@ and @width@ to @NULL@ instead of empty string. That one shouldn't actually have any impact. Unfortunately @3275057-12.patch@ contains a hunk with code style only changes in @SvgResponsiveImageFormatter::defaultSettings(). Reverted that one.
- Status changed to RTBC
about 1 year ago 7:46am 7 November 2023 - 🇩🇪Germany Grevil
Could the latest patch be provided as an MR and rebased on latest dev? Thanks!
- Status changed to Needs work
about 2 months ago 3:36pm 30 September 2024 - @ckng opened merge request.
- 🇫🇷France mably
Looks like this MR include code from this issue : https://www.drupal.org/project/svg_image/issues/3257729 📌 Formatters shouldn't repeat core code Needs review
I think we should keep them separate.
And I'm not fond of calling
getEntitiesToView(...)
twice, in parent class and in our SVG formatters. - 🇫🇷France GaëlG Lille, France
Actually, the current MR from 📌 Formatters shouldn't repeat core code Needs review is enough to fix this problem. Should we mark this a duplicate?
- 🇳🇱Netherlands Martijn de Wit 🇳🇱 The Netherlands
This could be closed now #3257729 is in.
Feel free to re-open if it doesn't fix this problem.