]> git.openstreetmap.org Git - rails.git/commitdiff
Remove the contact-activity class
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 3 Nov 2021 17:33:01 +0000 (17:33 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 3 Nov 2021 18:35:42 +0000 (18:35 +0000)
The margin-top is better replaced with a bottom margin on the
preceding element, and the width is unnecessary in the grid layout.

app/assets/stylesheets/common.scss
app/views/dashboards/_contact.html.erb
app/views/dashboards/show.html.erb
test/controllers/dashboards_controller_test.rb

index fdff4ebfc4c2ea7e5df2bbc246d580026f73bb77..ac55dc82131d8348d78ae485abf81417d87347be 100644 (file)
@@ -1092,13 +1092,6 @@ tr.turn:hover {
   }
 }
 
-/* Rules for the user profile page */
-
-.contact-activity {
-  margin-top: $lineheight;
-  width: 100%;
-}
-
 /* Rules for the user map */
 
 .content_map .leaflet-popup-content {
index 7614c0c4d5c66ed41079422b3281d524dd1fd231..cf1866cc9ca9e5619fd367f4c7abce27282202ff 100644 (file)
@@ -4,7 +4,7 @@
      :icon => image_path(type == "friend" ? "marker-blue.png" : "marker-green.png"),
      :description => render(:partial => "popup", :object => contact, :locals => { :type => type })
    } %>
-<%= tag.div :class => "contact-activity clearfix row", :data => { :user => user_data } do %>
+<%= tag.div :class => "clearfix row", :data => { :user => user_data } do %>
   <div class="col-auto">
     <%= user_thumbnail contact, :class => "user_thumbnail_no_margins" %>
   </div>
index 9aa4abed4606566547dd8ca6f3d5f564389f4fb0..0f04dafb912b9143ac9fdef4560ca0b08b6b1756 100644 (file)
@@ -32,7 +32,7 @@
       <% if friends.empty? %>
         <%= t ".no friends" %>
       <% else %>
-        <nav class='secondary-actions'>
+        <nav class='secondary-actions mb-3'>
           <ul class='clearfix'>
             <li><%= link_to t(".friends_changesets"), friend_changesets_path %></li>
             <li><%= link_to t(".friends_diaries"), friends_diary_entries_path %></li>
@@ -50,7 +50,7 @@
       <% if nearby.empty? %>
         <%= t ".no nearby users" %>
       <% else %>
-        <nav class='secondary-actions'>
+        <nav class='secondary-actions mb-3'>
           <ul class='clearfix'>
             <li><%= link_to t(".nearby_changesets"), nearby_changesets_path %></li>
             <li><%= link_to t(".nearby_diaries"), nearby_diary_entries_path %></li>
index 5073df8cc1ab8d6b1d32b1a447da3bbc1ee4d287..84f9610e5f3ac7a583a3ee6a513f3f3304585cb9 100644 (file)
@@ -28,7 +28,9 @@ class DashboardsControllerTest < ActionDispatch::IntegrationTest
 
     # Friends should be visible as we're now logged in
     assert_select "div#friends-container" do
-      assert_select "div.contact-activity", :count => 1
+      assert_select "div" do
+        assert_select "a[href='/user/#{ERB::Util.u(friend_user.display_name)}']", :count => 1
+      end
     end
   end
 end