[openstreetmap/openstreetmap-website] Split directions engine select into modes and providers (PR #5652)

Anton Khorev notifications at github.com
Thu Feb 20 05:05:15 UTC 2025


@AntonKhorev commented on this pull request.



> +    modeGroup.html("");
+    for (const mode of new Set(modes)) {
+      modeGroup.append(`<input type="radio" class="btn-check" name="modes" id="${mode}" autocomplete="off">`);
+      modeGroup.append(`<label class="btn btn-outline-secondary px-2" for="${mode}" title="${
+        I18n.t("javascripts.directions.modes." + mode)
+      }"><svg class="d-block" width="16" height="16" fill="currentColor"><path d="${modeIconPaths[mode]}"></path></svg></label>`);
+    }

Are you sure you want to redraw the buttons instead of adding them once in the html template? Even if you plan for routing engines that don't support every mode, would you remove the mode button rather than disable it?

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

Message ID: <openstreetmap/openstreetmap-website/pull/5652/review/2628719625 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250219/96570fd5/attachment.htm>


More information about the rails-dev mailing list