<p dir="auto">When you use <em>Query features</em> map tool, a sidebar shows with this message "Click on the map to find nearby features." The message had a <code class="notranslate">query-intro</code> css class added in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/openstreetmap/openstreetmap-website/commit/078059b76b/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/commit/078059b76b"><tt>078059b76b</tt></a>. Then the class was removed in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/openstreetmap/openstreetmap-website/commit/c8f0a81eb7043c297e050c1f3ff8a8cf7ff613bc/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/commit/c8f0a81eb7043c297e050c1f3ff8a8cf7ff613bc"><tt>c8f0a81</tt></a>. However there's still the js code that tries to hide this message based on its class. This happens as soon as the query runs.</p>
<p dir="auto">But the query runs as soon as the sidebar is shown. If hiding is restored, the user won't have time to read the message, and then there's no point in writing it. On the other hand, if the message is not hidden, it will tell the user to click the map even when clicking will have no effect.</p>
<p dir="auto">Here I'm showing/hiding the message depending on if it's possible to click the map and get a query to run.</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/3709'>https://github.com/openstreetmap/openstreetmap-website/pull/3709</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3709/commits/57c92f20c6a7b7125d3911d1bf56cfeec535c2a1" class="commit-link">57c92f2</a>  Show/hide query intro text depending on query mode</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3709/commits/9dd0ae2118706ca355840ade761625eaf0e6ddd6" class="commit-link">9dd0ae2</a>  Take into account query button disabled state when showing/hiding query intro text</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3709/files">2 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3709/files#diff-8275a6df0995b2af17f0b52a0dfe5a00f8b09d9d51b89516e2612a3faa9d8c0f">app/assets/javascripts/index/query.js</a>
    (40)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3709/files#diff-544760767b64a6fa8650df71571dbe396837e04ab8126e7504300796ab5d936a">app/views/browse/query.html.erb</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3709.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/3709.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3709.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/3709.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/3709">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMOYAFU3GFTHMV3RS3V7QUODANCNFSM6AAAAAAQS4CTK4">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLN24ZMI2UKVRW4Q5BLV7QUODA5CNFSM6AAAAAAQS4CTK6WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFEYR77E.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/3709</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/3709",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3709",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>