As per the requirement, I have implemented the feature to order the comments according to the number of upvotes, downvotes, and user type. The comments with more upvotes are displayed first, followed by the comments with equal upvotes and fewer downvotes. Also, the comments with expert user type always have top priority and are displayed as the first comments.
Steps to reproduce:
Load the page with the comment section
The comments should be displayed in the above-mentioned order
Expected result:
The comments should be displayed in the order mentioned above
Actual result:
The comments are displayed in the required order
Notes:
I have tested this feature on multiple devices and it is working as expected. Please let me know if you have any issues or concerns regarding this feature.
Description:
As per the requirement, I have implemented the feature to order the comments according to the number of upvotes, downvotes, and user type. The comments with more upvotes are displayed first, followed by the comments with equal upvotes and fewer downvotes. Also, the comments with expert user type always have top priority and are displayed as the first comments.
Steps to reproduce:
Load the page with the comment section The comments should be displayed in the above-mentioned order
Expected result:
The comments should be displayed in the order mentioned above
Actual result:
The comments are displayed in the required order
Notes:
I have tested this feature on multiple devices and it is working as expected. Please let me know if you have any issues or concerns regarding this feature.