Finally Comments V0.8.x
Repository
https://github.com/code-with-sam/finallycomments
New Features
This update being Guest commenting and the needed infrastructure changes to make it work. The majority of the update was around PR15 with a few extra updates added in additional PRs.
On previous versions of Finally, click ‘Reply’ before having signed in would show a notification saying ‘Please Sign in’, now the user is shown the usual comment box but has the option to ‘Post as Guest’ or Sign in.
The process for adding Guest comments was a little more involved than I initially expected. Finally uses the STEEM blockchain as it’s data layer, pull information directly from the blockchain. Guest comments cause an issue because the exact purpose is to not need an account on the Blockchain.
Guest comments are stored separately in a database but still need to be attached in the comments thread. Guest comments also cannot be voted/earn rewards. I had previously not anticipated that when a STEEM authenticated user replies to a Guest, this can also not(at-least not in the traditional way) be stored on the blockchain. These different scenarios created three districted types of comments. STEEM Comments, Guest Comments and STEEM REPLY TO GUEST (these have STEEM User information but still can’t be voted).
STEEM comments - stored on the blockhcain and remain unchanged.
Guest Comments & STEEM REPLY TO GUEST - needed there own data models, routes, AJAX response and modified templates.
- Guest UI
- New AJAX routes etc
- Query new DB
- Append comments after AJAX success
- multi use comment template
Additional commits in full PR
User interface for Guest comments is kept as minimal as possible to provided a seamless comment system.
There is potential to store guest comments on the blockchain. Finally comments could broadcast ‘custom_json’ operations for each guest comment. @finallycomments or new account e.g @finallycomments-guest? could post on behalf of the guest. Both have limitations when Finally needs to scale but potentially worth thinking about.
I realised with this The next update needs to be Flagging and or moderation! I’ll work to add this in the next update to give authors more control over what is seen on FinallyComments embed.
Bug Fixes & Improvements
Finally was initially called steemcomments.js and worked by using hardcoded steemconnect signing links. Some of the namespaces and decisions from that have been hanging around. I’ve started to cut some code and refract in PR18 but it will require further work to bring it up to standard.
PR19 fixed a small sign-in but caused by the guest comment UI. The button was added dynamically and events needed to be attached correctly.
Ideas and contributions
Last week I post a roadmap for finally. If you’re interested in the development please take a look at that.
Feedback is always welcome, please let me know if you have thoughts on the Guest Comments feature.
Proof of Work Done
https://github.com/sambillingham
- MAIN PR - finallycomments/pull/15
- Additional PR2 - finallycomments/pull/18
- Additional PR2 - finallycomments/pull/19