Design comparison
Solution retrospective
Hello all! This was fun.
I tried to hit all the bonus challenges listed in the project description:
- Create, Read, Update, and Delete comments and replies
- Bonus: If you're building a purely front-end project, use
localStorage
to save the current state in the browser that persists when the browser is refreshed. - Bonus: Instead of using the
createdAt
strings from thedata.json
file, try using timestamps and dynamically track the time since the comment or reply was posted.
Expected behaviour
- First-level comments should be ordered by their score, whereas nested replies are ordered by time added.
- Replying to a comment adds the new reply to the bottom of the nested replies within that comment.
- A confirmation modal should pop up before a comment or reply is deleted.
- Adding a new comment or reply uses the
currentUser
object from within thedata.json
file. - You can only edit or delete your own comments and replies.
Thanks!
Community feedback
- @anoshaahmedPosted almost 3 years ago
To get rid of the accessibility/HTML issues shown in your Report:
- have at least one
<h1>
in your code - add different
alt=""
to your<img>
tags <button>
should have anaria-label
... Click here to read more<input>
should have corresponding<label>
Great job! :)
Marked as helpful1 - have at least one
- @BinarySenseiiiPosted almost 3 years ago
everything is good mate but one problem i found is upvoting user can vote only one time whether it's increment or decrement, in your solution user can increment infinite which make no sense
1@BenjaDotMinPosted almost 3 years ago@BloodySteps Hey! Thank you so much for your feedback. The ability to continually up/down vote the comments are to show the re-ordering of the comments based on their scores. As this is based on localStorage, if I was to limit it to one vote per person, there would be no way to show the ordering functionality (although the inner reply order is based on date created, as per the brief). But in a "real world app" you are absolutely right, that would make no sense.
I appreciate the kind words!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord