ULOG #9: Reaping the Benefits of Re-usable Components

in #ulog6 years ago

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
https://steemit.com/utopian-io/@surpassinggoogle/task-request-kindly-help-us-create-fresh-hashtag-columns-and-change-some-labels-on-ulogs-org

Pull Requests

https://github.com/surpassinggoogle/UlogsV2/pull/113
https://github.com/surpassinggoogle/UlogsV2/pull/115
https://github.com/surpassinggoogle/UlogsV2/pull/117
https://github.com/surpassinggoogle/UlogsV2/pull/119
https://github.com/surpassinggoogle/UlogsV2/pull/120

Features

No.DescriptionImagePR
1Display Certified Ulogger Icon Even if User's Not Logged inimage.pngLink
2Display Certified Ulogger Icon not Just in Feed but Also in Post Contentimage.pngLink
3Add Certified Ulogger Icon to Commentsimage.pngLink
4Separate Ulog Hashtagsimage.pngLink
5Update App Info When Submitting Commentimage.pngLink

For this development contribution, these were a combination of follow-up tasks from Terry based on his testing on the live features deployed to production.

The first PR was about displaying the Certified Ulogger icon to unauthenticated users. The fix for this was simple - I just removed the condition (checking) if a user is authenticated in the getUloggersFollowing action (src/client/user/userActions.js).

For the second PR, it was still about the Certified Ulogger but this time it was about displaying the icon inside a post. The main components updated here were src/client/components/Story/StoryFull.js and src/client/post/PostContent.js. The PR also contained an additional change in wording from Verified Ulogger to Certified Ulogger in the CertifiedUlogger component.

Just a segue and for non-developers reading this, I just want to highlight a small win here I got in following React's good design practice of re-usable components. The component I'm talking about is the CertifiedUlogger. Here's the difference:

Without CertifiedUlogger
WITH CertifiedUlogger
image.pngimage.png

Instead of rewriting the same code, I just needed to import the component in StoryFull.js and put it inside a condition for it to be displayed. So I just needed to write 3 lines of code instead of 12.

And this is where one of the lessons I learned applied as well - the more concise the codes, the lower the possibility for bugs to creep in (I like to keep it short with - the lesser the codes, the better :) ).

The third PR is still about the certified ulogger icon, but this time it's displaying it in the comments section. I just had to double check the location of where to put uloggersFollowingList because the Comment component uses recursion.

The fourth PR, is now for the new TR from Terry of separating Ulog hashtags from usual steem hastags and then the bug of Ulogs label not displaying for posts created using ulogs.org (which needed a separate PR to a steemscript repository. The latter dependency was already handled by @smitop - thanks dude - who made my work easier and faster.

And then the last PR is a bug fix for comments submitted using ulogs.org. The base codes still used busy's app information instead of it's own unique app info.

GitHub Account

https://github.com/eastmaels

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

Sort:  

Very unique and good way of presentation of the pull requests. :) Good to see task-requests category is being used effectively.

Thanks for the contribution.


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]

Thanks Emre. Yes, I like the concept behind TRs. I just hope the Utopian front-end for project discovery will go up soon. :)

Thank you for your review, @emrebeyler!

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

programming is great when you enjoy your work :D

Yes it is. And it's fun writing about it. It helps me better understand what I did. :)

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

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!

Coin Marketplace

STEEM 0.28
TRX 0.13
JST 0.032
BTC 60870.66
ETH 2917.09
USDT 1.00
SBD 3.62