<p></p>
<p><b>@gravitystorm</b> requested changes on this pull request.</p>

<p dir="auto">We discussed this in person at the Karlsruhe Hack Weekend, so this is only a summary of that review. Namely:</p>
<ul dir="auto">
<li>We can rework the default handling in opengraph_tags to use a more conventional ruby approach of using <code class="notranslate">tags = {}</code> in the method signature, and <code class="notranslate">tags.reverse_merge(defaults)</code></li>
<li>However, we need to rethink how the function handles the title. It's a specific parameter at the moment, but it makes sense to combine that with other overrides somehow</li>
<li>You're going to add the user profile image too, which is important because that uses a view helper, and those aren't normally available in controllers. Although we can bodge that in (by using <code class="notranslate">helpers</code> in the controller) it's an indication that we're mixing up the separation of concerns between controllers and views</li>
<li>For the body, we need to check whether implementations handle "og:description" as html, or whether we need to pass only textual content to that</li>
<li>entry.body will return raw markup, whether html or markdown, and we probably don't want that in the description</li>
<li>We need some tests for the three different diary entry body types</li>
<li>We need some rational for why 100 characters, and not e.g. 200</li>
<li>Is there a better way to truncate the text, rather than just characters. I couldn't find an example in the codebase but perhaps there is either a rails helper or something similar to intelligently truncate.</li>
<li>We need some other tests just to make sure that the type, title etc is what we expect so that it survives future refactoring.</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/3942#pullrequestreview-1314533824">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJPP24LW5DJIYA37GDWZIQI5ANCNFSM6AAAAAAVH4K7HM">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLXZAFAM42VIGSONXDWZIQI5A5CNFSM6AAAAAAVH4K7HOWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTSOLIY4A.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/3942/review/1314533824</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/3942#pullrequestreview-1314533824",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3942#pullrequestreview-1314533824",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>