[openstreetmap/openstreetmap-website] Replace custom role icon helpers with inline_svg_tag (PR #6215)

Anton Khorev notifications at github.com
Mon Jul 21 10:06:05 UTC 2025


I'm doing this also to check where it's best to store color definitions, see https://github.com/openstreetmap/openstreetmap-website/pull/5854#discussion_r2216313135. `parameters.scss` seems like a possible place because we already have some colors in it.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Replace role_icons helper with erb template
  * Replaces role_icons helper with template code
  * Move role colors to css
  * Replace role_icon_svg_tag helper with inline_svg_tag
  * Gather together i18n strings of role icons

-- File Changes --

    A app/assets/images/icons/role-star-fill.svg (3)
    A app/assets/images/icons/role-star.svg (3)
    M app/assets/stylesheets/parameters.scss (10)
    M app/assets/stylesheets/print.scss (2)
    M app/helpers/authorization_helper.rb (3)
    D app/helpers/user_roles_helper.rb (42)
    A app/views/users/_role_icons.html.erb (20)
    M app/views/users/show.html.erb (5)
    M config/locales/en.yml (31)
    D test/helpers/user_roles_helper_test.rb (172)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list