[openstreetmap/openstreetmap-website] Can we avoid inlining svgs into erb templates? (Issue #5880)

Marwin Hochfelsner notifications at github.com
Thu Apr 17 18:29:57 UTC 2025


hlfan left a comment (openstreetmap/openstreetmap-website#5880)

**@‌AntonKhorev** seems to have quite a preference for mixing multiple languages and concerns within a single file. Take a look at this [comment](https://github.com/openstreetmap/openstreetmap-website/pull/5352#issuecomment-2495930790) from @tomhughes on another PR of his:
> ... a massive multi-line block of Ruby embedded in a JS file is definitely not the answer to my mind at least.

Swap out the languages, and we land at this issue here:
> ... a massive multi-line block of SVG embedded in an ERB file is definitely not the answer ...

The real problem both times is the lack of _separation of concerns_, which is crucial for maintaining a codebase at scale.
We shouldn’t have to "solve" this by copy-pasting between multiple files or editors, the concerns should be separated from the start, just as they were with the sprites.
This shouldn't be a point of contention.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5880#issuecomment-2813734246
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/5880/2813734246 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250417/2a014f88/attachment.htm>


More information about the rails-dev mailing list