<p dir="auto">Refs <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="23830914" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/631" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/631/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/631">#631</a> (site-wide consistency) and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1959849322" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/4313" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/4313/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/4313">#4313</a> (use of <code class="notranslate">time</code> element instead of <code class="notranslate">abbr</code> or <code class="notranslate">span</code>).</p>
<p dir="auto">This PR refactors our friendly date displays to be consistent throughout the site. I've standardised on using the <code class="notranslate">time</code> element (with the machine-readable datetime attribute, for anything that might need it), and removed all the (mis-)use of <code class="notranslate">abbr</code> elements. The highlighting of time periods which have titles (using dotted underlines), previously a side effect of <code class="notranslate">abbr</code>, is reimplemented in CSS.</p>
<p dir="auto">I've kept the changesets_helper#changeset_details as the only place that doesn't use the friendly_date helpers, since it does some funky stuff with the titles. But I would consider refactoring that in future too, since I'm not convinced those titles are a good idea.</p>

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

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/commits/24a562f8856a80b0ea42e98c9d18ec6a11585c09" class="commit-link">24a562f</a>  Use html 'time' element for friendly date helpers</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/commits/0d3382015025b1a930a4667bde03f4b26003904b" class="commit-link">0d33820</a>  Add missing tests for friendly_date_ago helper</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/commits/d739943b36901ed30d8a715e113fb0a34b14d2e4" class="commit-link">d739943</a>  Avoid wrapping time tags in abbr for note_helper</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/commits/d8400320a78632f8ece9b5a27d6e0811e7bab8e1" class="commit-link">d840032</a>  Use time instead of abbr element for changesets_helper</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/commits/026fce06f412dec949d6faceb35b784c7b93a83e" class="commit-link">026fce0</a>  Use the friendly_data_ago helper for contacts on the dashboard</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/commits/100a7f8979023a2265c9fa58e6bed317b5937670" class="commit-link">100a7f8</a>  Use friendly_date for note disappear description</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/commits/bc9c492c48cca7dc44a2906e9d63ab1a7ed6a42c" class="commit-link">bc9c492</a>  Use friendly_date helpers for revoking user blocks</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/commits/0058765a4eef19bf0c7b773ff454abecc05dcf5c" class="commit-link">0058765</a>  Avoid wrapping friendly_date with abbr tags</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/commits/0195dd60a4172f4d972e51322867e7ae707afad0" class="commit-link">0195dd6</a>  Simplify date display by using friendly_date helpers</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/commits/dbe84a97bf48789e0f32a185f701840fc68063bd" class="commit-link">dbe84a9</a>  Underline time elements that have a title</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files">17 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-e86a39e6d0b163f152db8843fc7d647a3f5d648de4a74f1732bef4474b6e5bc8">app/assets/stylesheets/common.scss</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-5f3fc5e3977d242572aa1d08551f5eb557de0ccaff30370838ee9df5386ea0da">app/helpers/application_helper.rb</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-bc4d52553ca058396b0e614d583f5a157ea848b90d792eb1c872f4233b0fe5db">app/helpers/changesets_helper.rb</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-74d80704129ce910bd38a56b250122e716028ac0085b3627ea8875b9216b65ce">app/helpers/note_helper.rb</a>
    (11)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-9dea4ffe487a631e3df942ebeec041974e762348f767704f27c52bc97e89052f">app/views/browse/_common_details.html.erb</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-fba7159a4abd78f8b24f765a0c58ebe47a24be99e185c373175f20f612a5d781">app/views/browse/changeset.html.erb</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-a893bdff25132b2a60513f4fb74deb7507b568af429e60d05a48c63b7dd95230">app/views/dashboards/_contact.html.erb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-fb860a130fe8ce948cdb98e2ba4b0c9d947f351dc9a55a12fff9d02ca61b0568">app/views/diary_entries/comments.html.erb</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-ed96df420873aaa1d006204ba97c74a9ffcbe5c21c25de224b6b4c95edb8cd7a">app/views/issues/index.html.erb</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-84d04c9c37a8be927ab1870e6b3c1940f670585b77b8e88c32d6ded35cf87dc7">app/views/notes/show.html.erb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-f698347c73e920a2c1e10d03873cedbde14208bd883574b5567748dfd3037594">app/views/traces/_trace.html.erb</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-21483aff8c8e9342f056457705f81d9d821f4bc1d1d33c402487ff905f769f52">app/views/user_blocks/revoke.html.erb</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-44438ce218f5287c58d0017f965d888715635d94280669896f75841fbd7b4cd7">config/locales/en.yml</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-59e3c27d200847ec53b2bbfa85d7d93e45d2f4b0d40237eaf81a84085e29989c">test/helpers/application_helper_test.rb</a>
    (27)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-7e264c813f970de382cf9794190fe845a032231954a5cf6f42d55ac2e82c474b">test/helpers/changesets_helper_test.rb</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-77adf9b5a9670ed38070915c07a4ff7bfde667deaee2327f0055194e5fd71b74">test/helpers/note_helper_test.rb</a>
    (13)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4349/files#diff-7b1664ebd556062821a678e3622cf5c89c4ba8c7f83253627ad267ac30b121c4">test/helpers/user_blocks_helper_test.rb</a>
    (4)
  </li>
</ul>

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