ULOG #20: Adding Announcement Banner + Extra Monetization
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:
- 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
- Load the home page
- 'Extra Monetization' checkbox
- When checking/unchecking the 'Extra Monetization' checkbox, it should display a 'coming soon' message
5. Implementation
5.1. Add Announcement Banner
src/client/Wrapper.js
- add the banner insideLayout.Header
src/client/announcements/announcement.js
- added the constants that will define the content of the banner
5.2. Add Extra Monetization Checkbox to Editors + Code Cleanup
src/client/Wrapper.js
- addedmessageComingSoon()
to display acoming soon
instead of javascript'salert
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
- added a
getCertifiedUloggers()
function that will get all certified uloggers
- added a common
6. Feature in Action
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
This post was made from https://ulogs.org
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.
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