Design system: extend tokens beyond color; consolidate copy-pasted button base styles
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- css, typescript
Hướng nghiên cứu
Start with the .btn-* rules in styles.css and compare them with the inline button styles in ConfirmDialog.tsx, PushDialog.tsx, NewTaskDialog.tsx, and EditProjectDialog.tsx. The issue also points to src/lib/fontScale.ts and several popover shadow locations; review these alongside the proposed token list to establish scope. Done means button base styles are consolidated and the proposed tokens and font-size routing are applied consistently, with the listed inline duplication removed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The design-token system covers color well (24 CSS vars, 12 presets, validated custom themes) but stops there — spacing, typography, radii, and shadows are raw literals spread across ~1000 inline style= objects, and button base styles are copy-pasted per dialog.
Measured state (adversarially re-counted):
- ~999 inline
style=occurrences in components (SettingsDialog.tsx162,NewTaskDialog.tsx65) encoding raw paddings/gaps/radii/font-sizes. - 25 distinct font sizes (17 px values + 8 em values); 13px ×101, 12px ×82, 14px ×78, with one-offs like 9/18/21/24/25/30/37px. No scale.
src/lib/fontScale.tssf(px)is an identity stub used in 24 files, while 58 other files write raw'font-size': '13px'— ifsf()ever becomes a real scaler, most of the app won't scale.- 11 distinct border-radius values; 12 distinct gap values; 16 box-shadow literals in styles.css + 9 inline — including four different "floating popover" shadows for one concept (
Dialog.tsx:121,CommitTreeOverlay.tsx:127,BranchCombobox.tsx:234,TaskAITerminal.tsx:433), despite--shadow-soft/--shadow-popexisting.
Button split-brain (the single most fragile pattern): .btn-primary/.btn-secondary/.btn-danger in styles.css define hover/active/focus states only (:1088-1139); the resting appearance (padding: '9px 20px', accent bg, radius 8px, 14px/500) is duplicated inline in ConfirmDialog.tsx:80-110, PushDialog.tsx:151-177, NewTaskDialog.tsx:~1393, EditProjectDialog.tsx:537,553 — with drift already visible (9px 18px vs 9px 20px). A padding change is an 8-file edit; any missed file silently forks the design. ConfirmDialog.tsx:102 also hardcodes '#fff' for danger text (should be a token).
Related: #160 (duplication audit) — this is the design-system slice of the same theme.
Proposed fix
- Move button base styles into the existing
.btn-*classes (they're already applied everywhere) and delete the inline copies — zero-risk, high-value first step. - Add a second token tier:
--space-1..6(2/4/8/12/16/24),--radius-sm/md/lg/full,--text-2xs..xl(10/11/12/13/14/17),--shadow-overlay. Consume incrementally from inline styles viavar()or shared constants — no need to abandon inline styles wholesale. - Route font sizes through
sf()(or the tokens) consistently so a future scale/OS-font-size feature is possible.
From a full design/UX audit (2026-07-07); adversarially verified, counts re-derived. Line numbers as of b342bbd (v1.12.0).
- Ngôn ngữ chính
- TypeScript
- Star
- 1k
- Fork
- 144
- Merge trung bình
- 4 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 28
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của johannesjo/parallel-code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
johannesjo/parallel-code#385 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Option to show usage as used instead of left, and potential further customization ideasCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
johannesjo/parallel-code#353 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
johannesjo/parallel-code#163 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
johannesjo/parallel-code#375 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Package as a PlatpakĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
johannesjo/parallel-code#374 ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của johannesjo/parallel-code
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ci
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ClickHouse/clickhouse-js#1248 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltĐang mởtechnik
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
AhmedNAgy25/analysor#25 ·
Maintainer thường phản hồi trong vòng 1 ngày