What is Finally Comments?
Finally Comments is an embeddable comments system powered by the Steem blockchain. 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.
Today I have finally publish a number of fixes to both the Finally platform and the Javascript library. These issues have been hanging around for a couple of months. If you have followed other parts of my blog you'll know I was cycling across Europe. I have also been a little pre-occupied getting https://finally.network started.
Repository
Platform - https://github.com/code-with-sam/finallycomments
NPM Package/JS Library - https://github.com/code-with-sam/npm-finallycomments
Library Fixes - /npm-finallycomments/pull/8
The primary Issue I started digging into was with the universal embed code . When initialising the javascript library it should create an iframe using the data-id
attribute of the embed code. It took a little investigating to realise the url was being deconstructed and incorrect reconstructed again. Although this fix was fairly straight forward by creating a ternary statement(src/index.js#53) it lead to me discovering a number of other issues with the library.
The initialise function had been working correctly but using any other external functions when including the library directly failed. The exposed finallycomments
object was incorrect. Correctly assign export object instead of finally system to call external functions (/src/index.js/#131)
While working through these fixes I oppted to add a small page that worked directly with the local library and a local version of FinallyComments platform. /test/
have placeholders to check each dynamic function and test the three types of embeds. Should be replaced with some programatic tests but this is useful for debugging. testing example functions
Threads generated via the API or Finally dashboard are created as a comment under the @finallycomments account. When displaying these comment threads the top level comment is hidden as it is a placeholder only. The settings for generated
is checked to determine this. These settings values are added as html data-attributes and should therefore be checked as a string and not a boolean.
Platform Fixes /finallycomments/pull/47
When working on fixes for the platform I found I had completely missed passing the repsonse object to the relevant functions. Looking at the previous commits it seems I refacoted a set of code into a module without realising the variable scope for the response object would change. Simple fix although it always feels incorrect to pass the response object around. Perhaps the relevant data should be returned to the correct route instead 3f20f5205
Next I found issues with the beneficiary feature. First custom threads breaking when no beneficiaries were selected. Second, incorrect classes on the dashboard beneficiary inputs caused empty variables to be submitted.
There were a few smaller updates aded to keep FinallyComments running. Thanks for checking this update. If you encounter any other issues feel free to submit them via Github or directly to me on Discord [sambillingham#7927]