Repository
https://github.com/surpassinggoogle/UlogsV2
Task Request
Pull Requests
Implementation
https://github.com/surpassinggoogle/UlogsV2/pull/125 - the base codes. Add a dropdown button to the StoryFooter's Buttons component and add a predetermined list of fixed SP values.
Refactors
https://github.com/surpassinggoogle/UlogsV2/pull/133 - updated the Custom SP link and display it as an input field
https://github.com/surpassinggoogle/UlogsV2/pull/135 - extract the Delegate codes and define it as a react component
Bug Fixes
https://github.com/surpassinggoogle/UlogsV2/pull/127 - display Delegate button only to certified uloggers
https://github.com/surpassinggoogle/UlogsV2/pull/130 - rollback a portion of a previous commit and use the latest codes from steemscript that includes app info for ulogs instead of a released (v1.0.2) version.
https://github.com/surpassinggoogle/UlogsV2/pull/137 - add handling (flag) to control display of Delegate button in the feed and the post
https://github.com/surpassinggoogle/UlogsV2/pull/138 - added condition to display button to certified uloggers
As written in the PR list above, this contribution is a mix of new codes, refactor, and bug fixes. After creating the badge, certified uloggers now get this perk of allowing other people to delegate to them.
Developing this feature took a lot of trial and error because of a limitation I encountered when using a SubMenu component cascading from a Dropdown's Menu.
The Custom SP input worked when the dropdown menu was displayed directly under the delegate button, but loses this intended behavior when the SP values were displayed as a SubMenu - it automatically closes the SubMenu when you click on the Custom SP input field.
I also had a hard time understanding how busy displays posts in a modal dialog and why the dropdown menu does not display in it. I'm suspecting it's related with z-index. This is for further investigation.
Feature in Action
Lesson Learned
I thought this feature was a simple adding of a Delegate component to StoryFooter, but looking at the history of the PRs, that was not the case.
To provide a better user experience, I decided to enable it on the feed where it functions properly and disabled it inside a post (modal and non-modal).
Not everything goes as planned. Sometimes you need to compromise.
GitHub Account
This post was made from https://ulogs.org