github-samples / github-samples/pets-workshop
full-day workshop: Include the page data owner in the filter exercise
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 80
- Forks
- 161
- Avg merge
- 31m
- Merged PRs (30d)
- 1
Description
Problem
Step 6 says filtering requires the Flask backend, tests, and Astro frontend, but tells learners to supply only:
app/server/app.pyapp/server/test_app.pyapp/client/src/components/DogList.astro
app/client/src/pages/index.astro owns the /api/dogs request, reads URL query parameters, and renders pagination. DogList.astro only renders the dogs prop. Omitting the page owner encourages a partial implementation that cannot reliably connect controls to server-side query parameters or preserve pagination behavior.
Suggested change
Include index.astro in the prescribed context and add implementation-agnostic behavior checks.
Acceptance criteria
- Step 6 includes
app/client/src/pages/index.astroin Copilot context. - The prompt requirements describe how control changes reach the API.
- Breed-only, availability-only, and combined filtering are validated.
- Clearing filters restores the full list.
- Filter changes handle the current page deliberately, such as resetting to page 1.
- Updated unit tests prove endpoint filtering rather than only the original response shape.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Step 6 workshop instructions and inspect app/server/app.py, app/server/test_app.py, app/client/src/pages/index.astro, and app/client/src/components/DogList.astro. Update the prescribed context and behavior requirements so API-connected filtering, clearing, and page handling are explicit, then run the updated unit tests to verify endpoint filtering for breed-only, availability-only, and combined cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python
- Domain
- documentation, testing
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100