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

Marwin Hochfelsner notifications at github.com
Thu Feb 20 08:05:04 UTC 2025


@hlfan 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>`);
+    }

Disabling the buttons and the selects options seems better, disabling all in the template and enabling each in js when supported.

However, I don't want to move too much to be hardcoded like it was already criticized in https://github.com/openstreetmap/openstreetmap-website/pull/3400#issuecomment-1057225749

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

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


More information about the rails-dev mailing list