Closed (fixed)
Project:
Svg Image
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2024 at 12:57 UTC
Updated:
4 Dec 2024 at 21:51 UTC
Jump to comment: Most recent
Reduce code duplication between SvgImageFormatter and SvgResponsiveImageFormatter.
Use a trait to share common code between those 2 formatters.
Publish, review and validate MR.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mably commentedComment #5
mrshowermanI was able to further reduce duplicate code by moving some parts of the
viewElements()method into new trait methods. The slight differences between SvgImageFormatter and SvgResponsiveImageFormatter we noticed in #3257729: Formatters shouldn't repeat core code today were respected, especially the cache tags handling 😉Comment #6
mably commentedDefinitely a nice additional code factorization, thanks @mrshowerman!
Comment #7
mably commentedMade a few tests, everything seems to work fine.
@grevil do you want to have a look at the MR before I merge it?
Comment #8
grevil commented@mably go for it!
Comment #10
mably commentedMerged!
Comment #12
mably commented