Finally Comments is an embedable comments system powered by the Steem blockchain. Use any comments thread attached to a steemit post on any website. Users can comment and vote as they usually would. The aim of this project is to promote the Steem ecosystem by breaking the comments system out of the walls of Steem based apps replacing popular comments systems like Disqus & Facebook comments plugin.
Sort comments by Newest, Oldest and Top Value
I'm pleased to add one of the major missing fetaures. At the top right hand corner of the comments thread there is a now a simple dropdown that includes "Oldest First", "Newest First" & "Top Value". I have left the default as Oldest first.
I am unsure on which is the best to have as the default, let me know which you think should be the default order.
The latest version fixes a number of different issues that have arose since the previous release.
Off-by-one on total comment count
getState() function to retrive all of the comments for a particular thread also has the top post within it's data with a post depth of 0. I had ignored the top level post when showing the comments directly but not when calculating the total number of posts. This was not obvious with any thread with many comments but on a new thread always showed 1 comments when it shoudl show zero.
Show if voted on top level post id
Now when logged in the top level post will display if it has already been voted and disable the action if it has. Voted posted have a dark grey fill for the upvote icon and are not clickable.
Correct redirect on logout
Thanks to @oups for finding this bug. previously the logout button would redirect to the route url of finallycomments.com. This looks like inception on finallycomments.com and completely broken on third party sites. The current comments thread is now stored and passed through to the server on logout so it redirectly correct back to the same page in the loggedout state.
Custom settings now work cross-domain
When accessing an iframe on the same orgin it is possible to use
window.frameElement to access atrributes of the iframe tag from inside of the frame. I was using this method to detect the custom setting for the embed without realising once on a different domain than finallycomments.com this would no longer work. I've changed to now use
window.postmessage to send the settings to the child iframe. Setting are added to the embed, auto generated via finallycomments.com to be true by default.
data-reputation="true" - Control if the reputation value shows in the UI
data-values="true" - Control if the vote $ values show in the UI
data-profile="true" - Control if the profile overlay (on click) show in the UI
Correct vote value
Vote value to show pending payout for first 7days and total payout value after. When first developing I had used the pending value forgetting this is reduced to 0 after payout. Fixed to show both.
The aim for the next update is to include 'autogeneration of comment threads' so finally comments can be used without needing a previously generated post/steemit url to work from. I'm confident this is possible in an elgant way.
Better documention/examples. I realise it's probably not clear enough what finally comments is or how to use it for a non technical person, this needs to be better asap.
As always let me know if you have any ideas for finally comments and or if you see any issues please do let me know.
Posted on Utopian.io - Rewarding Open Source Contributors