Session card widget from the generated Session model with fake data
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 91/100
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
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
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DevDogsUGA/DogPack
-
onboarding
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
DevDogsUGA/DogPack#10 ·
-
good first issue onboarding
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
DevDogsUGA/DogPack#8 ·
-
good first issue onboarding
Difficoltà 2/5 1-3 ore Idoneità per principianti 91/100
DevDogsUGA/DogPack#7 ·
-
good first issue polish
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
DevDogsUGA/DogPack#4 ·
-
good first issue polish
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
DevDogsUGA/DogPack#3 ·
Tutte le issue di DevDogsUGA/DogPack
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
apache/rocketmq-dashboard#6610 ·
I maintainer di solito rispondono entro 3 giorni
-
Team:Dashboards
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
elastic/kibana#297299 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
beginner friendly community contributions-welcome good first issue hacktoberfest help wanted ui up-for-grabs
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
affected/v17 affected/v18 area/frontend type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
umbraco/Umbraco-CMS#24186 ·
I maintainer di solito rispondono entro 2 giorni
-
area: ui difficulty: easy good first issue testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno