[openstreetmap/openstreetmap-website] Confirmation popup for Overpass API export (PR #6411)
Pablo Brasero
notifications at github.com
Fri Sep 26 09:19:42 UTC 2025
@pablobm commented on this pull request.
> @@ -2623,6 +2620,11 @@ en:
description: "Additional sources listed on the OpenStreetMap Wiki"
export_button: "Export"
export_download: "Downloading..."
+ confirmation:
+ header: Download XML Data
+ body: Do you want to download map data for this area in XML format? Note that large areas may take some time to download.
+ cancel: Cancel
+ ok: Download
Should the key also be `download`, to better reflect the intent? And also the id, variable, function, etc. Nitpicky, but I think it's worth having the code describe the action, adding clarity.
> @@ -37,6 +37,28 @@ OSM.Export = function (map) {
validateControls();
}
+ async function showConfirmationModal() {
+ const $modal = $("#export_confirmation");
+ const $okButton = $("#ok_button");
I'm thinking that this is a bit generic to get an id on its own. A different modal could be added in the future that also has `id="ok_button"` (or whatever name it receives, as per my other comment). Perhaps this should be handled with a class? Like this:
```suggestion
const $okButton = $modal.find(".ok_button");
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6411#pullrequestreview-3270948026
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6411/review/3270948026 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250926/ae20a6a5/attachment.htm>
More information about the rails-dev
mailing list