ULOG #7: Adding Dynamic Interesting Uloggers to Ulogs.org

in #ulog6 years ago (edited)

image.png

Repository

https://github.com/surpassinggoogle/UlogsV2

Task Request

https://steemit.com/utopian-io/@surpassinggoogle/task-request-kindly-add-a-rule-to-the-existing-algorithm-for-suggest-interesting-uloggers-on-ulogs-org

Pull Requests

https://github.com/surpassinggoogle/UlogsV2/pull/103
https://github.com/surpassinggoogle/UlogsV2/pull/104
https://github.com/surpassinggoogle/UlogsV2/pull/105
https://github.com/surpassinggoogle/UlogsV2/pull/108

Features

1) Display accounts followed by uloggers as Interesting Uloggers

PR: https://github.com/surpassinggoogle/UlogsV2/pull/103

This initial PR swapped the InterestingPeople component that displays the static list of people from src\client\helpers\constants.js with the new component InterestingUloggersWithAPI.js.

Inside this new component, it calls the get_following SteemAPI to get the list of accounts @uloggers follow.

steemAPI
      .sendAsync('call', ['follow_api', 'get_following', ['uloggers', '', 'blog', 100]])

2) Shuffle interesting uloggers on page load

PR: https://github.com/surpassinggoogle/UlogsV2/pull/104

After merging the PR above, I asked for Terry's feedback for its functionality. And basically he wanted the same function as the previous one which shuffled the list of accounts.

To accomplish this, I used lodash's .shuffle to shuffle the array instead of them being alphabetically sorted.

3) Re-added refresh button to re-acquire interesting uloggers

PR: https://github.com/surpassinggoogle/UlogsV2/pull/105

image.png

This is a PR that built on top of the first PR. As also mentioned in the previous PR, Terry wanted the same functionality as before, including the refresh button.

This PR re-added the refresh button and called the component's getCertifiedUloggers() function when the user clicks the refresh button.


4) Added dynamic display of uloggers when user visits /discover route

PR: https://github.com/surpassinggoogle/UlogsV2/pull/108

image.png

This features required changes to Discover.js. I had to convert the constant Discover to a React class and create a new DiscoverUloggers component. Then inside Discover.js, I switched the DiscoverContent component with this new component.

DiscoverUloggers.js is basically an extracted InterestingUloggersWithAPI.js from the SidebarContentBlock container.


Features in Action

interesting uloggers.gif

Accounts followed by @uloggers: https://ulogs.org/@uloggers/followed

Lesson Learned

Getting immediate feedback is one of the things I appreciate in agile development. That's the reason for these multiple PRs instead of one PR with a bulk of commits. As soon as I complete a working tiny increment to the product, I ship (merge) this to develop for Terry's testing. Terry then just creates a new PR to merge develop to master so that the codes are automatically deployed to the main ulogs website.

GitHub Account

https://github.com/eastmaels

This post was made from https://ulogs.org

Sort:  

Thank you for your contribution. A very well written post, I really like the way you approach a task request, by creating meaningful pull requests. Code commenting can be improved wherever there is a complex code written.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for the feedback codingdefined. Will add comments for complex codes on my next contributions.

Thank you for your review, @codingdefined!

So far this week you've reviewed 7 contributions. Keep up the good work!

Hey, @eastmael!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Amazing updates in @ulogs you guys are rocking.

Thank you.

Hi @eastmael!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Wonderful it will help the community to interact more and connect more keep doing awesome work :D

Thank you. Yes, hopefully with this update, it will encourage fellow uloggers to connect with each other.