<p></p>
<p><b>@gravitystorm</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5521#discussion_r1957120981">app/assets/javascripts/leaflet.map.js</a>:</p>
<pre style='color:#555'>> @@ -347,15 +347,22 @@ L.OSM.Map = L.Map.extend({
},
setSidebarOverlaid: function (overlaid) {
- var sidebarWidth = 350;
+ var mobileDeviceWidth = window.getComputedStyle(document.documentElement).getPropertyValue("--bs-breakpoint-md");
+ var isMobileDevice = window.matchMedia(`(max-width: ${mobileDeviceWidth})`).matches;
</pre>
<blockquote>
<p dir="auto">Maybe <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gravitystorm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gravitystorm">@gravitystorm</a> has a thought?</p>
</blockquote>
<p dir="auto">In general we must avoid referring to narrow screens as "mobile devices" - that causes endless confusion among our developers. Mobile devices can have large screen widths, desktop windows can become narrow, etc.</p>
<p dir="auto">With bootstrap the <code class="notranslate">md</code> means "medium" not "mobile device" - perhaps this is the source of the confusion here?</p>
<p dir="auto"><a href="https://getbootstrap.com/docs/5.3/layout/breakpoints/#available-breakpoints" rel="nofollow">https://getbootstrap.com/docs/5.3/layout/breakpoints/#available-breakpoints</a></p>
<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/5521#discussion_r1957120981">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJAPEEZLJRY66TUPS32P5AP5AVCNFSM6AAAAABVOTVL2CVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMJZGQYTGMZWGA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPINNTFVF63WVYTZET2P5AP7A5CNFSM6AAAAABVOTVL2CWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTU4EEJXA.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/5521/review/2619413360</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/5521#discussion_r1957120981",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5521#discussion_r1957120981",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>