Skip to content

Commit

Permalink
Hide hidden comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Sep 25, 2023
1 parent eb50ff6 commit f2c0825
Showing 1 changed file with 28 additions and 21 deletions.
49 changes: 28 additions & 21 deletions app/views/_tailwind/comments/_comment.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,35 @@
<article class="flex gap-6">
<div class="text-navy text-7xl"></div>
<div>
<div class="prose prose-2xl">
<%= comment_as_html(comment.text) %>
</div>
<% if comment.visible? %>
<div class="prose prose-2xl">
<%= comment_as_html(comment.text) %>
</div>

<%# TODO: Smaller line height? %>
<div class="mt-2 text-xl font-bold text-navy">
<%= comment.name %>
</div>
<div class="text-xl text-navy">
<%= time_tag comment.confirmed_at do %>
<%= time_ago_in_words(comment.confirmed_at).capitalize %> ago
<% end %>
</div>
<%# TODO: Add disclosure icon %>
<%# TODO: Make it work %>
<%# TODO: Progressive enhancement? %>
<%# TODO: Make this show the correct thing %>
<div class="text-xl font-bold text-fuchsia">Delivered to the planning authority</div>
<div>
<%# TODO: Link to correct place %>
<%= link_to "Report this comment", "#", class: "text-fuchsia text-xl underline" %>
</div>
<%# TODO: Smaller line height? %>
<div class="mt-2 text-xl font-bold text-navy">
<%= comment.name %>
</div>
<div class="text-xl text-navy">
<%= time_tag comment.confirmed_at do %>
<%= time_ago_in_words(comment.confirmed_at).capitalize %> ago
<% end %>
</div>
<%# TODO: Add disclosure icon %>
<%# TODO: Make it work %>
<%# TODO: Progressive enhancement? %>
<%# TODO: Make this show the correct thing %>
<div class="text-xl font-bold text-fuchsia">Delivered to the planning authority</div>
<div>
<%# TODO: Link to correct place %>
<%= link_to "Report this comment", "#", class: "text-fuchsia text-xl underline" %>
</div>
<% else %>
<%# TODO: Show hidden comment in a way that matches design %>
<div class="prose prose-2xl">
<em>Hidden by site administrators</em>
</div>
<% end %>
</div>
</article>

Expand Down

0 comments on commit f2c0825

Please sign in to comment.