create account

UlogsV2 Development Tasks Part II by petertag

View this thread on: hive.blogpeakd.comecency.com
· @petertag · (edited)
$23.10
UlogsV2 Development Tasks Part II
[Repository: UlogsV2](https://github.com/surpassinggoogle/UlogsV2)

These are the rest of the tasks I picked up from [@surpassinggoogle](https://steemit.com/@surpassinggoogle) for Ulogs, and they were a bit harder. The pull request is [here](https://github.com/surpassinggoogle/UlogsV2/pull/154), and the task request is once again [here](https://steemit.com/utopian-io/@surpassinggoogle/task-request-add-core-features-and-communities-to-ulogs-org-880-steem-bounty-and-more).

Edit: I'm including [this PR](https://github.com/surpassinggoogle/UlogsV2/pull/156) as well, with test logging removal and request loading icon addition, since it's the same task.

### Adding Videos to the Banner (Task 4)

This was easier than expected though, because react has a massive base of tools to use. I used react-player (but only imported the YouTube player, since they were all from there) to embed videos into the banner. The videos are a bit sketchy looking, due to the resolution, but their appearance can easily be changed with CSS. I put them in at 100% width, so that there wouldn't be white space hanging around in the banner, and don't think it looks bad at all.

### Create a Ulogs-Subtags Page (Task 6)

For this, I was to create a page for ulogs that's similar to steemit's [tags page](https://www.steemit.com/tags). It wasn't too hard, but was the first time I really built a react component by myself! Yay! The page looks like this:
![Screen Shot 2018-12-12 at 4.15.16 PM.png](https://cdn.steemitimages.com/DQmNhni4ckvHcoa7N9vFywC34dNjPrivRCsreozbYu1Tt6t/Screen%20Shot%202018-12-12%20at%204.15.16%20PM.png)

The component wasn't really the issue to building this page, as much as the steem API was. Looking at steem's page, they use the deprecated getState('/tags')

, which isn't something to be using when it's been deprecated in favor of something else. So, I wrote a new API helper in ulogs to get the trending tags, using the tags_api, and return them to the ulog-subtags page.

![Screen Shot 2018-12-12 at 4.15.50 PM.png](https://cdn.steemitimages.com/DQmdUFw2d7LWWvq3X8PCozLiEttbN7sPNiLwTjxagJWKFwu/Screen%20Shot%202018-12-12%20at%204.15.50%20PM.png)

The start value is weird, as it's the first tag to return in the list of trending tags, so I just went with ulogs as it's the most trending of the ulog subtags. The limit is maxed at 1000, so that's the default value (not an expensive call). Then I return to the ulog-subtags component, and filter out all the non-ulogs tags.

![Screen Shot 2018-12-12 at 4.15.39 PM.png](https://cdn.steemitimages.com/DQmct86sHSXHGQZVqEBLpVyFATdsNzvZBnbRQX2b5renFGP/Screen%20Shot%202018-12-12%20at%204.15.39%20PM.png)

This logic could probably be rewritten a little bit (removing the logs after this post, didn't notice I left so many in there) for clarity and speed, but it's been pared down from a much larger function that was the first working one, down to this. Since there's a 1000 tag limit on the API call, it loops around a few times, getting more tags and adding them to the final array. Within 10 calls, you get the tags seen in the previous picture, and the next ulog-subtag shows up in the 39th call, so I left it at 10 since that isn't exactly trending, and it takes a bit for that many to load. After that, it returns the tags array to render them in the table.

That's just about it, if there's anything you notice, comment below or on Github. Cheers!

##### Vote For Me as Your Witness

Cheers, thanks for reading! If you like my tools and content and would like to see more, [Vote for me as witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=petertag&approve=1) or [proxy your votes](https://v2.steemconnect.com/sign/account-witness-proxy?proxy=petertag&approve=1) and I'll pick the best witnesses for you!

###### My Projects

[Pywit](https://www.github.com/gitschwifty/pywit.git)- A witness tool-kit built in Python on top of Holger80's Beempy.
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 552 others
properties (23)
authorpetertag
permlinkulogsv2-development-tasks-part-ii
categoryutopian-io
json_metadata{"tags":["utopian-io","development","ulog","partiko"],"users":["surpassinggoogle"],"image":["https://cdn.steemitimages.com/DQmNhni4ckvHcoa7N9vFywC34dNjPrivRCsreozbYu1Tt6t/Screen%20Shot%202018-12-12%20at%204.15.16%20PM.png","https://cdn.steemitimages.com/DQmdUFw2d7LWWvq3X8PCozLiEttbN7sPNiLwTjxagJWKFwu/Screen%20Shot%202018-12-12%20at%204.15.50%20PM.png","https://cdn.steemitimages.com/DQmct86sHSXHGQZVqEBLpVyFATdsNzvZBnbRQX2b5renFGP/Screen%20Shot%202018-12-12%20at%204.15.39%20PM.png"],"links":["https://github.com/surpassinggoogle/UlogsV2/pull/154","https://steemit.com/utopian-io/@surpassinggoogle/task-request-add-core-features-and-communities-to-ulogs-org-880-steem-bounty-and-more","https://github.com/surpassinggoogle/UlogsV2/pull/156","https://www.steemit.com/tags","https://v2.steemconnect.com/sign/account-witness-vote?witness=petertag&approve=1","https://v2.steemconnect.com/sign/account-witness-proxy?proxy=petertag&approve=1","https://www.github.com/gitschwifty/pywit.git"],"app":"partiko","format":"markdown"}
created2018-12-12 23:25:30
last_update2018-12-13 02:51:24
depth0
children6
last_payout2018-12-19 23:25:30
cashout_time1969-12-31 23:59:59
total_payout_value17.665 HBD
curator_payout_value5.432 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,929
author_reputation17,170,168,350,944
root_title"UlogsV2 Development Tasks Part II"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id76,758,795
net_rshares39,222,209,517,010
author_curate_reward""
vote details (616)
@helo ·
$10.14
- Congrats on your first react component. 
- There is a lot of console.log entries in the renderTags function, don't forget to remove them next time.
- No comments in the code this time.
- The repo link should have https:// for it to be clickable.
- Perhaps you meant "something else"?
> which isn't something to be using when it's been deprecated in favor of someone else. 

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/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](https://review.utopian.io/result/3/2-3-2-2-1-1-4-).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorhelo
permlinkre-petertag-ulogsv2-development-tasks-part-ii-20181213t024407236z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2-3-2-2-1-1-4-","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2018-12-13 02:44:06
last_update2018-12-13 02:44:06
depth1
children2
last_payout2018-12-20 02:44:06
cashout_time1969-12-31 23:59:59
total_payout_value7.679 HBD
curator_payout_value2.457 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length872
author_reputation121,547,934,535,311
root_title"UlogsV2 Development Tasks Part II"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,764,556
net_rshares17,117,400,230,887
author_curate_reward""
vote details (21)
@petertag ·
Thanks! The edit pull request I added to it does remove the console.logs, and definitely meant something else. Documented the function I added to apiHelpers, but not the new component yeah. I'll fix the link. 

Posted using [Partiko Android](https://steemit.com/@partiko-android)
properties (22)
authorpetertag
permlinkpetertag-re-helo-re-petertag-ulogsv2-development-tasks-part-ii-20181213t025025150z
categoryutopian-io
json_metadata{"app":"partiko"}
created2018-12-13 02:50:24
last_update2018-12-13 02:50:24
depth2
children0
last_payout2018-12-20 02:50:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length279
author_reputation17,170,168,350,944
root_title"UlogsV2 Development Tasks Part II"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,764,708
net_rshares0
@utopian-io ·
Thank you for your review, @helo! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-re-petertag-ulogsv2-development-tasks-part-ii-20181213t024407236z-20181215t044547z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
created2018-12-15 04:45:48
last_update2018-12-15 04:45:48
depth2
children0
last_payout2018-12-22 04:45:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length56
author_reputation152,955,367,999,756
root_title"UlogsV2 Development Tasks Part II"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,860,625
net_rshares0
@steem-plus ·
SteemPlus upvote
Hi, @petertag!

You just got a **0.57%** upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in [here](https://steemit.com/@steem-plus) to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.
properties (22)
authorsteem-plus
permlinkulogsv2-development-tasks-part-ii---vote-steemplus
categoryutopian-io
json_metadata{}
created2018-12-13 19:09:33
last_update2018-12-13 19:09:33
depth1
children0
last_payout2018-12-20 19:09:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length435
author_reputation247,952,188,232,400
root_title"UlogsV2 Development Tasks Part II"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,797,485
net_rshares0
@steem-ua ·
#### Hi @petertag!

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](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-ulogsv2-development-tasks-part-ii-20181213t025628z
categoryutopian-io
json_metadata"{"app": "beem/0.20.14"}"
created2018-12-13 02:56:30
last_update2018-12-13 02:56:30
depth1
children0
last_payout2018-12-20 02:56:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length287
author_reputation23,214,230,978,060
root_title"UlogsV2 Development Tasks Part II"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,764,888
net_rshares0
@utopian-io ·
Hey, @petertag!

**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](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

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

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-ulogsv2-development-tasks-part-ii-20181213t075255z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
created2018-12-13 07:52:57
last_update2018-12-13 07:52:57
depth1
children0
last_payout2018-12-20 07:52:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length590
author_reputation152,955,367,999,756
root_title"UlogsV2 Development Tasks Part II"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,773,541
net_rshares0