rubyforgood/shelter-assist

Potential foster can see multiple pages of dogs

Opened this issue · 4 comments

Notes

  • We’re going to build the “dogs” page bit by bit
  • Mock found here, though I expect it to take a few stories to get the page to look like this mock so follow the instructions on the Acceptance Criteria over the mock
  • The mock has 12 but if you’re feeling like it should be more on a page, go for it, eventually we’ll have a three across layout

User Story

As a person who wants to foster a dog
I want to see all fosterable dogs broken up by page
So that the page doesn’t take for-freaking-ever to load

Acceptance Criteria

GIVEN I am on the “Dogs” page
WHEN the page loads
THEN I see only 12 dogs
AND I see pagination at the bottom
GIVEN I am on the “Dogs” page
WHEN I click on the “2” on the pagination the page loads
THEN the page reloads 
AND I see the next 12 dogs

Can I work on this ticket?

We might need to work on the dog model first before this ticket can proceed. We don't have data to drive this page yet (it's currently done through mocks atm).

So this ticket is currently blocked.

I noticed that. It seems the mocked data needs to move to db/seeds.rb and the model probably needs a dogs scope and an age method to return a string based on birthdate. Maybe there should also be a new image_src column added to Animal. I think these are the only blocking concerns for this specific ticket, but is there anything else needed for the model right now?

Update: We merged the base of the Dog model into main. We're hoping to start modeling the database similar to what we rigged up a few weeks ago together here:

https://rubyforgood.slack.com/archives/C01ME0HHW5C/p1661881813693309

If you're available this coming Monday, we can figure out how we can delegate this so you can get started on this ticket.