[openstreetmap/openstreetmap-website] Preview colour tag value using svg (PR #4479)

Anton Khorev notifications at github.com
Sun Jan 14 16:10:42 UTC 2024


These previews originally accepted colors as inline styles https://github.com/openstreetmap/openstreetmap-website/pull/1779#issuecomment-374135049. That was later changed to data attributes + javascript https://github.com/openstreetmap/openstreetmap-website/pull/1779#issuecomment-374449624. We can avoid javascript by using inline svgs. We already do this in the map key.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/4479

-- Commit Summary --

  * Preview colour tag value using svg

-- File Changes --

    M app/assets/javascripts/index.js (4)
    M app/assets/stylesheets/common.scss (6)
    M app/helpers/browse_tags_helper.rb (6)
    M test/helpers/browse_tags_helper_test.rb (4)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/4479.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4479.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4479
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4479 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240114/7092a312/attachment.htm>


More information about the rails-dev mailing list