Unverified Commit 7153df5c authored by Benjamin Neff's avatar Benjamin Neff

Merge branch 'release/0.7.0.0'

parents 8bed8a84 bf47e1bc
......@@ -10,27 +10,15 @@ app/assets/images/custom/
# Configuration files
config/diaspora.yml
config/heroku.yml
config/initializers/secret_token.rb
config/redis.conf
config/deploy_config.yml
config/schedule.rb
.bundle
vendor/bundle/
vendor/cache/
config/database.yml
.rvmrc_custom
.rvmrc.local
config/oidc_key.pem
# Mailing list stuff
config/email_offset
config/mailing_list.csv
# Generated files
log/
public/stylesheets/*.css
public/diaspora
spec/fixtures/*.y*ml
spec/fixtures/*.fixture.*
coverage/
......@@ -39,6 +27,12 @@ public/404.html
public/422.html
public/500.html
# the db/schema.rb. Although this is contrary to rails best-practises, we
# cannot provide a schema.rb that works for both MySQL and PostgreSQL, so we
# have no choice. Our migrations are maintained, so it should always be
# possible to get back to a "clean" database schema anyway.
db/schema.rb
# Sprites
app/assets/images/branding-*.png
app/assets/images/branding/logos-*.png
......@@ -53,17 +47,13 @@ doc/
public/uploads/
public/assets/
public/source.tar*
public/.well-known
tmp/**/
tmp/
*.sqlite3
# Temporary files of every sort
.sass-cache/
.DS_Store
.idea
.redcar
.rvmrc
.stgit*
*.swap
*.swo
......@@ -76,7 +66,6 @@ tmp/
nbproject
patches-*
capybara-*.html
dump.rdb
# Rubinius's JIT
*.rbc
......
......@@ -40,7 +40,7 @@ Metrics/BlockLength:
# No space makes the method definition shorter and differentiates
# from a regular assignment.
Style/SpaceAroundEqualsInParameterDefault:
Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
# Single quotes being faster is hardly measurable and only affects parse time.
......@@ -55,7 +55,7 @@ Style/SymbolArray:
Enabled: true
# Most readable form.
Style/AlignHash:
Layout/AlignHash:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
......@@ -92,7 +92,7 @@ Style/RaiseArgs:
# Indenting the chained dots beneath each other is not supported by this cop,
# see https://github.com/bbatsov/rubocop/issues/1633
Style/MultilineOperationIndentation:
Layout/MultilineOperationIndentation:
Enabled: false
# Fail is an alias of raise. Avoid aliases, it's more cognitive load for no gain.
......@@ -107,7 +107,7 @@ Style/SignalException:
Lint/HandleExceptions:
Enabled: false
Style/SpaceInsideBlockBraces:
Layout/SpaceInsideBlockBraces:
# The space here provides no real gain in readability while consuming
# horizontal space that could be used for a better parameter name.
# Also {| differentiates better from a hash than { | does.
......@@ -115,7 +115,7 @@ Style/SpaceInsideBlockBraces:
# No trailing space differentiates better from the block:
# foo} means hash, foo } means block.
Style/SpaceInsideHashLiteralBraces:
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
# { ... } for multi-line blocks is okay, follow Weirichs rule instead:
......@@ -165,7 +165,7 @@ Style/NumericPredicate:
EnforcedStyle: comparison
# Reset some HoundCI changes back to Rubocop defaults
Style/DotPosition:
Layout/DotPosition:
EnforcedStyle: leading
### backward compatibility
......
language: ruby
rvm:
- 2.3.1
- 2.1
- 2.4.1
- 2.3.4
env:
- DB=postgresql BUILD_TYPE=cucumber
......@@ -15,6 +15,7 @@ cache:
bundler: true
directories:
- app/assets/images
- tmp/cache/assets
branches:
only:
......@@ -29,7 +30,7 @@ before_install:
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs
- export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
bundler_args: "--deployment --without development production --with mysql postgresql --jobs 3 --retry 3"
bundler_args: "--deployment --without development --with mysql postgresql --jobs 3 --retry 3"
script: "./script/ci/build.sh"
......
# Contributing to diaspora\*
First of all: thank you very much for helping us out!
## Things you need to know before contributing
If you want to get in touch with other diaspora\* developers, [check our wiki][how-we-communicate] for information on how we communicate. Feel free to ask if you have any questions!
Everyone interacting with our code, issue trackers, chat rooms, mailing lists, the wiki, and the discourse forum is expected to follow the [diaspora\* code of conduct][code-of-conduct].
## Report a security issue
Found a security issue? Please disclose it responsibly. We have a team of developers listening to [security@diasporafoundation.org][sec-mail]. The PGP fingerprint is [AB0D AB02 0FC5 D398 03AB 3CE1 6F70 243F 27AD 886A][pgp].
## Contributing to translations
We use [WebTranslateIt][webtranslateit] to manage translations of the app interface. Please read [our wiki page][translation-wiki] to find out more about this. If your language is featured on WebTranslateIt, please do **not** open a pull request to update translations. If it is not already featured on WebTranslateIt, please read the wiki article above to find out how to proceed.
## Contributing to the code
**Before opening a pull request** please read [how to contribute][contribute]. Doing things the right way from the start will save us time and mean that your contribution can be integrated quicker!
- Follow our [git workflow][git-workflow] method. In particular, *do not* open a pull request from the `master` or the `develop` branch.
- Follow our [styleguide][styleguide] and run pronto, our syntax analyzer, **locally before opening a pull request**. See [our wiki][pronto] for information on how to do this.
- [Write tests][testing-workflow].
- Use meaningful commit-messages and split larger tasks, e.g. refactoring, into separate commits. This makes the review process much easier.
## Other ways to contribute
You don’t know code? No worries, there are plenty other ways to help the diaspora* project! Please find out how you can help [on our wiki][other-ways].
[code-of-conduct]: https://github.com/diaspora/diaspora/blob/develop/CODE_OF_CONDUCT.md
[how-we-communicate]: https://wiki.diasporafoundation.org/How_we_communicate
[pgp]: https://pgp.mit.edu/pks/lookup?op=get&search=0x6F70243F27AD886A
[sec-mail]: mailto:security@diasporafoundation.org
[webtranslateit]: https://webtranslateit.com/en/projects/3020-Diaspora
[translation-wiki]: https://wiki.diasporafoundation.org/Contribute_translations
[contribute]: https://wiki.diasporafoundation.org/Getting_started_with_contributing
[git-workflow]: https://wiki.diasporafoundation.org/Git_Workflow
[styleguide]: https://wiki.diasporafoundation.org/Styleguide
[pronto]: https://wiki.diasporafoundation.org/Styleguide#Automatic_local_review
[testing-workflow]: https://wiki.diasporafoundation.org/Testing_Workflow
[other-ways]: https://wiki.diasporafoundation.org/Other_ways_to_contribute
# 0.7.0.0
## Supported Ruby versions
This release recommends using Ruby 2.4, while retaining Ruby 2.3 as an officially supported version.
Ruby 2.1 is no longer officially supported.
## Delete public/.well-known/
Before upgrading, please check if your `public/` folder contains a hidden `.well-known/` folder.
If so, please delete it since it will prevent the federation from working properly.
## Refactor
* Make the mention syntax more flexible [#7305](https://github.com/diaspora/diaspora/pull/7305)
* Display @ before mentions [#7324](https://github.com/diaspora/diaspora/pull/7324)
* Simplify mentions in the publisher [#7302](https://github.com/diaspora/diaspora/pull/7302)
* Remove chartbeat and mixpanel support [#7280](https://github.com/diaspora/diaspora/pull/7280)
* Upgrade to jQuery 3 [#7303](https://github.com/diaspora/diaspora/pull/7303)
* Add i18n for color themes [#7369](https://github.com/diaspora/diaspora/pull/7369)
* Remove deprecated statistics.json [#7399](https://github.com/diaspora/diaspora/pull/7399)
* Always link comment count text on mobile [#7483](https://github.com/diaspora/diaspora/pull/7483)
* Switch to new federation protocol [#7436](https://github.com/diaspora/diaspora/pull/7436)
* Send public profiles publicly [#7501](https://github.com/diaspora/diaspora/pull/7501)
* Change sender for mails [#7495](https://github.com/diaspora/diaspora/pull/7495)
* Move back to top to the right to avoid misclicks [#7516](https://github.com/diaspora/diaspora/pull/7516)
* Include count in mobile post action link [#7520](https://github.com/diaspora/diaspora/pull/7520)
* Update the user data export archive format [#6726](https://github.com/diaspora/diaspora/pull/6726)
* Use id as fallback when sorting posts [#7523](https://github.com/diaspora/diaspora/pull/7523)
* Remove no-posts-info when adding posts to the stream [#7523](https://github.com/diaspora/diaspora/pull/7523)
* Upgrade to rails 5.1 [#7514](https://github.com/diaspora/diaspora/pull/7514)
* Refactoring single post view interactions [#7182](https://github.com/diaspora/diaspora/pull/7182)
* Update help pages [#7528](https://github.com/diaspora/diaspora/pull/7528)
* Disable rendering logging in production [#7529](https://github.com/diaspora/diaspora/pull/7529)
* Add some missing indexes and cleanup the database if needed [#7533](https://github.com/diaspora/diaspora/pull/7533)
* Remove avatar, name, timestamp and interactions from publisher preview [#7536](https://github.com/diaspora/diaspora/pull/7536)
## Bug fixes
* Fix height too high on mobile SPV [#7480](https://github.com/diaspora/diaspora/pull/7480)
* Improve stream when ignoring a person who posts a lot of tagged posts [#7503](https://github.com/diaspora/diaspora/pull/7503)
* Fix order of comments across pods [#7436](https://github.com/diaspora/diaspora/pull/7436)
* Prevent publisher from closing in preview mode [#7518](https://github.com/diaspora/diaspora/pull/7518)
* Increase reshare counter after reshare on mobile [#7520](https://github.com/diaspora/diaspora/pull/7520)
* Reset stuck exports and handle errors [#7535](https://github.com/diaspora/diaspora/pull/7535)
## Features
* Add support for mentions in comments to the backend [#6818](https://github.com/diaspora/diaspora/pull/6818)
* Add support for new mention syntax [#7300](https://github.com/diaspora/diaspora/pull/7300) [#7394](https://github.com/diaspora/diaspora/pull/7394)
* Render mentions as links in comments [#7327](https://github.com/diaspora/diaspora/pull/7327)
* Add support for mentions in comments to the front-end [#7386](https://github.com/diaspora/diaspora/pull/7386)
* Support direct links to comments on mobile [#7508](https://github.com/diaspora/diaspora/pull/7508)
* Add inviter first and last name in the invitation e-mail [#7484](https://github.com/diaspora/diaspora/pull/7484)
* Add markdown editor for comments and conversations [#7482](https://github.com/diaspora/diaspora/pull/7482)
* Improve responsive header in desktop version [#7509](https://github.com/diaspora/diaspora/pull/7509)
* Support cmd+enter to submit posts, comments and conversations [#7524](https://github.com/diaspora/diaspora/pull/7524)
* Add markdown editor for posts, comments and conversations on mobile [#7235](https://github.com/diaspora/diaspora/pull/7235)
* Mark as "Mobile Web App Capable" on Android [#7534](https://github.com/diaspora/diaspora/pull/7534)
* Add support for receiving account migrations [#6750](https://github.com/diaspora/diaspora/pull/6750)
# 0.6.7.0
## Refactor
......
This diff is collapsed.
This diff is collapsed.
......@@ -121,12 +121,6 @@ var app = {
app.flashMessages = new app.views.FlashMessages({el: $("#flash-container")});
},
/* mixpanel wrapper function */
instrument : function(type, name, object, callback) {
if(!window.mixpanel) { return; }
window.mixpanel[type](name, object, callback);
},
setupDisabledLinks: function() {
$("a.disabled").click(function(event) {
event.preventDefault();
......
......@@ -48,12 +48,6 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin,
var body = this.get("text").trim()
, newlineIdx = body.indexOf("\n");
return (newlineIdx > 0 ) ? body.substr(newlineIdx+1, body.length) : "";
},
//returns a promise
preloadOrFetch : function(){
var action = app.hasPreload("post") ? this.set(app.parsePreload("post")) : this.fetch();
return $.when(action);
}
}));
// @license-end
......
......@@ -3,10 +3,6 @@
//require ../post
app.models.Post.Interactions = Backbone.Model.extend({
url : function(){
return this.post.url() + "/interactions";
},
initialize : function(options){
this.post = options.post;
this.comments = new app.collections.Comments(this.get("comments"), {post : this.post});
......@@ -14,33 +10,16 @@ app.models.Post.Interactions = Backbone.Model.extend({
this.reshares = new app.collections.Reshares(this.get("reshares"), {post : this.post});
},
parse : function(resp){
this.comments.reset(resp.comments);
this.likes.reset(resp.likes);
this.reshares.reset(resp.reshares);
var comments = this.comments
, likes = this.likes
, reshares = this.reshares;
return {
comments : comments,
likes : likes,
reshares : reshares,
fetched : true
};
},
likesCount : function(){
return this.get("fetched") ? this.likes.models.length : this.get("likes_count");
return this.get("likes_count");
},
resharesCount : function(){
return this.get("fetched") ? this.reshares.models.length : this.get("reshares_count");
return this.get("reshares_count");
},
commentsCount : function(){
return this.get("fetched") ? this.comments.models.length : this.get("comments_count");
return this.get("comments_count");
},
userLike : function(){
......@@ -76,8 +55,6 @@ app.models.Post.Interactions = Backbone.Model.extend({
app.flashMessages.handleAjaxError(response);
}
});
app.instrument("track", "Like");
},
unlike : function() {
......@@ -87,8 +64,6 @@ app.models.Post.Interactions = Backbone.Model.extend({
self.set({"likes_count" : self.get("likes_count") - 1});
self.likes.trigger("change");
}});
app.instrument("track", "Unlike");
},
comment: function(text, options) {
......@@ -104,8 +79,6 @@ app.models.Post.Interactions = Backbone.Model.extend({
self.trigger('change'); //updates after sync
if (options.success) { options.success(); }
});
app.instrument("track", "Comment");
},
reshare : function(){
......@@ -126,8 +99,6 @@ app.models.Post.Interactions = Backbone.Model.extend({
.fail(function(response) {
app.flashMessages.handleAjaxError(response);
});
app.instrument("track", "Reshare");
},
userCanReshare : function(){
......
......@@ -13,8 +13,16 @@ app.models.Stream = Backbone.Collection.extend({
},
collectionOptions :function(){
var order = this.sortOrder();
return { comparator : function(item) { return -item[order](); } };
var order = this.sortOrder();
return {
comparator: function(item1, item2) {
if (item1[order]() < item2[order]()) { return 1; }
if (item1[order]() > item2[order]()) { return -1; }
if (item1.id < item2.id) { return 1; }
if (item1.id > item2.id) { return -1; }
return 0;
}
};
},
url : function(){
......
......@@ -9,9 +9,8 @@ app.pages.SinglePostViewer = app.views.Base.extend({
},
initialize : function() {
this.model = new app.models.Post({ id : gon.post.id });
this.model.preloadOrFetch().done(_.bind(this.initViews, this));
this.model.interactions.fetch(); //async, yo, might want to throttle this later.
this.model = new app.models.Post(gon.post);
this.initViews();
},
initViews : function() {
......
......@@ -9,7 +9,7 @@ app.Router = Backbone.Router.extend({
"commented(/)": "stream",
"community_spotlight(/)": "spotlight",
"contacts(/)": "contacts",
"conversations(/)(:id)(/)": "conversations",
"conversations(/)(:id)(?conversation_id=:conversation_id)(/)": "conversations",
"followed_tags(/)": "followed_tags",
"getting_started(/)": "gettingStarted",
"help(/)": "help",
......@@ -93,8 +93,8 @@ app.Router = Backbone.Router.extend({
app.page = new app.pages.Contacts({stream: stream});
},
conversations: function(id) {
app.conversations = app.conversations || new app.views.ConversationsInbox();
conversations: function(id, conversationId) {
app.conversations = app.conversations || new app.views.ConversationsInbox(conversationId);
if (parseInt("" + id, 10)) {
app.conversations.renderConversation(id);
}
......@@ -182,7 +182,7 @@ app.Router = Backbone.Router.extend({
},
singlePost: function(id) {
this.renderPage(function() { return new app.pages.SinglePostViewer({id: id}); });
this.renderPage(function() { return new app.pages.SinglePostViewer({id: id, el: $("#container")}); });
},
spotlight: function() {
......
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
//= require ./publisher/mention_view
app.views.CommentMention = app.views.PublisherMention.extend({
initialize: function(opts) {
opts.url = Routes.mentionablePost(opts.postId);
app.views.PublisherMention.prototype.initialize.call(this, opts);
}
});
// @license-end
......@@ -9,8 +9,8 @@ app.views.CommentStream = app.views.Base.extend({
events: {
"keydown .comment_box": "keyDownOnCommentBox",
"submit form": "createComment",
"focus .comment_box": "commentTextareaFocused",
"click .toggle_post_comments": "expandComments"
"click .toggle_post_comments": "expandComments",
"click form": "openForm"