Finally Comments - Sorting Comments & Fixes
utopian-io·@sambillingham·
0.000 HBDFinally Comments - Sorting Comments & Fixes
 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. ## New **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. ## Fixes The latest version fixes a number of different issues that have arose since the previous release. ### Off-by-one on total comment count Using the `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. ## Next/RoadMap 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. # Ideas/Suggestions/Contributions 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. <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@sambillingham/finally-comments-sorting-comments-and-fixes">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>
👍 sambillingham, steemitstats, cryptomatters, walnut1, rayday, pcusine, fivealive55, oups, cutemachine, st3llar, emrebeyler, gokulnk, slaydraye, pixelfan, anonimnotoriu, jjay, cryptonik, anomaly, critday, jeffbernst, sondip, steemnews-fr, bijoydeb, shaffrimohd, ryacha21, joe.backpacker, bryan-imhoff, mslifesteem, cifer, amosbastian, zapzap, peteveale, utopian-1up, flauwy, mahdiyari, simonluisi, tradeownsystems, stoodkev, ansonoxy, jamesbarraclough, espoem, nathalie13, not-a-bird, bitopia, berkaytekinsen, family.app, maphics, proffgodswill, sweeverdev, howtosteem, thatmemeguy, ronimm, mufasatoldyou, dysc0rd, makrotheblack, thinkkniht, onos, mahmuddin, jesdn16, kslo, navx, varja, dethclad, sebastiengllmt, neexal, zlatkamrs, bobsthinking, funkylove, rhotimee, deejee, yeswanth, photohunter1, photohunter2, photohunter3, photohunter4, roj, nightdragon, arellanoyan, opulence, dexter24, zay-arasi, dyancuex, ilyastarar, herman2141, xtramedium, luisrod, smafey, timmyeu, maaz23, zoneboy, steaknsteem, parag, kimaben, ilovekrys, yourmercury, acrywhif, layanmarissa, isacastillor, solomon507, patatesyiyen, rsteem, onin91, isabella394, zinonweke, emailbox19149, emirfirlar, lemony-cricket, exploreand, petvalbra, olayhemy, photohunter5, sylinda, fmbs25, livsky, badmusazeez, aderemi01, killbill73, amirdesaingrafis, fai.zul, aliyu-s, mirna98, flinter, heshe-f, donjyde, crispycoinboys, bluestorm, pepememes, ozcanpolat, flugbot, jfuenmayor96, sayed53, eleonardo, zohaib715, handfree42, carsonroscoe, anmeitheal, kaking, josh26, reazuliqbal, daszod, jayo, animesukidesu, derasmo, anime.lovers, steemlore, studytext, drigweeu, toninux, neneandy, utopian-io, odibezeking, mrmaracucho, michelios, hillaryaa, idlebright, adhew, williams-owb, jrmiller87, cashthekush, gwapoaller, genoner, qberry,