Merge branch 'next-minor' into develop
This commit is contained in:
commit
2b2852267a
22 changed files with 121 additions and 28 deletions
|
|
@ -16,10 +16,15 @@
|
||||||
|
|
||||||
## Refactor
|
## Refactor
|
||||||
* Improve public stream performance and cleanup unused indexes [#7944](https://github.com/diaspora/diaspora/pull/7944)
|
* Improve public stream performance and cleanup unused indexes [#7944](https://github.com/diaspora/diaspora/pull/7944)
|
||||||
|
* Improve wording of "Toggle mobile" [#7926](https://github.com/diaspora/diaspora/pull/7926)
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
|
* Do not autofollow back a user you are ignoring [#7913](https://github.com/diaspora/diaspora/pull/7913)
|
||||||
|
* Fix photos gallery when too many thumbnails are shown [#7943](https://github.com/diaspora/diaspora/pull/7943)
|
||||||
|
* Fix extended profile visibility switch showing the wrong state [#7955](https://github.com/diaspora/diaspora/pull/7955)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
* Suppoert ignore users on mobile [#7884](https://github.com/diaspora/diaspora/pull/7884)
|
||||||
|
|
||||||
# 0.7.8.0
|
# 0.7.8.0
|
||||||
|
|
||||||
|
|
|
||||||
2
Gemfile
2
Gemfile
|
|
@ -58,7 +58,7 @@ gem "rack-cors", "1.0.2", require: "rack/cors"
|
||||||
|
|
||||||
gem "autoprefixer-rails", "8.6.5"
|
gem "autoprefixer-rails", "8.6.5"
|
||||||
gem "bootstrap-sass", "3.3.7"
|
gem "bootstrap-sass", "3.3.7"
|
||||||
gem "bootstrap-switch-rails", "3.3.4"
|
gem "bootstrap-switch-rails", "3.3.3" # 3.3.4 is broken, see https://github.com/Bttstrp/bootstrap-switch/issues/691
|
||||||
gem "compass-rails", "3.1.0"
|
gem "compass-rails", "3.1.0"
|
||||||
gem "sass-rails", "5.0.7"
|
gem "sass-rails", "5.0.7"
|
||||||
gem "sprockets-rails", "3.2.1"
|
gem "sprockets-rails", "3.2.1"
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ GEM
|
||||||
bootstrap-sass (3.3.7)
|
bootstrap-sass (3.3.7)
|
||||||
autoprefixer-rails (>= 5.2.1)
|
autoprefixer-rails (>= 5.2.1)
|
||||||
sass (>= 3.3.4)
|
sass (>= 3.3.4)
|
||||||
bootstrap-switch-rails (3.3.4)
|
bootstrap-switch-rails (3.3.3)
|
||||||
buftok (0.2.0)
|
buftok (0.2.0)
|
||||||
builder (3.2.3)
|
builder (3.2.3)
|
||||||
byebug (10.0.2)
|
byebug (10.0.2)
|
||||||
|
|
@ -783,7 +783,7 @@ DEPENDENCIES
|
||||||
asset_sync (= 2.5.0)
|
asset_sync (= 2.5.0)
|
||||||
autoprefixer-rails (= 8.6.5)
|
autoprefixer-rails (= 8.6.5)
|
||||||
bootstrap-sass (= 3.3.7)
|
bootstrap-sass (= 3.3.7)
|
||||||
bootstrap-switch-rails (= 3.3.4)
|
bootstrap-switch-rails (= 3.3.3)
|
||||||
capybara (= 3.11.1)
|
capybara (= 3.11.1)
|
||||||
carrierwave (= 1.2.3)
|
carrierwave (= 1.2.3)
|
||||||
compass-rails (= 3.1.0)
|
compass-rails (= 3.1.0)
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ app.views.Gallery = app.views.Base.extend({
|
||||||
if (image.naturalHeight > window.innerHeight && image.naturalHeight > image.naturalWidth * 2) {
|
if (image.naturalHeight > window.innerHeight && image.naturalHeight > image.naturalWidth * 2) {
|
||||||
image.classList.add("too-tall");
|
image.classList.add("too-tall");
|
||||||
} else {
|
} else {
|
||||||
var margins = 95; // Margins are 80px for thumbnails height and 15px for top image margin
|
var margins = 110; // Margins are 80px for thumbnails height and 15px for top image margin + scroll-x height
|
||||||
image.style = "max-height: " + (window.innerHeight - margins) + "px";
|
image.style = "max-height: " + (window.innerHeight - margins) + "px";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,15 +50,17 @@ $margin: 15px;
|
||||||
|
|
||||||
.indicator {
|
.indicator {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: $thumbnail-size / 2;
|
border-radius: $thumbnail-size / 2;
|
||||||
height: $thumbnail-size;
|
height: $thumbnail-size;
|
||||||
margin: 6px;
|
margin: $margin 6px;
|
||||||
margin-bottom: $margin;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: $thumbnail-size;
|
width: $thumbnail-size;
|
||||||
|
background-size: cover;
|
||||||
|
|
||||||
&.active,
|
&.active,
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
|
||||||
|
|
@ -350,6 +350,7 @@ footer {
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-bar {
|
.bottom-bar {
|
||||||
|
margin: 0;
|
||||||
position: static;
|
position: static;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -700,6 +701,21 @@ select#aspect_ids_ {
|
||||||
.entypo-camera { margin-right: 0; }
|
.entypo-camera { margin-right: 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mobile-icon-bar {
|
||||||
|
background: $framed-background;
|
||||||
|
border-top: 1px solid $border-grey;
|
||||||
|
display: block;
|
||||||
|
padding: 1px 6px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-icon-bar-button {
|
||||||
|
color: $text-grey;
|
||||||
|
float: right;
|
||||||
|
font-size: large;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
#publisher-textarea-wrapper {
|
#publisher-textarea-wrapper {
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
margin: 12px 0px;
|
margin: 12px 0px;
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@
|
||||||
<ul class="nav navbar-nav navbar-left visible-sm-block visible-xs-block">
|
<ul class="nav navbar-nav navbar-left visible-sm-block visible-xs-block">
|
||||||
<li class="visible-xs-block"><a href="/stream">{{t "my_stream"}}</a></li>
|
<li class="visible-xs-block"><a href="/stream">{{t "my_stream"}}</a></li>
|
||||||
<li class="visible-xs-block"><a href="/activity">{{t "my_activity"}}</a></li>
|
<li class="visible-xs-block"><a href="/activity">{{t "my_activity"}}</a></li>
|
||||||
<li><a href="/mobile/toggle">{{t "header.toggle_mobile"}}</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
|
|
@ -87,6 +86,7 @@
|
||||||
{{else if current_user.moderator}}
|
{{else if current_user.moderator}}
|
||||||
<li><a href="/report">{{t "header.moderator"}}</a></li>
|
<li><a href="/report">{{t "header.moderator"}}</a></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
<li><a class="visible-xs-block" href="/mobile/toggle">{{t "header.switch_to_touch_optimized_mode"}}</a></li>
|
||||||
<li><a href="/users/sign_out" data-method="delete">{{t "header.log_out"}}</a></li>
|
<li><a href="/users/sign_out" data-method="delete">{{t "header.log_out"}}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ class BlocksController < ApplicationController
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
|
format.any { redirect_back fallback_location: root_path }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ class User
|
||||||
# @param [Aspect] aspect The aspect to add them to.
|
# @param [Aspect] aspect The aspect to add them to.
|
||||||
# @return [Contact] The newly made contact for the passed in person.
|
# @return [Contact] The newly made contact for the passed in person.
|
||||||
def share_with(person, aspect)
|
def share_with(person, aspect)
|
||||||
|
return if blocks.where(person_id: person.id).exists?
|
||||||
|
|
||||||
contact = contacts.find_or_initialize_by(person_id: person.id)
|
contact = contacts.find_or_initialize_by(person_id: person.id)
|
||||||
return false unless contact.valid?
|
return false unless contact.valid?
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,4 @@
|
||||||
= render partial: "api/openid_connect/error/error"
|
= render partial: "api/openid_connect/error/error"
|
||||||
|
|
||||||
%footer
|
%footer
|
||||||
= link_to t("layouts.application.toggle"), toggle_mobile_path
|
= link_to t("layouts.application.switch_to_standard_mode"), toggle_mobile_path
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,4 @@
|
||||||
= f.submit t("devise.passwords.edit.change_password"), class: "btn btn-primary"
|
= f.submit t("devise.passwords.edit.change_password"), class: "btn btn-primary"
|
||||||
|
|
||||||
%footer
|
%footer
|
||||||
= link_to t("layouts.application.toggle"), toggle_mobile_path
|
= link_to t("layouts.application.switch_to_standard_mode"), toggle_mobile_path
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,4 @@
|
||||||
|
|
||||||
= link_to t('devise.sessions.new.sign_in'), new_user_session_path()
|
= link_to t('devise.sessions.new.sign_in'), new_user_session_path()
|
||||||
|
|
||||||
= link_to t('layouts.application.toggle'), toggle_mobile_path
|
= link_to t("layouts.application.switch_to_standard_mode"), toggle_mobile_path
|
||||||
|
|
|
||||||
|
|
@ -59,5 +59,5 @@
|
||||||
.pull-right.badge
|
.pull-right.badge
|
||||||
= unreviewed_reports_count
|
= unreviewed_reports_count
|
||||||
= t("admins.admin_bar.report")
|
= t("admins.admin_bar.report")
|
||||||
%li= link_to t("layouts.application.toggle"), toggle_mobile_path
|
%li= link_to t("layouts.application.switch_to_standard_mode"), toggle_mobile_path
|
||||||
%li= link_to t("layouts.header.logout"), destroy_user_session_path, method: :delete
|
%li= link_to t("layouts.header.logout"), destroy_user_session_path, method: :delete
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,23 @@
|
||||||
%span.description
|
%span.description
|
||||||
= @person.diaspora_handle
|
= @person.diaspora_handle
|
||||||
- if user_signed_in? && @person != current_user.person
|
- if user_signed_in? && @person != current_user.person
|
||||||
= render 'aspect_memberships/aspect_membership_dropdown'
|
- if @presenter.full_hash[:block]
|
||||||
|
.pull-right
|
||||||
|
= link_to t("users.privacy_settings.stop_ignoring"),
|
||||||
|
block_path(@presenter.full_hash[:block][:id]),
|
||||||
|
class: "btn btn-danger",
|
||||||
|
method: :delete
|
||||||
|
- else
|
||||||
|
= render "aspect_memberships/aspect_membership_dropdown"
|
||||||
|
.clear
|
||||||
|
- if user_signed_in? && @person != current_user.person && !@presenter.full_hash[:block]
|
||||||
|
.mobile-icon-bar
|
||||||
|
= link_to "",
|
||||||
|
blocks_path(block: {person_id: @person.id}),
|
||||||
|
data: {confirm: t("are_you_sure_ignore_user")},
|
||||||
|
method: :post,
|
||||||
|
confirm: true,
|
||||||
|
class: "btn entypo-block shield mobile-icon-bar-button"
|
||||||
.clear
|
.clear
|
||||||
.bottom-bar
|
.bottom-bar
|
||||||
- if !@person.tag_string.blank? && user_signed_in?
|
- if !@person.tag_string.blank? && user_signed_in?
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,4 @@
|
||||||
%footer.footer
|
%footer.footer
|
||||||
%ul
|
%ul
|
||||||
%li= link_to t("devise.shared.links.sign_in"), new_session_path(resource_name)
|
%li= link_to t("devise.shared.links.sign_in"), new_session_path(resource_name)
|
||||||
%li= link_to t("layouts.application.toggle"), toggle_mobile_path
|
%li= link_to t("layouts.application.switch_to_standard_mode"), toggle_mobile_path
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,4 @@
|
||||||
id: "forgot_password_link"
|
id: "forgot_password_link"
|
||||||
- if display_registration_link?
|
- if display_registration_link?
|
||||||
%li= link_to t("devise.shared.links.sign_up"), new_registration_path(resource_name)
|
%li= link_to t("devise.shared.links.sign_up"), new_registration_path(resource_name)
|
||||||
%li= link_to t("layouts.application.toggle"), toggle_mobile_path
|
%li= link_to t("layouts.application.switch_to_standard_mode"), toggle_mobile_path
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,6 @@
|
||||||
source_url.to_s,
|
source_url.to_s,
|
||||||
title: t("layouts.application.source_package")
|
title: t("layouts.application.source_package")
|
||||||
%li= link_to t("layouts.application.statistics_link"), statistics_path
|
%li= link_to t("layouts.application.statistics_link"), statistics_path
|
||||||
%li= link_to t("layouts.application.toggle"), toggle_mobile_path
|
%li= link_to t("layouts.application.switch_to_touch_optimized_mode"), toggle_mobile_path
|
||||||
- if AppConfig.settings.terms.enable?
|
- if AppConfig.settings.terms.enable?
|
||||||
%li= link_to t("_terms"), terms_path
|
%li= link_to t("_terms"), terms_path
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ en:
|
||||||
email: "Email"
|
email: "Email"
|
||||||
are_you_sure: "Are you sure?"
|
are_you_sure: "Are you sure?"
|
||||||
are_you_sure_delete_account: "Are you sure you want to close your account? This can’t be undone!"
|
are_you_sure_delete_account: "Are you sure you want to close your account? This can’t be undone!"
|
||||||
|
are_you_sure_ignore_user: "You are going to ignore that user. Are you sure?"
|
||||||
fill_me_out: "Fill me out"
|
fill_me_out: "Fill me out"
|
||||||
public: "Public"
|
public: "Public"
|
||||||
limited: "Limited"
|
limited: "Limited"
|
||||||
|
|
@ -615,7 +616,8 @@ en:
|
||||||
whats_new: "What’s new?"
|
whats_new: "What’s new?"
|
||||||
statistics_link: "Pod statistics"
|
statistics_link: "Pod statistics"
|
||||||
discourse: "Project discussions and support"
|
discourse: "Project discussions and support"
|
||||||
toggle: "Toggle mobile"
|
switch_to_touch_optimized_mode: "Switch to touch-optimized mode"
|
||||||
|
switch_to_standard_mode: "Switch to standard mode"
|
||||||
public_feed: "Public diaspora* feed for %{name}"
|
public_feed: "Public diaspora* feed for %{name}"
|
||||||
back_to_top: "Back to top"
|
back_to_top: "Back to top"
|
||||||
source_package: "Download the source code package"
|
source_package: "Download the source code package"
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ en:
|
||||||
moderator: "Moderator"
|
moderator: "Moderator"
|
||||||
log_out: "Log out"
|
log_out: "Log out"
|
||||||
toggle_navigation: "Toggle navigation"
|
toggle_navigation: "Toggle navigation"
|
||||||
toggle_mobile: "Toggle mobile"
|
switch_to_touch_optimized_mode: "Switch to touch-optimized mode"
|
||||||
|
|
||||||
notifications: "Notifications"
|
notifications: "Notifications"
|
||||||
conversations: "Conversations"
|
conversations: "Conversations"
|
||||||
|
|
|
||||||
36
features/desktop/auto_follow_back.feature
Normal file
36
features/desktop/auto_follow_back.feature
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
@javascript
|
||||||
|
Feature: auto follow back a user
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given following users exist:
|
||||||
|
| username | email |
|
||||||
|
| Bob Jones | bob@bob.bob |
|
||||||
|
| Alice Smith | alice@alice.alice |
|
||||||
|
And I sign in as "bob@bob.bob"
|
||||||
|
And I have an aspect called "My main aspect"
|
||||||
|
And I have an aspect called "Others" with auto follow back
|
||||||
|
And I sign out
|
||||||
|
|
||||||
|
Scenario: When a user with auto follow back enabled is shared with, he's sharing back
|
||||||
|
When I sign in as "alice@alice.alice"
|
||||||
|
And I am on "bob@bob.bob"'s page
|
||||||
|
And I add the person to my "Besties" aspect
|
||||||
|
And I sign out
|
||||||
|
And I sign in as "bob@bob.bob"
|
||||||
|
Then I should have 1 contact in "Others"
|
||||||
|
When I am on "alice@alice.alice"'s page
|
||||||
|
Then I should see "Others" within the contact aspect dropdown
|
||||||
|
|
||||||
|
Scenario: When a user with auto follow back enabled is shared with by a user he's ignoring, he's not sharing back
|
||||||
|
When I sign in as "bob@bob.bob"
|
||||||
|
And I am on "alice@alice.alice"'s page
|
||||||
|
And I click on the profile block button
|
||||||
|
And I sign out
|
||||||
|
When I sign in as "alice@alice.alice"
|
||||||
|
And I am on "bob@bob.bob"'s page
|
||||||
|
And I add the person to my "Besties" aspect
|
||||||
|
And I sign out
|
||||||
|
And I sign in as "bob@bob.bob"
|
||||||
|
Then I should have 0 contact in "Others"
|
||||||
|
When I am on "alice@alice.alice"'s page
|
||||||
|
Then I should see "Stop ignoring" within "#unblock_user_button"
|
||||||
|
|
@ -38,6 +38,26 @@ module AspectCukeHelpers
|
||||||
end
|
end
|
||||||
World(AspectCukeHelpers)
|
World(AspectCukeHelpers)
|
||||||
|
|
||||||
|
Given /^I have an aspect called "([^\"]*)"$/ do |aspect_name|
|
||||||
|
@me.aspects.create!(name: aspect_name)
|
||||||
|
@me.reload
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I have an aspect called "([^\"]*)" with auto follow back$/ do |aspect_name|
|
||||||
|
aspect = @me.aspects.create!(name: aspect_name)
|
||||||
|
@me.auto_follow_back = true
|
||||||
|
@me.auto_follow_back_aspect = aspect
|
||||||
|
@me.save
|
||||||
|
@me.reload
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I have following aspect[s]?:$/ do |fields|
|
||||||
|
fields.raw.each do |field|
|
||||||
|
@me.aspects.create!(name: field[0])
|
||||||
|
end
|
||||||
|
@me.reload
|
||||||
|
end
|
||||||
|
|
||||||
When /^I click on "([^"]*)" aspect edit icon$/ do |aspect_name|
|
When /^I click on "([^"]*)" aspect edit icon$/ do |aspect_name|
|
||||||
within(".all-aspects") do
|
within(".all-aspects") do
|
||||||
li = find('li', text: aspect_name)
|
li = find('li', text: aspect_name)
|
||||||
|
|
@ -112,6 +132,10 @@ And /^I toggle the aspect "([^"]*)"$/ do |name|
|
||||||
toggle_aspect(name)
|
toggle_aspect(name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Then /^I should see "([^"]*)" within the contact aspect dropdown$/ do |aspect_name|
|
||||||
|
expect(find(".dropdown-toggle .text")).to have_content aspect_name
|
||||||
|
end
|
||||||
|
|
||||||
Then /^I should see "([^"]*)" aspect selected$/ do |aspect_name|
|
Then /^I should see "([^"]*)" aspect selected$/ do |aspect_name|
|
||||||
aspect = @me.aspects.where(:name => aspect_name).first
|
aspect = @me.aspects.where(:name => aspect_name).first
|
||||||
within("#aspects_list") do
|
within("#aspects_list") do
|
||||||
|
|
|
||||||
|
|
@ -72,17 +72,6 @@ When /^I click on my name$/ do
|
||||||
click_link("#{@me.first_name} #{@me.last_name}")
|
click_link("#{@me.first_name} #{@me.last_name}")
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I have an aspect called "([^\"]*)"$/ do |aspect_name|
|
|
||||||
@me.aspects.create!(:name => aspect_name)
|
|
||||||
@me.reload
|
|
||||||
end
|
|
||||||
|
|
||||||
Given /^I have following aspect[s]?:$/ do |fields|
|
|
||||||
fields.raw.each do |field|
|
|
||||||
step %{I have an aspect called "#{field[0]}"}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
When /^I have user with username "([^"]*)" in an aspect called "([^"]*)"$/ do |username, aspect|
|
When /^I have user with username "([^"]*)" in an aspect called "([^"]*)"$/ do |username, aspect|
|
||||||
user = User.find_by_username(username)
|
user = User.find_by_username(username)
|
||||||
contact = @me.reload.contact_for(user.person)
|
contact = @me.reload.contact_for(user.person)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue