<p dir="auto">This PR implements a basic filtering functionality for the notes displayed on a user's profile page, addressing part of the long-standing request from issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="48080268" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/832" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/832/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/832">#832</a>.</p>
<h4 dir="auto">Key Changes:</h4>
<ul dir="auto">
<li>Introduced tabs for filtering notes by status (Open/Closed) on the user profile page.</li>
<li>When no status is specified in the URL, the <strong>Open Notes</strong> tab is selected and displayed by default.</li>
<li>The URL is updated with a <code class="notranslate">status</code> parameter to reflect the current filter state, ensuring clarity for users and enabling easy sharing/bookmarking of filtered views.</li>
<li>Maintains existing pagination and ordering logic, ensuring consistency with the current note display behavior.</li>
</ul>
<h4 dir="auto">Future Steps:</h4>
<p dir="auto">This is the first step toward more comprehensive sorting and filtering functionalities, such as sorting by creation date, solved date, and more, as requested in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="48080268" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/832" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/832/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/832">#832</a>. By implementing this, we improve the visibility of open (unresolved) notes while preserving the ability to view both open and closed notes for users accustomed to that behavior.</p>
<h4 dir="auto">Screenshots:</h4>
<a href="https://github.com/user-attachments/assets/a78a2f03-4da3-4da6-80f0-91a836943dba">Screenshot.2024-09-26.at.04.46.21.png (view on web)</a>
<a href="https://github.com/user-attachments/assets/3bf6680b-48ca-44ef-8dbc-5e7a51c66c14">Screenshot.2024-09-26.at.04.46.39.png (view on web)</a>
<a href="https://github.com/user-attachments/assets/119d950a-332b-4ab8-9be4-ad59c10464db">Screenshot.2024-09-26.at.04.46.55.png (view on web)</a>

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

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5239/commits/ef9ad5484e917681c7bf36b9ef8084ca312c0975" class="commit-link">ef9ad54</a>  Add filtering for notes by status on user profile</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5239/files">4 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5239/files#diff-c254740097a8c0601832077488db77e572b2c2b926f77508fadc6081b0052804">app/controllers/notes_controller.rb</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5239/files#diff-4fe647349351c7492508c788230b91b7f4445d4b821f6781ac7fcfad5e879f21">app/views/notes/index.html.erb</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5239/files#diff-44438ce218f5287c58d0017f965d888715635d94280669896f75841fbd7b4cd7">config/locales/en.yml</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5239/files#diff-1dd5a8f580b9615769ddc19a64a98f455d9d20eb149c443f41d9d3c797d39b12">db/structure.sql</a>
    (7)
  </li>
</ul>

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