From 827123a8f681a04d8660619e035aef1cd1b2ee23 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 8 Jan 2020 16:04:37 +0100 Subject: [PATCH] Rework changeset descriptions to use h6 tags, and refactor changeset lists to use list-group-flush The descriptions are probably best not as a header, but still needs to be something more prominent than surrounding text. --- app/assets/stylesheets/common.scss | 9 --------- app/views/browse/changeset.html.erb | 2 +- app/views/changesets/_changeset.html.erb | 8 ++++---- app/views/changesets/index.html.erb | 2 +- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 3ec988420..73f235b85 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1108,21 +1108,12 @@ tr.turn:hover { #sidebar .changesets { li { - padding: 15px 20px; - border-bottom: 1px solid $grey; cursor: pointer; &.selected { background: $list-highlight; } /* color is derived from changeset bbox fillColor in history.js */ } - h4 { - margin: 0; - a { - color: #000; - } - } - .comments { float: right; color: $darkgrey; diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index 9ad35b2a7..148cb5a88 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -6,7 +6,7 @@
-

<%= linkify(h(@changeset.tags["comment"].to_s.presence || t("browse.no_comment"))) %>

+
<%= linkify(h(@changeset.tags["comment"].to_s.presence || t("browse.no_comment"))) %>
<%= changeset_details(@changeset) %>
<%= render :partial => "tag_details", :object => @changeset.tags.except("comment") %> diff --git a/app/views/changesets/_changeset.html.erb b/app/views/changesets/_changeset.html.erb index 56726e2d9..f1173671e 100644 --- a/app/views/changesets/_changeset.html.erb +++ b/app/views/changesets/_changeset.html.erb @@ -10,12 +10,12 @@ } end %> -<%= content_tag "li", :id => "changeset_#{changeset.id}", :data => { :changeset => changeset_data } do %> -

- +<%= content_tag "li", :id => "changeset_#{changeset.id}", :data => { :changeset => changeset_data }, :class => "list-group-item" do %> +
+ <%= changeset.tags["comment"].to_s.presence || t("browse.no_comment") %> -
+

<%= changeset.comments.length %> diff --git a/app/views/changesets/index.html.erb b/app/views/changesets/index.html.erb index 1e3daa081..527a0a232 100644 --- a/app/views/changesets/index.html.erb +++ b/app/views/changesets/index.html.erb @@ -1,5 +1,5 @@ <% if @changesets.present? %> -
    +
      <%= render @changesets %>
    <% if @changesets.size == 20 -%> -- 2.39.5