[busy.org] No comments message is showing up when there is a comment

in #utopian-io6 years ago

Project Information

Repository : https://github.com/busyorg/busy
Platform : http://busy.org

Expected behavior

"There are no comments yet" shouldn't display after a comment is posted.

Actual behavior

If a post has No comments and a comment is entered, post still shows "There are no comments yet" message along with newly entered comment.

How to reproduce

  • Find a post with no comments.
  • Open the post and scroll to the bottom.
  • You will see a message stating There are no comments yet.
  • Enter a new comment, you will see your new comment right underneath There are no comments yet.
  • Up-voting a post, removes the message.

Recording of the issue

Technical Analysis

I am not a React developer but this seems to the buggy piece of code: Comments.js

{parentPost.children === 0 && (
  <div className="Comments__empty">
    <FormattedMessage id="empty_comments" defaultMessage="There are no comments yet." />
  </div>
)} 

This condition to show comment should be dependent on commentsToRender.length. This way whenever a comment is displayed, this message will hide. parentPost object doesn't seem to be getting updated when a comment is entered.

  • Browser: Google Chrome ( 66.0.3359.181 Version)
  • Operating system: OSX 10.11.6

Proof Of Work Done

Github profile
Problem Report

Sort:  

Thank you for contributing to Utopian!

I was able to reproduce this error on my machine.

Your format was good, recording was well made. The behavior itself I'm afraid doesn't have any meaningful impact on user experience. Besides that it is great report and I hope to see many like it in the future.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thanks for your review. I agree that the issue was trivial but i have a bit of ocd when i see things like that.

Hey @mightypanda
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.18
TRX 0.15
JST 0.029
BTC 61949.37
ETH 2415.67
USDT 1.00
SBD 2.65