ULOG #20: Adding Announcement Banner + Extra Monetization

in #ulog5 years ago

image.png

This is another contribution to this task request by @surpassinggoogle. This adds the announcement banner and the 'extra monetization' checkbox to the 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/229
https://github.com/surpassinggoogle/UlogsV2/pull/230

4. Testing

Although there are no unit tests included in the code, all tests were manually done via Chrome covering the following:

  1. Announcement Banner
    • Load the home page
      • Banner should display on top
      • Banner should contain two links as defined in the github issue
    • Clicking on each of the link should display the appropriate ulog post
  2. 'Extra Monetization' checkbox

5. Implementation

5.1. Add Announcement Banner

  1. src/client/Wrapper.js - add the banner inside Layout.Header
    image.png
  2. src/client/announcements/announcement.js - added the constants that will define the content of the banner
    image.png

5.2. Add Extra Monetization Checkbox to Editors + Code Cleanup

  1. src/client/Wrapper.js - addedmessageComingSoon() to display a coming soon instead of javascript's alert
    image.png
  2. src/client/post/Write/Write.js
    • added a common handleExtraMonetization() function that will be passed down to each of the editors; this function will also display a 'coming soon' message
      image.png
    • added a getCertifiedUloggers() function that will get all certified uloggers

6. Feature in Action

banner+extra-monetization.gif

7. Lesson Learned

Code Refactor - one of the programming arts; changing codes without breaking any of the existing functionalities with the aim of reducing required effort to perform future changes.

8. GitHub Account

https://github.com/eastmaels

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

Sort:  

Thank you for your contribution. The post is of high quality as usual, with details about the changes, main code changes and lesson learned. Announcement Banner is actually a nice little feature to have in any application. Also whenever we do add some feature, it's always better to find a way to do some code refactoring.

What will happen if the displayBanner2 or displayBanner1 is false, even though it is false you showing the alert or am I missing something. https://github.com/surpassinggoogle/UlogsV2/pull/229/files#diff-105a0ee4a79800ce929a0e78481a9286R252


If you would like further explanation of the given score, please ask.


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 the feedback and code review @codingdefined.

What will happen if the displayBanner2 or displayBanner1 is false, even though it is false you showing the alert or am I missing something.

You're right, I missed that as well. There were multiple versions of this implementation and the last version I committed was not that polished.

What I had in mind was that if any of the banner flags were set, the banner should be displayed. But if only one was set, then a one liner banner should be displayed. And if both flags are false, then hide the banner. I'm working on this now.

The benefit of peer reviews.

That's great to know, Cheers !!!

Thank you for your review, @codingdefined! Keep up the good work!

excellent contribution that's a great thing you added :)

Thank you. Just doing what I can.

Posted using Partiko Android

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!

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

Dear eastmael:

We are SteemBet, the next generation STEEM based gaming platform. We are honored to invite you to join our first fantastic dice game, which is just the beginning of SteemBet game series. Our dividend system has now launched. The prize pool has already accumulated 2,000 STEEM and more than 60 players have participated in staking mining token SBT. A huge reward of 40,000 STEEM is awaiting! Join us NOW with other 500 STEEM users to loot HUGE dividend reward!!

SteemBet Team

Official Website
https://steem-bet.com

Discord Server
https://discord.gg/95cBN3W

Telegram Group
https://t.me/steembet

Coin Marketplace

STEEM 0.24
TRX 0.11
JST 0.031
BTC 61243.73
ETH 2974.21
USDT 1.00
SBD 3.69