Resteemed Tab has been Developed! - With steemd Backend Change!
Resteemed tab
A few weeks ago, I posted about my development change to have a Resteemed tab in a user's blog. Please first see the post Resteemed Tab has been Developed! for more information.
However, an issue was found concerning pagination due to the way the change was implemented. Basically, when a user's blogroll is loaded, there is a request to the backend to return a set number of posts (currently 20 of them). Depending on which tab the user is on, the posts that belong in the other tab are hidden. The problem is that with this method, the number of blogs and the number of resteems might not be consistent. When the user scrolls to the bottom of the tab, another request is done to the backend to return the next set of 20, which again, could be a mixture of blog and resteemed posts.
The solution is to make a change to the backend to have an option of filtering blogs and resteems when requesting a user's blogroll. This way, a request for only blogs or only resteems will return a consistent number like 20 of them from the blogroll.
Lately, I've spent some time learning the steem codebase and setting up a local dev environment to be able to make changes and test them. See the Technical section below to find out the changes I've made to complete this task. You are also welcome to follow my weekly witness update posts to know what I've been up to!
Features
Blog tab
Resteemed tab
Dropdown
Technical
The two relevant API functions that needed to be changed were get_discussions_by_blog
and get_state @user
. These changes are summarized in this GitHub issue get_discussions_by_blog to filter resteems #581.
get_discussions_by_blog
Here is a regular request, which gives 20 posts, blogs and resteems mixed, as it is currently:
A new optional parameter, hide
, set to resteemed
:
With hide
set to authored
:
get_state @user
Here is the request with @user
:
With @user/blog
:
With @user/resteemed
:
Submission
The code submission can be found on these GitHub pull requests:
get_discussions_by_blog to filter resteems #678
Split Blog tab into Blog and Resteemed tabs #819
Fantastic! Definitely been waiting for this :)
Oh me too haha!
Awesome!
Resteemed
this could be very useful. there are people i would like to follow, but don't because their blog is full of resteems that i don't want. this way they could be separated.
Hi @lifeworship - just to clarify one thing though, if you follow someone, their resteems will show up in your feed. This is an update to what shows up when you view someone's "Blog" tab.
clarified, thank you.
Yes, this has been something many users have asked for.
thank you for this post.
Of course!
Well, that'a sort of the point of following someone - you follow the things they choose to resteem, too.
Here are my few thoughts on how to improve Steemit:
https://steemit.com/steemit/@mirda/changes-to-steemit-how-to-make-steemit-simpler-to-use
OMG Thank you! If there is anything I can do to help you support creating this new feature just let me know.
P.S. Some users are saying that the resteemed tab would then be neglected. I personally am ok with this but hypnothetically how much more work would it take to have an "All" tab first, then @ users blogs, Then resteems?
This is great! I hope it can be implemented soon so that we see posts from people we follow and separately their resteems. Thank you!
Thanks!
I don't get all the coding stuff but I cannot wait for a separate resteem tab!
Hopefully there are no bugs, the back end is playing nicely with the front end and we'll have it soon. Gimme. Gimme. Gimme! LOL
Haha indeed! There are lots of features that would be awesome to have, like in @timcliff's wish list!
Holy Toledo! You are a blockchain developer now!!!
Great job @bitcoiner :) I know this took a lot of work, and it will be a huge benefit to the community!
Thanks @timcliff! Yes, I spent quite the time on it. Hopefully this gets in this time with no further issues!
When do you suspect you'll get this up ?
I am a community developer and not part of Steemit, Inc. I've submitted my code changes to them and it will need to go through review before they incorporate it into their next release.
Thanks for the update :)
Perfect, amazing work!
Thanks!