<p></p>
<p dir="auto">Hey <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> 👋🏽</p>
<p dir="auto">this is my take on implementing the <code class="notranslate">UserMute</code>-Feature. There are still things I currently consider to be missing and some things I would like to put up for discussion.</p>
<p dir="auto">Before going into these I wanted to ask you to have a peek at the current shape of the code and let me know if you notice some issues with the fundamental structures though before I'd like into the details.</p>
<hr>
<p dir="auto">What I think is missing or I want to look more closely at:</p>
<ul dir="auto">
<li>I am not super happy with the <code class="notranslate">before_save</code>-Callback in <code class="notranslate">Message</code> which calls out to <code class="notranslate">UserMute.active_for?</code> but haven't taken the time yet to think about a solid alternative that I'd prefer here.</li>
<li>Add tests for new/changed controllers</li>
<li>There are some system and integration tests. I might add an integration test since no JS is involved and the integration test would imo be appropriate here.</li>
</ul>
<hr>
<p dir="auto">Open questions from the top of my head:</p>
<ul dir="auto">
<li>
<p dir="auto">I think the most natural place where users would expect the "UserMute"-action would be the <code class="notranslate">Messages#show</code>-screen, but I could not come up with a fitting UI-solution. Currently the "UserMute"-action lives just on the <code class="notranslate">Users#show</code>-screen. If it would live in <code class="notranslate">Messages#show</code>:</p>
<ul dir="auto">
<li>Where should this thing be placed? I'd expect it to be close to the Displayname/User image, not underneath the image, but I don't it to be rendered more prominent than necessary</li>
<li>Should it be a link "Mute this user" or a button?</li>
</ul>
</li>
<li>
<p dir="auto">Users can move muted Messages from their <code class="notranslate">Muted messages</code>-Tab on <code class="notranslate">/messages/muted</code> back into the regular <code class="notranslate">My Inbox</code>-Tab. Should they be also able – at this point – to move Messages from the <code class="notranslate">My Inbox</code>-Tab to the <code class="notranslate">Muted messages</code>-Tag?</p>
</li>
<li>
<p dir="auto">Do we want to encourage users who have muted other users to remove the <code class="notranslate">UserMute</code>-again to prevent an accumulation of these mutes or should we wait how this feature plays out – and if it is even used? I am a fan of the latter.</p>
</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/4284#issuecomment-1757145051">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPXVRNFLHGMGJCDZUTX6ZLJXANCNFSM6AAAAAA53SDORY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPGJYH32LWMI7UJGODX6ZLJXA5CNFSM6AAAAAA53SDOR2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTIXPT5W.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/4284/c1757145051</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/4284#issuecomment-1757145051",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4284#issuecomment-1757145051",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>