Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Session card widget from the generated Session model with fake data

Aperta Adatta ai principianti
#14 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
91/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
dart, flutter, supabase
Ambito
frontend, mobile

Direzione di ricerca

Inizia con i passaggi di configurazione in docs/getting-started/first-contribution.md, poi aggiungi il widget in lib/widgets/session_card.dart e l’helper per i dati fittizi in test/support/fake_sessions.dart. Usa SessionCardData come specificato nell’issue e verifica tutti e quattro gli stati, il troncamento e gli orari localizzati in test/session_card_test.dart. Esegui flutter test test/session_card_test.dart; il lavoro è completato quando i criteri di accettazione sono superati senza importare lib/generated/.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

discover

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.

Lingua principale
PLpgSQL
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DevDogsUGA/DogPack

Tutte le issue di DevDogsUGA/DogPack

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.