Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single post view interaction refactorings #7182

Merged
merged 9 commits into from
Aug 12, 2017

Conversation

svbergerem
Copy link
Member

Fixes #6314. Related to #7168.

This loads the first 30 likes and reshares via gon and adds a 'Show all' link if there are more. Clicking on the link will fetch all likes or reshares.

show all likes

Comments are still fetched via Ajax.

@svbergerem svbergerem force-pushed the spv-load-initial-interactions branch from a2c1345 to 9d8f31c Compare January 6, 2017 14:22
@svbergerem svbergerem changed the title Single post view interaction refactorings [WIP] Single post view interaction refactorings Feb 17, 2017
@svbergerem svbergerem changed the title [WIP] Single post view interaction refactorings Single post view interaction refactorings Feb 19, 2017
@svbergerem svbergerem force-pushed the spv-load-initial-interactions branch from d5b7e1e to 8d43499 Compare May 16, 2017 07:47
@svbergerem
Copy link
Member Author

There was a small conflict with #7419: the timeago in the single post view didn't work anymore. I fixed that while rebasing the PR.

Copy link
Member

@cmrd-senya cmrd-senya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't manage to review all changes of the PR, only a part of them. I'll continue with it in a few days.

tooltipSelector: [
".avatar.micro",
"#show-all-likes",
"#show-all-comments"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be #show-all-reshares I guess.

Also, you added these to the tooltipSelector, however there is no "title" attribute set to these elements, so no tooltip is actually displayed for these divs. Why adding them then? I think you should also either set the "title" or remove these from the tooltipSelector.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! There is no need for a tooltip, so I removed the lines.

@svbergerem svbergerem force-pushed the spv-load-initial-interactions branch from 8d43499 to dc2b8d0 Compare May 16, 2017 20:39
Copy link
Member

@cmrd-senya cmrd-senya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but here are some notes on the code

@@ -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")}); });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make any difference here? Why not leaving it as it was?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was pretty sure that there is a reason for this but I also had to search for a while. Without this change the timeagos in the single post view are missing and only appear after a few seconds. That's the conflict I mentioned here. I'll move this change to a new commit.

describe "#with_initial_interactions" do
it "works with a user" do
expect(@presenter.with_initial_interactions).to be_a Hash
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these tests could be a little smarter and verify the contents of the hash. This data isn't checked anywhere now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@SuperTux88 SuperTux88 added this to the 0.7.0.0 milestone Jul 13, 2017
@svbergerem svbergerem force-pushed the spv-load-initial-interactions branch from dc2b8d0 to 06fc980 Compare July 26, 2017 09:50
@denschub
Copy link
Member

@svbergerem mind rebasing this?

@svbergerem svbergerem force-pushed the spv-load-initial-interactions branch from 06fc980 to a395388 Compare August 12, 2017 15:57
@svbergerem
Copy link
Member Author

@denschub Done.

@svbergerem svbergerem force-pushed the spv-load-initial-interactions branch from a395388 to 04735ce Compare August 12, 2017 16:09
@SuperTux88 SuperTux88 merged commit 04735ce into diaspora:develop Aug 12, 2017
SuperTux88 added a commit that referenced this pull request Aug 12, 2017
@SuperTux88
Copy link
Member

Merged (after 9 months ;) ), thanks everyone ❤️

@svbergerem svbergerem deleted the spv-load-initial-interactions branch August 12, 2017 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants