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
[x] Security & accessibility have been considered
[x] Tests have been added, or an explanation has been given why the features cannot be tested
[ ] Documentation and comments have been added to the codebase where required
[ ] Entry added to CHANGELOG.md if appropriate
[ ] Outstanding questions and concerns have been resolved
[ ] Any next steps have been turned into Issues or Discussions as appropriate
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
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 offerClaim this offer
(no change from previous version).How
Because both
Offer
andAsk
inherit fromListing
, I've created a methodListing#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