[CHORE]: Script to render every screen in every theme to PNG

Aperta
#248 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
66/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
dart, flutter
Ambito
mobile, testing

Direzione di ricerca

Read mobile/test/ui_smoke_test.dart for the provider setup and sample data, then inspect mobile/assets/fonts/Inter/ and the Flutter test APIs for capturing images. Build a test-based script covering the listed screens, themes, and sizes, with PNG output outside the repository; document how to run it in CONTRIBUTING.md. Done when the requested screens can be rendered with the bundled fonts and the instructions work for UI pull requests.

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

Descrizione

area: mobile chore difficulty: medium testing

Context

While redesigning the app (#224) it was very useful to render every screen, in every theme, to PNG files with sample data and the real Inter font, and look at them side by side. That made layout problems obvious without a phone (one of them became #240). The script that did this wasn't committed.

What to do

  • Add a test-based script (e.g. mobile/tool/screenshots_test.dart, not run by default flutter test) that renders the main screens (sign-in, register, chat list, chat, group chat, contact and group info, new chat, settings pages) with sample data.
  • Load the bundled Inter font and Material Icons, so text renders properly instead of the test font.
  • Choose themes and sizes by environment variables, e.g. THEMES=frost,nebula, and write the PNGs to a folder outside the repo.
  • Document how to run it in CONTRIBUTING.md, for UI pull requests.

Where to look

mobile/test/ui_smoke_test.dart already sets up the providers and sample data; mobile/assets/fonts/Inter/.

Good to know

Capture with a RepaintBoundary around the app and toImage() inside tester.runAsync. Screens with entrance animations need a few seconds of pump first.

Lingua principale
Dart
Stelle
9
Fork
5
Merge medio
49m
PR unite (30g)
34

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 CommandLineCoding/Elephant

Tutte le issue di CommandLineCoding/Elephant

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.