rubyforgood / pet-rescue

Pet Rescue is an application making it easy to link adopters/fosters with pets. We work with grassroots pet rescue organizations to understand how we can make the most impact.
MIT License
61 stars 105 forks source link

Adopter Foster Dashboard - update the liked pets design #899

Closed kasugaijin closed 1 week ago

kasugaijin commented 2 months ago

Sign in as an adopter and then like some pets on the adoptable pets page. Then go to the dashboard and look at the Liked Pets link and you will see the liked pets. This issue is just to update the UI to make it look per the image below. Please use the existing avatar component. Please copy over the heart from the existing card along with the turbo stream so it will make the request to unlike or like the pet when you click the heart

Image

ErinClaudio commented 1 month ago

@kasugaijin Happy to start this one once the other is approved.

ErinClaudio commented 1 month ago

Gist

kasugaijin commented 1 month ago

Go for it! I would say for this we don't need to test, actually. So don't worry about that. I am not a fan of tests that couple closely with UI elements as they are a pain to manage when changing the UI at all.

ErinClaudio commented 1 month ago

@kasugaijin

I now have the heart functionality on the Liked Pets page working the same way as on the Pets page. This means that when you remove the heart, the image does not disappear, which might not align with the intended goal of using the stream functionality in this context. Would you like me to change this behavior so that the image disappears when the heart is removed, or should I leave the functionality as it is?

https://github.com/user-attachments/assets/342f5146-2dcd-4942-904b-3afa28ae35fb

kasugaijin commented 1 month ago

Hey @ErinClaudio let's just leave as it is. We can always add in the broadcast later to update the page, but that does add additional overhead (and I suspect some undesirable overhead because it requires we touch a model) and at this stage for MVP it's not necessary.

ErinClaudio commented 1 week ago

@kasugaijin I believe this can be marked complete per https://github.com/rubyforgood/pet-rescue/pull/912