[openstreetmap/openstreetmap-website] Use SVGs instead of PNGs for interface icons where possible (PR #4775)
Hidde Wieringa
notifications at github.com
Thu May 9 09:29:49 UTC 2024
Part of https://github.com/openstreetmap/openstreetmap-website/issues/850
This pull request replaces PNG icons with their minimized SVG variants, to ensure screens with high pixel densities can display the OpenStreetMap website with beautiful graphics.
Currently includes:
- Terms illustration (http://127.0.0.1:3000/user/terms)
- Sign up illustrations (http://127.0.0.1:3000/user/new)
- Welcome sprites (http://127.0.0.1:3000/welcome)
- Menu "hamburger" icon
- CC BY SA copyright logo
- Avatar default icons
- OpenID connect icon (127.0.0.1:3000/login)
- Routing sprites (http://127.0.0.1:3000/directions?engine=fossgis_osrm_car&route=52.0991%2C4.2970%3B51.9244%2C4.4778)
- OSM icon (http://127.0.0.1:3000)
For each of the icons, I replaced the PNG with the corresponding SVG. The PNG variant has been removed. Also, I simplified and minimized the SVGs for improved compression and less data transfer.
In all cases, I can create separate pull requests if that makes the review process easier.
Let me know if I can add more changes to this pull requests for the remaining images, or if I should create separate pull requests.
### Browser support
I could not find documentation about which browsers are supposed to be supported by the OpenStreetMap website.
Internet Explorer 11 is the only browser that might have problems displaying SVG graphics related to scaling. This browser is no longer supported.
See https://caniuse.com/svg
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/4775
-- Commit Summary --
* Terms illustration
* sign up illustration
* sign up illustration + arm
* welcome sprites
* minimize
* Menu icons
* CC BY SA icon
* Avatar default SVG
* OpenID Connect icons
* Routing sprites
* OSM logo
-- File Changes --
D app/assets/images/avatar_large.png (0)
D app/assets/images/avatar_small.png (0)
A app/assets/images/cc-by-sa.svg (1)
D app/assets/images/cc_button.png (0)
D app/assets/images/menu-icon.png (0)
A app/assets/images/menu-icon.svg (1)
D app/assets/images/openid.png (0)
A app/assets/images/openid.svg (1)
D app/assets/images/openid_input.png (0)
D app/assets/images/openid_small.png (0)
D app/assets/images/osm_logo.png (0)
M app/assets/images/osm_logo.svg (3337)
D app/assets/images/osm_logo_256.png (0)
D app/assets/images/osm_logo_30.png (0)
D app/assets/images/osm_logo_512.png (0)
D app/assets/images/routing-sprite.png (0)
M app/assets/images/routing-sprite.svg (574)
D app/assets/images/sign-up-illustration-arm.png (0)
A app/assets/images/sign-up-illustration-arm.svg (1)
D app/assets/images/sign-up-illustration.png (0)
M app/assets/images/sign-up-illustration.svg (1360)
D app/assets/images/terms-illustration.png (0)
M app/assets/images/terms-illustration.svg (1621)
D app/assets/images/welcome-sprite.png (0)
M app/assets/images/welcome-sprite.svg (289)
M app/assets/stylesheets/common.scss (18)
M app/helpers/open_graph_helper.rb (4)
M app/helpers/user_helper.rb (4)
M app/mailers/user_mailer.rb (6)
M app/views/changesets/index.atom.builder (2)
M app/views/layouts/_header.html.erb (2)
M app/views/layouts/error.html.erb (2)
M app/views/sessions/new.html.erb (2)
M app/views/site/_any_questions.html.erb (2)
M app/views/site/welcome.html.erb (26)
M test/helpers/user_helper_test.rb (2)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/4775.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4775.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4775
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4775 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240509/1ee07442/attachment-0001.htm>
More information about the rails-dev
mailing list