I have been involved (voluntarily) with the development of the Condenser & Wallet apps (that are powering https://hive.blog and https://wallet.hive.blog) for quite a while now. There are other great frontends to Hive out there such as https://peakd.com and https://ecency.com but I have always been more or less faithful with the Condenser.
This is a regular report on my new contributions. Some of the new work below might still be in test and not yet deployed.
Fix links sometimes broken due to @
Issue raised by @rishi556: https://gitlab.syncad.com/hive/condenser/-/issues/113
Links with an @ followed by a slash fail to properly get highlighted. Ex: http://firstname.lastname@example.org/name-test fails to get highlighted. Along with that, any link that has an @ in it breaks the link with anything after the @ attempting to go to a user's profile and everything before it being highlighted.
See example in: /@sn0n.dev/name-test
This is tiny fix of the regular expression that is responsible for detecting user mentions in the body of a post.
Pre-select cover image when editing an existing post
I've previously added a cover image selector in the post editor, however, I forgot to preselect the current cover image when you are editing an existing post. It's also a small fix but I've also took the opportunity to cleanup the code to unify the coding standard and best practices where I can in the files I work on.
Handle posts without image in the post list
@jackmiller was found that posts without images on the list of posts don't look great and I have to say that I kind of agree. Although it's minor, it's still does not look great:
As you can see above, two posts are missing a thumbnail which is not that bad but not that great either. So the suggested idea was to use the user's own avatar instead as shown below:
Fix Youtube video preview image ratio.
The issue was due to the CSS code trying to extend the video player to 100% width while having a fixed height in pixel. So instead of having the video 100% I just let it the size it should be which was 640 x 360 px and centered the player:
Fix image URL proxifier
@themarkymark raised an issue where old images from the Steemit era were sometimes not showing. I discovered that some of the code were still using the steemitimage.com domain name for transforming image URL into an image proxy URL. The code has now been fixed along with unit tests.
Code clean up
What bothered me for a while was that code linting were not taken advantage of in the CI/CD pipelines. This is due to the fact that the code we inherited were not always following the specified coding standard and some libraries were conflicting one another. Ideally, new codes should not be allowed to be deployed until they pass unit tests and ESlint.
So I've decided to try going through all the code and clean that up, I knew it was a big job but I didn't know it was going to be that big... After a first attempt, I managed to fix something like 500+ issues and was excited when I completed it but it was only to realise that the current linting config was only checking for
.js files not
.jsx ones which we have more of and those are also more complicated to fix. After re-configuring the linting, I discovered there were 3 or 4 times more issues to be fixed. So this is going to be an on going task.
WIP Merge request: https://gitlab.syncad.com/hive/condenser/-/merge_requests/197
Vote for my witness
On Hive, Witnesses are playing the important role of providing a performant and safe network for all of us. You have the power to choose 30 trusty witnesses to package transactions and sign the blocks that will go in the Hive blockchain. Vote for me via HiveSigner to support my work for the community.