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

Đang mở
#248 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
66/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
dart, flutter
Lĩnh vực
mobile, testing

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Dart
Star
9
Fork
5
Merge trung bình
49 phút
Pull request đã merge (30 ngày)
34

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CommandLineCoding/Elephant

Tất cả issue của CommandLineCoding/Elephant

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.