Session card widget from the generated Session model with fake data
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 91/100
Research direction
Start with the setup steps in docs/getting-started/first-contribution.md, then add the widget in lib/widgets/session_card.dart and the fake data helper in test/support/fake_sessions.dart. Use SessionCardData as specified in the issue and cover all four states, truncation, and localized times in test/session_card_test.dart. Run flutter test test/session_card_test.dart; done means the acceptance checks pass without importing lib/generated/.
Written by the indexing model from the issue text.
Description
What to build
A SessionCard widget for the Discover list: course code, title, host name, time range, location, and seats (memberCount + 1 of capacity, because the host counts as a seat; see the comment in supabase/schemas/dogpack/tables/sessions.sql). States: open, full (shows "Full", no join affordance), cancelled (struck through, "Cancelled"), and past. The card takes a plain value class defined in its own file, SessionCardData (id, courseCode, title, hostName, startsAt, endsAt, location, memberCount, capacity, status), and does not import anything from lib/generated/. The generated models are git-ignored and CI's flutter job does not create them, so a widget that imports them would fail flutter analyze and flutter test in CI. The generated Sessions model carries only hostId, no host name and no course title join; a later Discover-feed issue maps query results (with the host name from the profile) into SessionCardData, so that mapping is out of scope here. Provide a fakeSessions() helper in test/support/ returning SessionCardData so the widget can be developed without a database.
Files
- new
lib/widgets/session_card.dart - new
test/support/fake_sessions.dart - new
test/session_card_test.dart
Acceptance
- Renders all four states; seats read "2 of 4 seats" style, and the host is counted.
- Long titles and locations truncate with an ellipsis; no overflow at 320 dp.
- Times display in the device's locale and time zone.
- Widget tests for each state; a golden is optional.
How to check
flutter test test/session_card_test.dart.
Before you start
Setup is in first contribution. Run flutter analyze and flutter test before you open the PR; both must pass. Keep the change to the files listed. Comment on this issue to claim it.
- Dominant language
- PLpgSQL
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from DevDogsUGA/DogPack
-
onboarding
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
DevDogsUGA/DogPack#10 ·
-
good first issue onboarding
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
DevDogsUGA/DogPack#8 ·
-
good first issue onboarding
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
DevDogsUGA/DogPack#7 ·
-
good first issue polish
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
DevDogsUGA/DogPack#4 ·
-
good first issue polish
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
DevDogsUGA/DogPack#3 ·
All issues in DevDogsUGA/DogPack
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
opensearch-project/OpenSearch-Dashboards#12937 ·
Maintainers usually reply within 2 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
swiftlang/swift-org-website#1565 ·
Maintainers usually reply within 1 day
-
status: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
a2ui-project/a2ui#3158 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
hemilabs/ui-monorepo#2475 ·
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
ImadSaddik/ImadSaddikWebsite#336 ·
Maintainers usually reply within 1 day