Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Buttons for ignore, hide, delete on SPV #5547
This is my attempt to add "delete own post", "ignore user" and "hide this post" buttons to the single post view. This will also move the "report post" button to a semantic better place - away from normal post interaction buttons.
There are some open points where I need further feedback on how to do this right:
(Also there are no tests yet.)
That's a good place in my opinion
We certainly need a confirmation message depending of the action performed. And if you're able to scroll back to the place the stream was before going to the SPV, it would be awesome.
Thanks for this very valuable work!
I know we need a message - I just don't know how to implement. ;)
If I change back to the stream, I need to have a way to show a toast-message when the steam is loaded. It seems to me there is no way to tell the "/stream" page that it should show such a message - by simply navigating to "/stream".
So here I need input how to implement / show a confirmation message when an action was done.
That won't be possible, because SPV is not necessarily opened from the stream but may be opened by direct link, in a new tab etc.
So we need a "if" ;)
About the message, you can check the "You're already logged in": logout and open diaspora in two tabs, then log in in each tabs. You'll have the "You're already logged in" message in the second one (if I remember correctly). So this is an example of a message displayed in the stream from a different page.
No, we just don't need that feature.
When you log in your browser, you sent a POST request stating what you want to do to the server. So the server can device you already have an open session (depending on the cookie) and display that message when the site is loaded.
In my case that will not work, because the server knows nothing where the user came from or what the user has done when "/stream" will be loaded. All requests and action are done before via ajax and only then the "/stream" is navigated to.
Maybe @svbergerem may have an idea how to make usable notifications when an action (delete own post / hide post / block author) has gone through and the user will be forwarded to "/stream" in the next seconds or so?
Maybe show a toast message with "This post was hidden. You will be forwarded to your stream in 5s." and have the site forward after the timeout?
added a commit
this pull request
Jan 25, 2015
Jan 25, 2015
1 check passed
This was referenced
Jan 25, 2015
Hey! Thank you for working on this, this is a really nice feature.
When a post is reshared, the actions can be made on the reshare, not on the original post. So, like the like, comment and reshare icons, the icons added by this pull request should be displayed in the reshare div, not in the original div.