rubyforgood / mutual-aid

Mutual aid management platform for groups who build, support, and strengthen community resilience.
https://github.com/rubyforgood/mutual-aid/projects/4
MIT License
54 stars 61 forks source link

Change button text on Claim page for Ask #988

Closed wildmaples closed 2 years ago

wildmaples commented 3 years ago

Why

Hi! I'm new here. This is my PR to modify the button text for Asks: https://github.com/rubyforgood/mutual-aid/issues/871

Screen Shot 2021-10-04 at 9 20 06 PM

What

I've changed the button copy for claiming listings. When it's an ask, copy is Help this person (proposed change in https://github.com/rubyforgood/mutual-aid/issues/871) and when it's an offer Claim this offer (no change from previous version).

How

Because both Offer and Ask inherit from Listing, I've created a method Listing#claim_button_text that can be called by both types and returns the correct button copy.

Testing

This is a pretty minor UI change but I've written a spec that covers both cases.

Next Steps

N/A

Outstanding Questions, Concerns and Other Notes

N/A

Accessibility

This change doesn't affect or worsen the existing accessibility.

Security

I don't think this change has any security implications.

Meta

N/A

Pre-Merge Checklist

solebared commented 3 years ago

@wildmaples , looks like there are a couple of minor rubocop errors. Mind taking a quick look?

wildmaples commented 2 years ago

@exbinary Sorry for the delay -- done! ✅

solebared commented 2 years ago

Thanks @wildmaples !