Diagram service refactorings
What does this MR do and why?
Extracted a few refactors from Add diagram proxy to route Kroki/PlantUML reque... (!223314 - merged) to bring the size of that down:
- Just move an unrelated application setting out from between two diagram-related ones.
- Factor out
ImageLazyLoadFilter's work into a class method, since we repeat it manually a few times. - Factor out
Banzai::Filter::Concerns::DiagramService. - Factor out
srcconstruction forKrokiFilterandPlantumlFilter— we need that in Add diagram proxy to route Kroki/PlantUML reque... (!223314 - merged). - Fix
KrokiFilterusingdiagram_selectors.include?when that was a bit of a category error.
References
- Add diagram proxy to route Kroki/PlantUML reque... (!223314 - merged) (what this is setting the stage for)
How to set up and validate locally
No behaviour change; specs should be enough, but for optimal results, make some Kroki and PlantUML diagrams and check they render OK. !223314 (merged) has details and examples for that, though the checks specified there don't make sense here (since this is refactor-only).
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Asherah Connor