[openstreetmap/openstreetmap-website] Reuse mirrored turn icons (PR #5828)
Anton Khorev
notifications at github.com
Thu Mar 20 16:33:05 UTC 2025
There's a pull request #5776 that claims to *reuse mirrored turn icons*, however most of the changes there are not related to mirroring.
This pull request keeps only the mirroring changes from #5776.
You can see all of the directions icons by adding the following test to `test/system/directions_test.rb` and running it:
```ruby
test "show all routing icons" do
visit directions_path
extra_steps = %w[
straight
slight-right right sharp-right u-turn-right
slight-left left sharp-left u-turn-left
roundabout
fork-right fork-left
merge-left merge-right
end-of-road-right end-of-road-left
exit-right exit-left
ferry
].map { |name| "[points[1], '#{name}', '#{name}', 0, [points[1]]]" }.join(",")
stub_routing <<~CALLBACK
const distance = points[0].distanceTo(points[1]);
const time = distance * 30;
return Promise.resolve({
line: points,
steps: [
[points[0], "start", "start", distance, points],
[points[1], "destination", "destination", 0, [points[1]]],
#{extra_steps}
],
distance,
time
});
CALLBACK
fill_in "route_from", :with => "60 30"
fill_in "route_to", :with => "61 31"
click_on "Go"
sleep 1000
end
```

You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5828
-- Commit Summary --
* Reuse mirrored turn icons
-- File Changes --
M app/views/directions/search.html.erb (36)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5828.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5828.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5828
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5828 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250320/dafd3dc1/attachment.htm>
More information about the rails-dev
mailing list