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

Ouverte
#248 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
66/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
dart, flutter
Domaine
mobile, testing

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Dart
Étoiles
9
Forks
5
Merge moyen
49 min
PR mergées (30 j)
34

Préparer son environnement

  • Fournit un Dockerfile ou un fichier Docker Compose
  • Aucun modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de CommandLineCoding/Elephant

Toutes les issues de CommandLineCoding/Elephant

Issues similaires

Plus d'issues Dart

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.