<p dir="auto">Map XML download currently has a few issues, such as a button staying in disabled state after a download, or error messages that are shown on a blank page.</p>
<p dir="auto">Applying the same concepts as in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3226744730" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/6192" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/6192/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/6192">#6192</a>, this PR aims at making the download a bit more robust and user friendly.</p>
<p dir="auto">We have a bit of code duplication here, and it would probably make sense to move downloadBlob, handleExportError and turbo:submit-end handler to a common file. Any ideas?</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/6255'>https://github.com/openstreetmap/openstreetmap-website/pull/6255</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/6255/commits/8f3092140de05c80b9ccb5415d87844dc682f5a1" class="commit-link">8f30921</a> Fix map xml download</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6255/files">3 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6255/files#diff-32bd60500bca8422d3edba93ac86b6d6a12190fdee53ce75372dc501efcba010">app/assets/javascripts/index/export.js</a>
(50)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6255/files#diff-db1600b3df800c073c8d2ff04b1f5042902abcb20b0a55729ddeca8d23012ea5">app/views/site/export.html.erb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6255/files#diff-44438ce218f5287c58d0017f965d888715635d94280669896f75841fbd7b4cd7">config/locales/en.yml</a>
(1)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/6255.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/6255.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/6255.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/6255.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6255">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLP3PDRQLELH3LG6JAT3KNSKDAVCNFSM6AAAAACCNPOCDKVHI2DSMVQWIX3LMV43ASLTON2WKOZTGI3DKNBXGMZTGNQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPEPSOK6KC2OTE3TO33KNSKDA5CNFSM6AAAAACCNPOCDKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHMFIZLHA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/6255</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/6255",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6255",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>