From: Tom Hughes Date: Wed, 15 Jul 2020 20:31:18 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/2711' X-Git-Tag: live~3052 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/8a013c0a9647e7deed7dfbccf9a679d008f8d252?hp=89a57f33ef5dc585842d516ee79620f4c843c1b9 Merge remote-tracking branch 'upstream/pull/2711' --- diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index e455f297b..36b560fde 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -81,11 +81,11 @@ $(document).ready(function () { var windowWidth = $(window).width(); if (windowWidth < compactWidth) { - $("body").removeClass("compact").addClass("small"); + $("body").removeClass("compact-nav").addClass("small-nav"); } else if (windowWidth < headerWidth) { - $("body").addClass("compact").removeClass("small"); + $("body").addClass("compact-nav").removeClass("small-nav"); } else { - $("body").removeClass("compact").removeClass("small"); + $("body").removeClass("compact-nav").removeClass("small-nav"); } } @@ -100,13 +100,13 @@ $(document).ready(function () { headerWidth = headerWidth + $(e).outerWidth(); }); - $("body").addClass("compact"); + $("body").addClass("compact-nav"); $("header").children(":visible").each(function (i, e) { compactWidth = compactWidth + $(e).outerWidth(); }); - $("body").removeClass("compact"); + $("body").removeClass("compact-nav"); updateHeader(); diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 0890481da..50bcf9be7 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -35,10 +35,6 @@ small, aside { margin-right: $lineheight/4; } -.red { color: $red; } - -.piwik { border: 0; } - [dir=rtl] { /* no-r2 */ text-align: right; } [dir=ltr] { /* no-r2 */ text-align: left; } @@ -80,7 +76,6 @@ small, aside { a { color: #24d; text-decoration: none; - -webkit-appearance: none; outline: 0; &:hover { text-decoration: underline; @@ -271,7 +266,7 @@ nav.primary, nav.secondary { display: none; } -body.compact { +body.compact-nav { #compact-secondary-nav { display: inline-block; } @@ -1502,13 +1497,6 @@ tr.turn:hover { /* Rules for the account settings page */ -#accountForm .user_map { - position: relative; - width: 500px; - height: 400px; - border: 1px solid $grey; -} - #accountForm .user_image { margin-bottom: 0; } @@ -2209,12 +2197,18 @@ input.richtext_title[type="text"] { display: block; color: white; font-weight: 300; - font-size: 34px; + font-size: 28px; span { color: $vibrant-green; } } + @include media-breakpoint-up(sm) { + h1 { + font-size: 34px; + } + } + .user-image { position: absolute; top: 0px; @@ -2290,8 +2284,3 @@ input.richtext_title[type="text"] { display: none; } } - -.read-reports { - background: $lightgrey; - opacity: 0.7; -} diff --git a/app/assets/stylesheets/small.scss b/app/assets/stylesheets/small.scss index 701d10465..808b8caa6 100644 --- a/app/assets/stylesheets/small.scss +++ b/app/assets/stylesheets/small.scss @@ -2,13 +2,7 @@ /* Styles specific to a small screen, such as iPhone, Android, etc... */ -body.small { - - input[type="submit"], - input[type="text"] { - -webkit-appearance: none; - } - +body.small-nav { #menu-icon { display: inline-block !important; } @@ -99,39 +93,6 @@ body.small { .leaflet-top.leaflet-right { top: 10px !important; } - - /* Rules for the login form */ - - #login_login input#user_email { - width: 100%; - max-width: 18em; - } - - #login_login input#user_password { - width: 100%; - max-width: 18em; - } - - #login_login input#openid_url { - width: 100%; - max-width: 18em; - } - - #login_openid_buttons td { - padding: 2px; - } - - /* Rules for the user view */ - - .user_map { - width: 100% !important; - height: 300px !important; - } - - &.site-about #content .attr h1 { - font-size: 28px; - } - } @media (max-width: 767.98px) { @@ -163,3 +124,26 @@ body.small { } } } + +@media (max-width: 575.98px) { + /* Rules for the login form */ + + #login_login input#user_email { + width: 100%; + max-width: 18em; + } + + #login_login input#user_password { + width: 100%; + max-width: 18em; + } + + #login_login input#openid_url { + width: 100%; + max-width: 18em; + } + + #login_openid_buttons td { + padding: 2px; + } +} diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 6472a4967..65bd9ced3 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -24,14 +24,14 @@

<%= t ".reports_of_this_issue" %>

<% if @read_reports.present? %> -
+

<%= t ".read_reports" %>

<%= render "reports", :reports => @read_reports %>
<% end %> <% if @unread_reports.any? %> -
+

<%= t ".new_reports" %>

<%= render "reports", :reports => @unread_reports %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 9142c2eda..30e8f6e98 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -394,7 +394,7 @@ en: diary_entry: posted_by_html: "Posted by %{link_user} on %{created} in %{language_link}" comment_link: Comment on this entry - reply_link: Reply to this entry + reply_link: Send a message to the author comment_count: zero: No comments one: "%{count} comment" @@ -1197,12 +1197,12 @@ en: subject: "[OpenStreetMap] %{user} commented on a diary entry" hi: "Hi %{to_user}," header: "%{from_user} has commented on the OpenStreetMap diary entry with the subject %{subject}:" - footer: "You can also read the comment at %{readurl} and you can comment at %{commenturl} or reply at %{replyurl}" + footer: "You can also read the comment at %{readurl} and you can comment at %{commenturl} or send a message to the author at %{replyurl}" message_notification: subject_header: "[OpenStreetMap] %{subject}" hi: "Hi %{to_user}," header: "%{from_user} has sent you a message through OpenStreetMap with the subject %{subject}:" - footer_html: "You can also read the message at %{readurl} and you can reply at %{replyurl}" + footer_html: "You can also read the message at %{readurl} and you can send a message to the author at %{replyurl}" friendship_notification: hi: "Hi %{to_user}," subject: "[OpenStreetMap] %{user} added you as a friend" diff --git a/test/system/diary_entry_test.rb b/test/system/diary_entry_test.rb index 38e2a1847..d60812e4c 100644 --- a/test/system/diary_entry_test.rb +++ b/test/system/diary_entry_test.rb @@ -10,7 +10,7 @@ class DiaryEntrySystemTest < ApplicationSystemTestCase sign_in_as(create(:user)) visit diary_entries_path - click_on "Reply to this entry" + click_on "Send a message to the author" assert page.has_content? "Send a new message" assert_equal "Re: #{@diary_entry.title}", page.find_field("Subject").value