<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/assets/4158490/2f8b1a53-4001-4bc6-9892-b86ada177eb1">image.png (view on web)</a><br>
<a href="https://github.com/openstreetmap/openstreetmap-website/assets/4158490/91f1f73f-77d5-4761-87ad-ed2006ba2cdb">image.png (view on web)</a></p>
<p dir="auto">There's a potential problem though. Checks if a user has created any blocks are going to be made more often with this navigation, but there's no <code class="notranslate">creator_id</code> index on the blocks table. The options are:</p>
<ul dir="auto">
<li>Do nothing because blocks pages are not the most visited and the blocks table is not the most populated.</li>
<li>Remove <code class="notranslate">.blocks_created.exists?</code> checks. That would show more unnecessary and unexpected tabs: blocks by regular users but they can't make any blocks.</li>
<li>Check if a user can create blocks instead of checking if they have created any. That would remove tabs for blocks by former moderators.</li>
<li>Add a <code class="notranslate">creator_id</code> index on the blocks table.</li>
<li>Add a <code class="notranslate">(creator_id, id)</code> index on the blocks table that will also help with sorting.</li>
</ul>

<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/4644'>https://github.com/openstreetmap/openstreetmap-website/pull/4644</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/commits/a57472d28203459b0765e08a4bd004050b97e0ed" class="commit-link">a57472d</a>  Add "All Blocks" nav tab to block list/show pages</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/commits/288b8e110418a334296275a3edf0a50969d68c75" class="commit-link">288b8e1</a>  Add "Blocks on Me" nav tab to block list/show pages</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/commits/1861bcf640c70def4563c500ae9f6f814ac729c6" class="commit-link">1861bcf</a>  Add "Blocks by Me" nav tab to block list/show pages</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/commits/031dc0fe1b638a45849c8fa36e51f077fe2cf9c1" class="commit-link">031dc0f</a>  Add "Blocks on user" nav tab to block list/show pages</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/commits/5273b4357888a931ac9cd0513770d4350eb27723" class="commit-link">5273b43</a>  Add "Blocks by user" nav tab to block list/show pages</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/files">6 files</a>)</p>
<ul>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/files#diff-a163659130e0085f20069ddf952e8ffc25fb3385d916f4198633eca42fa3714f">app/views/user_blocks/_navigation.html.erb</a>
    (37)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/files#diff-1107691d0b63c55e92cd949957d8ba27b57994e979eb318d9d2fc277545bfe93">app/views/user_blocks/blocks_by.html.erb</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/files#diff-2cefecb192a711c5a811694054c55b293e8bdb59d2df8ac2a2e4132c9340d076">app/views/user_blocks/blocks_on.html.erb</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/files#diff-15fb4559bf730e9f5227b5c3f9451d86deab0ca1df4a7590f24d2bc4e86b6860">app/views/user_blocks/index.html.erb</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/files#diff-d669c04f0a7e45151d990c7457c79db874d8d6c47e41ee6817048eeb600cc9a1">app/views/user_blocks/show.html.erb</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4644/files#diff-44438ce218f5287c58d0017f965d888715635d94280669896f75841fbd7b4cd7">config/locales/en.yml</a>
    (7)
  </li>
</ul>

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