Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

refactor(theme): QueryaColors and context.colors instead of shadcn's ColorScheme (#1465)

Đang mở
#1,730 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
55/100
Loại issue
Tái cấu trúc
Độ 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
frontend

Hướng nghiên cứu

Start with lib/core/theme/querya_theme.dart and querya_theme_scope.dart to see how QueryaTheme, ThemeData, and the existing context extensions are assembled. Add QueryaColors with the listed fields, copyWith, and lerp, then expose context.colors; add unit tests for light and dark defaults, imported themes, and interpolation at 0 and 1. Done means the values match today's scheme and no callers are migrated or visuals changed.

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

Mô tả

frontend P2 theme ui

Part of #1465 (step 3a). Prerequisite for the per-folder migration (#1731).

Problem

The app's colours are shadcn's: typedef QueryaThemeColorScheme = ColorScheme; (lib/core/theme/querya_theme.dart), built into shadcn's ThemeData, and read as Theme.of(context).colorScheme.x (shadcn Theme). A probe on dev (2026-10-18) counts 164 Theme + 42 shadcn.Theme and 116 ColorScheme + 24 shadcn.ColorScheme uses that need shadcn.

Only these fields of the scheme are read in lib/ (counts of cs. / colorScheme. uses):

field uses
mutedForeground 190
primary 160
border 115
foreground 104
destructive 104
muted 81
card 46
background 41
popover / popoverForeground 29
ring 6
secondary / accent 6
chart1..chart5 6
Change
  • QueryaColors in core/theme (immutable, copyWith, lerp) with exactly those fields, built from QueryaTheme the way the shadcn scheme is today (same values, so nothing changes on screen).
  • context.colors next to context.workbench / context.editorTheme in querya_theme_scope.dart.
  • While the migration runs, the shadcn ColorScheme is still produced from QueryaColors for the widgets that need it; it goes with the shell (#1735).
  • Unit tests: dark and light defaults equal today's scheme field by field; lerp at 0 / 1.
Acceptance
  • QueryaColors and context.colors exist and give today's colours in both default themes and in an imported theme.
  • No caller migrated yet (that is the next issue); no visual change.
Ngôn ngữ chính
Dart
Star
23
Fork
1
Merge trung bình
31 phút
Pull request đã merge (30 ngày)
570

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 QueryaHub/Querya-Desktop

Tất cả issue của QueryaHub/Querya-Desktop

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.