ULOG #21: Closing the 'Grow' Task Request

in #ulog7 years ago

image.png

This closes this task request by @surpassinggoogle. This adds the 'U-Promote' button in ulog posts and adds the same and the delegate buttons to comments of certified uloggers, plus a bug fix in the ulog editors.

1. Repository

https://github.com/surpassinggoogle/UlogsV2

2. Task Request/Issue

https://steemit.com/utopian-io/@surpassinggoogle/task-request-kindly-help-us-create-a-page-portal-called-grow-on-ulogs-org-etc-additional-bounty-of-70-steem
https://github.com/surpassinggoogle/UlogsV2/issues/195

3. Pull Requests

https://github.com/surpassinggoogle/UlogsV2/pull/232
https://github.com/surpassinggoogle/UlogsV2/pull/233
https://github.com/surpassinggoogle/UlogsV2/pull/234
https://github.com/surpassinggoogle/UlogsV2/pull/237
https://github.com/surpassinggoogle/UlogsV2/pull/239

4. Testing

These were the tests manually done via Chrome:

  1. U-Promote button in Posts
    • U-Promote button should display under the posts of certified uloggers
    • Clicking the U-Promote button should display a 'coming soon' message
  2. U-Promote and Delegate buttons in Comments
    • Delegate and U-Promote buttons should display under the comments of certified uloggers
    • Clicking the U-Promote button should display a 'coming soon' message
    • Click on the delegate button should display a dropdown with pre-determined amount of SP delegations

5. Implementation

5.1. Refactor and Bug Fix for Displaying One-Liner or Two-Liner Announcement Banner

5.2. Bug Fix for Operator Precedence

  1. src/client/Wrapper.js - refactored the banner code as a new AnnouncementBanner.js component
    image.png
  2. src/client/announcements/announcement.js - removed the displayBanner1 and displayBanner2 flags and instead just used the message1 and message2 to determine if a one-liner or two-liner banner should be displayed
    image.png
  3. src/client/components/AnnouncementBanner.js - new component to make the codes in Wrapper.js more concise and readable

5.3. Add U-Promote to Post + Add U-Promote and Delegate to Comment

  1. src/client/components/CommentFooter/Buttons.js - added the delegate and u-promote buttons to comment footer's buttons
    image.png
  2. src/client/components/CommentFooter/DelegateButton.js - new delegate button added to comment footer
  3. src/client/components/Story/StoryFull.js - add the u-promote button to a post's footer

5.4. Final Touches

  1. src/client/components/AnnouncementBanner.js - change the banner's close icon to white to make it blend with the blue background
    image.png
  2. src/client/components/Story/StoryFull.js - make the u-promote button auto-shrink with the topic tags
    image.png

5.5. Ulog Editors Draft Auto-Save Bug Fix

  1. src/client/post/Write/editorActions.js - use the post's editorUrl property to decide which editor to load after a draft is saved
    image.png

6. Feature in Action

6.1. U-Promote

upromote.gif

6.2. Editor Draft Auto-Save

editor-draft-auto-save-bug.gif

7. Lesson Learned

Do peer reviews. The refactor for the AnnouncementBanner component was triggered by a code review done by @codingdefined in this post.

So peer reviews, when done right, improves quality.

8. GitHub Account

https://github.com/eastmaels

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

Sort:  
  • Great article with lots of images, code samples and explanations.
  • The code could use more comments throughout.
  • I'm also all in with peer reviews, good job.

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? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @helo! 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!

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.077
BTC 63763.42
ETH 1660.59
USDT 1.00
SBD 0.42