Skip to content

Conversation

@parsa-tehranipoor
Copy link
Contributor

@parsa-tehranipoor parsa-tehranipoor commented Feb 10, 2025

Summary

This pull request addresses various bugs pertaining to reviews displayed on apartment pages. This PR builds upon my first PR for fixing an issue revolving around users' self-liking their own reviews and includes more bug fixes for fixing rendering issues and making changes to review categories. Addressing comments on this PR and re-committing kea-roy's changes, which were accidentally overridden, are the only things left for this PR.

  • Fixed the "likeHandler" method to stop users from liking their own reviews
  • Removed Communication and Value rating categories on reviews
  • Re-render page after review deletion or edits
  • Apartment Card shows most liked review
  • Re-commit Kea-Roy's fixes to lint errors
  • Fix visual bug for self-liking reviews

Test Plan

To test the first task, one user is required to create a comment and attempt to like it and see that it fails.
Screenshot 2025-02-09 at 11 49 53 PM

For the second one, I checked that all data on the 'communication' and 'value' categories for reviews were removed from the codebase through find and replace. Also checked that the formatting for displayed categories is
Screenshot 2025-03-02 at 11 39 37 PM### Notes

For the third task, check that after a review deletion or edit, a toast notification pops off, and the review disappears.
Screenshot 2025-03-02 at 11 43 30 PM
Screenshot 2025-03-02 at 11 43 33 PM
Screenshot 2025-03-02 at 11 44 42 PM
Screenshot 2025-03-02 at 11 44 46 PM

For the fourth task, I checked whether or not the most liked review was the one displayed on the apartment scroll page
Screenshot 2025-03-02 at 11 47 53 PM
Screenshot 2025-03-02 at 11 48 07 PM

Breaking Changes

@dti-github-bot
Copy link
Member

dti-github-bot commented Feb 10, 2025

[diff-counting] Significant lines: 69.

@CLAassistant
Copy link

CLAassistant commented Feb 10, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ kea-roy
✅ ggsawatyanon
❌ Parsa Tehranipoor


Parsa Tehranipoor seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@parsa-tehranipoor parsa-tehranipoor requested review from CasperL1218, dan-ieljin and ggsawatyanon and removed request for dan-ieljin February 12, 2025 18:22
@kea-roy
Copy link
Member

kea-roy commented Feb 16, 2025

PR Changes

  • Removed exists import
  • Cleared warnings from lint by adjusting == to ===

@parsa-tehranipoor parsa-tehranipoor changed the title WIP: Fixing Self-like Bug on Reviews Fixed Self-like Bug on Reviews Feb 20, 2025
Copy link
Contributor

@ggsawatyanon ggsawatyanon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix was effective in no longer allowing users to like their own review as requested in the bug. However, as the "Helpful" button is still active, when a user clicks the like button on their own review, the button still reacts to their click visually but does not increment the likes count. While this does fix the bug, it would be clearer for users if you could disable the button too for their own reviews – this would still display the button visually but when a user clicks the button, it does not visually react (i.e. turn gray). Good job on one of your first bug fixes on CUApts, though! Keep going :)

@parsa-tehranipoor parsa-tehranipoor changed the title Fixed Self-like Bug on Reviews WIP: Multiple Bug Fixes for Reviews on Apartments Mar 3, 2025
@ggsawatyanon
Copy link
Contributor

It seems the button is still not disabled (visually disabled) when liking your own review. See below for a video demonstration of the button still visually reacting to liking your own review. I would reccomend doing this by conditionally altering the CSS class or style depending on whether the review is your own review or not. We can discuss this in further details during work sesh!

button.mov

@ggsawatyanon ggsawatyanon changed the title WIP: Multiple Bug Fixes for Reviews on Apartments Multiple Bug Fixes for Reviews on Apartments Apr 17, 2025
Copy link
Contributor

@ggsawatyanon ggsawatyanon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I reviewed before, this PR look good. I'm going to approve this to deploy the bug fixes but for the future we'll visually disable the button for users' own reviews

@ggsawatyanon ggsawatyanon merged commit 6e86481 into main Apr 17, 2025
4 checks passed
@ggsawatyanon ggsawatyanon deleted the bugs-in-reviews branch April 17, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants