From ce8b3c89dbc97809ebc950feaff9fe0a89bbd2ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Mon, 18 Feb 2013 20:20:50 +0100 Subject: [PATCH 1/8] update changelog; replace "pre" releases with a plain "head" Conflicts: config/defaults.yml --- Changelog.md | 6 ++++++ config/defaults.yml | 1 - lib/configuration_methods.rb | 2 +- spec/lib/configuration_methods_spec.rb | 10 ---------- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Changelog.md b/Changelog.md index bfa2036f4..b5a93efdb 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,9 @@ +# Head + +## Features + +* Deleting a post that was shared to Facebook now deletes it from Facebook too [#3980]( https://github.com/diaspora/diaspora/pull/3980) + # 0.0.3.0 ## Refactor diff --git a/config/defaults.yml b/config/defaults.yml index bcfca2dfe..24565f316 100644 --- a/config/defaults.yml +++ b/config/defaults.yml @@ -5,7 +5,6 @@ defaults: version: number: "0.0.3.0" - release: true # Do not touch unless in a merge conflict on doing a release, master should have a commit setting this to true which is not backported to the develop branch. heroku: false environment: url: "http://localhost:3000/" diff --git a/lib/configuration_methods.rb b/lib/configuration_methods.rb index 6b58967ca..095ca854f 100644 --- a/lib/configuration_methods.rb +++ b/lib/configuration_methods.rb @@ -42,7 +42,6 @@ module Configuration def version_string return @version_string unless @version_string.nil? @version_string = version.number.to_s - @version_string << "pre" unless version.release? @version_string << "-p#{git_revision[0..7]}" if git_available? @version_string end @@ -54,6 +53,7 @@ module Configuration @git_available = false else `which git` + `git status 2> /dev/null` if $?.success? @git_available = $?.success? end end diff --git a/spec/lib/configuration_methods_spec.rb b/spec/lib/configuration_methods_spec.rb index 8cc3525d8..34bbc7065 100644 --- a/spec/lib/configuration_methods_spec.rb +++ b/spec/lib/configuration_methods_spec.rb @@ -82,16 +82,6 @@ describe Configuration::Methods do @settings.version_string.should include @version.number end - context "on a non release" do - before do - @version.stub(:release?).and_return(false) - end - - it "includes pre" do - @settings.version_string.should include "pre" - end - end - context "with git available" do before do @settings.stub(:git_available?).and_return(true) From e232e164e4968a03081994c784815a60ed8b5f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Mon, 18 Feb 2013 21:31:54 +0100 Subject: [PATCH 2/8] exec foreman in script/server --- Changelog.md | 4 ++++ script/server | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index b5a93efdb..3c17f26b9 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,10 @@ * Deleting a post that was shared to Facebook now deletes it from Facebook too [#3980]( https://github.com/diaspora/diaspora/pull/3980) +## Bug Fixes + +* exec foreman in ./script/server to replace the process so that we can Ctrl+C it again. + # 0.0.3.0 ## Refactor diff --git a/script/server b/script/server index fab954e93..e31b4de5b 100755 --- a/script/server +++ b/script/server @@ -115,4 +115,4 @@ else fi echo "" -bundle exec foreman start -m "web=1,worker=$workers" -p $port +exec bundle exec foreman start -m "web=1,worker=$workers" -p $port From 099f4a61e45c1574abc98276a5cf4290f60b9a09 Mon Sep 17 00:00:00 2001 From: movilla Date: Wed, 20 Feb 2013 13:47:37 +0100 Subject: [PATCH 3/8] Include our custom fileuploader on the mobile site too --- Changelog.md | 1 + app/assets/javascripts/mobile.js | 1 + app/views/profiles/_edit_public.mobile.haml | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 3c17f26b9..3e38ebf72 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,7 @@ ## Bug Fixes * exec foreman in ./script/server to replace the process so that we can Ctrl+C it again. +* Include our custom fileuploader on the mobile site too. [#3994](https://github.com/diaspora/diaspora/pull/3994) # 0.0.3.0 diff --git a/app/assets/javascripts/mobile.js b/app/assets/javascripts/mobile.js index 92ec62281..d1c9b111d 100644 --- a/app/assets/javascripts/mobile.js +++ b/app/assets/javascripts/mobile.js @@ -7,6 +7,7 @@ //= require mbp-respond.min //= require mbp-helper //= require jquery.autoSuggest.custom +//= require fileuploader-custom $(document).ready(function(){ diff --git a/app/views/profiles/_edit_public.mobile.haml b/app/views/profiles/_edit_public.mobile.haml index 635c905f0..eab701ffe 100644 --- a/app/views/profiles/_edit_public.mobile.haml +++ b/app/views/profiles/_edit_public.mobile.haml @@ -4,7 +4,6 @@ - content_for :head do = javascript_include_tag :jquery - = javascript_include_tag :home :javascript $(document).ready(function () { From ee0d7b2e8b120f17661468b6660c98eb676db572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Thu, 21 Feb 2013 13:45:21 +0100 Subject: [PATCH 4/8] move custom splash page login into the controller, fixes #3991 --- Changelog.md | 1 + app/controllers/home_controller.rb | 14 ++++++++++---- app/views/home/show.html.haml | 7 +------ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Changelog.md b/Changelog.md index 3e38ebf72..c343a24b0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,6 +8,7 @@ * exec foreman in ./script/server to replace the process so that we can Ctrl+C it again. * Include our custom fileuploader on the mobile site too. [#3994](https://github.com/diaspora/diaspora/pull/3994) +* Move custom splash page logic into the controller [#3991](https://github.com/diaspora/diaspora/issues/3991) # 0.0.3.0 diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 34428cd4e..e9e84e5c5 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -4,16 +4,22 @@ class HomeController < ApplicationController def show + partial_dir = Rails.root.join('app', 'views', 'home') if user_signed_in? redirect_to stream_path elsif is_mobile_device? - unless(File.exist?(Rails.root.join('app', 'views', 'home', '_show.mobile.erb'))) - redirect_to user_session_path + if partial_dir.join('_show.mobile.haml').exist? || + partial_dir.join('_show.mobile.erb').exist? + render :show, layout: 'post' else - render :show, :layout => 'post' + redirect_to user_session_path end + elsif partial_dir.join("_show.html.haml").exist? || + partial_dir.join("_show.html.erb").exist? + render :show, layout: 'post' else - render :show, :layout => 'post' + render file: Rails.root.join("public", "default.html"), + layout: 'post' end end diff --git a/app/views/home/show.html.haml b/app/views/home/show.html.haml index 4680012ac..acfe230c6 100644 --- a/app/views/home/show.html.haml +++ b/app/views/home/show.html.haml @@ -6,9 +6,4 @@ - content_for :page_title do = pod_name -- begin - = render :partial => 'home/show' - -- rescue - :erb - <%= File.open(Rails.root.join('public', 'default.html')).read %> += render :partial => 'home/show' From bfa8b92c57a1213ae76db222073756b1f089d5c7 Mon Sep 17 00:00:00 2001 From: movilla Date: Thu, 21 Feb 2013 22:19:24 +0100 Subject: [PATCH 5/8] Fixed removing images from publisher on the profile and tags pages --- Changelog.md | 1 + app/views/photos/_new_photo.haml | 2 +- features/posts_from_profile_page.feature | 13 +++++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index c343a24b0..a23a4fc07 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,6 +9,7 @@ * exec foreman in ./script/server to replace the process so that we can Ctrl+C it again. * Include our custom fileuploader on the mobile site too. [#3994](https://github.com/diaspora/diaspora/pull/3994) * Move custom splash page logic into the controller [#3991](https://github.com/diaspora/diaspora/issues/3991) +* Fixed removing images from publisher on the profile and tags pages. [#3995](https://github.com/diaspora/diaspora/pull/3995) # 0.0.3.0 diff --git a/app/views/photos/_new_photo.haml b/app/views/photos/_new_photo.haml index 643b2d21c..868b0a337 100644 --- a/app/views/photos/_new_photo.haml +++ b/app/views/photos/_new_photo.haml @@ -65,7 +65,7 @@ $('.x').bind('click', function(){ var photo = $(this).closest('.publisher_photo'); photo.addClass("dim"); - $.ajax({url: "photos/" + photo.children('img').attr('data-id'), + $.ajax({url: "/photos/" + photo.children('img').attr('data-id'), dataType: 'json', type: 'DELETE', success: function() { diff --git a/features/posts_from_profile_page.feature b/features/posts_from_profile_page.feature index 99f69c6d5..6aa2f5fc3 100644 --- a/features/posts_from_profile_page.feature +++ b/features/posts_from_profile_page.feature @@ -7,13 +7,13 @@ Feature: posting from own profile page Given I am on the home page And a user with username "alice" When I sign in as "alice@alice.alice" - Given I have following aspects: | Family | | Work | + Given I am on "alice@alice.alice"'s page Scenario: posting some text - Given I am on "alice@alice.alice"'s page + Given I expand the publisher And I have turned off jQuery effects And I append "I want to understand people" to the publisher And I select "Family" on the aspect dropdown @@ -45,3 +45,12 @@ Feature: posting from own profile page When I am on the home page Then I should see a "img" within ".stream_element div.photo_attachments" And I should see "who am I?" within ".stream_element" + + Scenario: back out of posting a photo-only post + Given I expand the publisher + And I have turned off jQuery effects + When I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload" + And I wait for the ajax to finish + And I click to delete the first uploaded photo + And I wait for the ajax to finish + Then I should not see an uploaded image within the photo drop zone From 5d46baf33ecd51049187514703cff91a85bf1da8 Mon Sep 17 00:00:00 2001 From: movilla Date: Fri, 22 Feb 2013 16:15:25 +0100 Subject: [PATCH 6/8] Wrap text if too long in mobile notifications Conflicts: Changelog.md --- Changelog.md | 1 + app/assets/stylesheets/mobile.css.scss | 12 ++++++++++-- app/views/notifications/index.mobile.haml | 7 +++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Changelog.md b/Changelog.md index a23a4fc07..b7f6eaec1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -10,6 +10,7 @@ * Include our custom fileuploader on the mobile site too. [#3994](https://github.com/diaspora/diaspora/pull/3994) * Move custom splash page logic into the controller [#3991](https://github.com/diaspora/diaspora/issues/3991) * Fixed removing images from publisher on the profile and tags pages. [#3995](https://github.com/diaspora/diaspora/pull/3995) +* Wrap text if too long in mobile notifications. [#3990](https://github.com/diaspora/diaspora/pull/3990) # 0.0.3.0 diff --git a/app/assets/stylesheets/mobile.css.scss b/app/assets/stylesheets/mobile.css.scss index 70028a691..275ce4f78 100644 --- a/app/assets/stylesheets/mobile.css.scss +++ b/app/assets/stylesheets/mobile.css.scss @@ -50,9 +50,13 @@ body { font-weight: bold; } margin-bottom: 2px; - height: 45px; - white-space: nowrap; + word-wrap: break-word; overflow: hidden; + .time_notif { + font-weight: normal; + float: right; + padding-right: 5px; + } } > .content, @@ -165,6 +169,10 @@ body { #main_stream { margin-left: -10px; margin-right: -10px; + .from { + white-space: nowrap; + overflow: hidden; + } } .more-link { diff --git a/app/views/notifications/index.mobile.haml b/app/views/notifications/index.mobile.haml index 24b4ed4c0..f0b93d72a 100644 --- a/app/views/notifications/index.mobile.haml +++ b/app/views/notifications/index.mobile.haml @@ -13,12 +13,11 @@ %ul.notifications_for_day - notes.each do |note| .stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : 'read'}"} - .content =person_image_link(note.actors.last) - %span.from - = notification_message_for(note) - .time + .from + = notification_message_for(note) + .time_notif = time_ago_in_words(note.created_at) = will_paginate @notifications, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer From 6bb644f058310c52234dbf1254ca007b2db69d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Thu, 21 Feb 2013 14:25:38 +0100 Subject: [PATCH 7/8] Sort tag followings alphabetically, not in reverse, fixes #3986 --- Changelog.md | 1 + app/assets/javascripts/app/collections/tag_followings.js | 4 +++- app/assets/javascripts/app/router.js | 2 +- .../javascripts/app/views/tag_following_list_view.js | 5 +++-- app/assets/templates/tag_following_list_tpl.jst.hbs | 2 +- .../app/collections/tag_following_collection_spec.js | 8 ++++++++ 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Changelog.md b/Changelog.md index b7f6eaec1..b7befe3a0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -11,6 +11,7 @@ * Move custom splash page logic into the controller [#3991](https://github.com/diaspora/diaspora/issues/3991) * Fixed removing images from publisher on the profile and tags pages. [#3995](https://github.com/diaspora/diaspora/pull/3995) * Wrap text if too long in mobile notifications. [#3990](https://github.com/diaspora/diaspora/pull/3990) +* Sort tag followings alphabetically, not in reverse [#3986](https://github.com/diaspora/diaspora/issues/3986) # 0.0.3.0 diff --git a/app/assets/javascripts/app/collections/tag_followings.js b/app/assets/javascripts/app/collections/tag_followings.js index d969a598b..ab0a9f783 100644 --- a/app/assets/javascripts/app/collections/tag_followings.js +++ b/app/assets/javascripts/app/collections/tag_followings.js @@ -1,8 +1,10 @@ app.collections.TagFollowings = Backbone.Collection.extend({ model: app.models.TagFollowing, - url : "/tag_followings", + comparator: function(first_tf, second_tf) { + return first_tf.get("name") < second_tf.get("name"); + }, create : function(model) { var name = model.name || model.get("name"); diff --git a/app/assets/javascripts/app/router.js b/app/assets/javascripts/app/router.js index f1aa32b95..e00d3e4dd 100644 --- a/app/assets/javascripts/app/router.js +++ b/app/assets/javascripts/app/router.js @@ -73,7 +73,7 @@ app.Router = Backbone.Router.extend({ $("#tags_list").replaceWith(followedTagsView.render().el); followedTagsView.setupAutoSuggest(); - app.tagFollowings.add(preloads.tagFollowings); + app.tagFollowings.reset(preloads.tagFollowings); if(name) { var followedTagsAction = new app.views.TagFollowingAction( diff --git a/app/assets/javascripts/app/views/tag_following_list_view.js b/app/assets/javascripts/app/views/tag_following_list_view.js index 192d276ea..353be4582 100644 --- a/app/assets/javascripts/app/views/tag_following_list_view.js +++ b/app/assets/javascripts/app/views/tag_following_list_view.js @@ -14,7 +14,8 @@ app.views.TagFollowingList = app.views.Base.extend({ }, initialize : function(){ - this.collection.bind("add", this.appendTagFollowing, this); + this.collection.on("add", this.appendTagFollowing, this); + this.collection.on("reset", this.postRenderTemplate, this); }, postRenderTemplate : function() { @@ -72,4 +73,4 @@ app.views.TagFollowingList = app.views.Base.extend({ }).render().el); } -}); \ No newline at end of file +}); diff --git a/app/assets/templates/tag_following_list_tpl.jst.hbs b/app/assets/templates/tag_following_list_tpl.jst.hbs index 279fbefa7..2e0c2f292 100644 --- a/app/assets/templates/tag_following_list_tpl.jst.hbs +++ b/app/assets/templates/tag_following_list_tpl.jst.hbs @@ -2,4 +2,4 @@
- \ No newline at end of file + diff --git a/spec/javascripts/app/collections/tag_following_collection_spec.js b/spec/javascripts/app/collections/tag_following_collection_spec.js index 6567a3b0a..cffdd4ae6 100644 --- a/spec/javascripts/app/collections/tag_following_collection_spec.js +++ b/spec/javascripts/app/collections/tag_following_collection_spec.js @@ -3,6 +3,14 @@ describe("app.collections.TagFollowings", function(){ this.collection = new app.collections.TagFollowings(); }) + describe("comparator", function() { + it("should compare in reverse order", function() { + var a = new app.models.TagFollowing({name: "aaa"}), + b = new app.models.TagFollowing({name: "zzz"}) + expect(this.collection.comparator(a, b)).toBe(true) + }) + }) + describe("create", function(){ it("should not allow duplicates", function(){ this.collection.create({"name":"name"}) From b487c389bcd463965db2f6c392a040ed3cf2e0e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Sun, 24 Feb 2013 17:25:02 +0100 Subject: [PATCH 8/8] release 0.0.3.1 --- Changelog.md | 8 +------- config/defaults.yml | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Changelog.md b/Changelog.md index b7befe3a0..26c1b2c6a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,10 +1,4 @@ -# Head - -## Features - -* Deleting a post that was shared to Facebook now deletes it from Facebook too [#3980]( https://github.com/diaspora/diaspora/pull/3980) - -## Bug Fixes +# 0.0.3.1 * exec foreman in ./script/server to replace the process so that we can Ctrl+C it again. * Include our custom fileuploader on the mobile site too. [#3994](https://github.com/diaspora/diaspora/pull/3994) diff --git a/config/defaults.yml b/config/defaults.yml index 24565f316..5bb2bb70f 100644 --- a/config/defaults.yml +++ b/config/defaults.yml @@ -4,7 +4,7 @@ defaults: version: - number: "0.0.3.0" + number: "0.0.3.1" heroku: false environment: url: "http://localhost:3000/"