src/tailwind-preset.cjs drifted from tailwind-preset.ts — missing `info` and `chart` color scales
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- tailwindcss, typescript
Hướng nghiên cứu
So sánh các thang màu info và chart trong src/tailwind-preset.ts với src/tailwind-preset.cjs, và kiểm tra mục safelist border-info/40 gần dòng 603 của tệp .cjs. Cách sửa nhanh là sao chép các thang màu còn thiếu vào .cjs. Hoàn thành khi node -e "require('./src/tailwind-preset.cjs')" liệt kê info và chart dưới theme.extend.colors và theme đã resolve khớp với đầu ra đã biên dịch của .ts. Hãy xác nhận với các maintainer lựa chọn giữa sao chép nhanh và sinh .cjs từ .ts trước khi chọn phương án lâu dài.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
There are two copies of the Tailwind preset:
src/tailwind-preset.ts— source of truth. tsup compiles it todist/tailwind-preset.cjs/.js, which is what package consumers get via the./tailwind-presetexport. Complete.src/tailwind-preset.cjs— a hand-maintained CJS twin used only by this repo's owntailwind.config.js(presets: [require('./src/tailwind-preset.cjs')]) for dev/Storybook builds.
The info and chart color scales were added to the .ts in 5ef64bff (2026-01-24, Card expansion) but never mirrored into the .cjs, which has never had them.
Impact
- Consumers: none. The published preset is built from the
.tsand is correct. - In-repo dev/Storybook builds: the preset doesn't define
info-*/chart-*colors, so those utilities aren't generated from the preset. Notably the.cjssafelist even includesborder-info/40(~line 603) for a color it doesn't define.
Found while generating the mieweb-ui-tokens skill for #545 — the generator deliberately imports src/tailwind-preset.ts (via Node type stripping) specifically to avoid this drifted copy.
Fix options
- Quick: copy the
infoandchartscales from the.tsinto the.cjs. - Durable (preferred): eliminate the second copy — generate
src/tailwind-preset.cjsfrom the.ts(or pointtailwind.config.jsat a build output) so it can't drift again.scripts/rtl-scan.mjsalso reminds contributors to update "BOTH" files, which is the smell.
Verify
node -e "const p=require('./src/tailwind-preset.cjs'); console.log(Object.keys(p.theme.extend.colors))"listsinfoandchart- Storybook:
info/chartutilities render (e.g.bg-info-500,text-chart-1) - Diff the resolved theme of
.cjsvs compiled.tsto confirm zero remaining drift
- Ngôn ngữ chính
- TypeScript
- Star
- 2
- Fork
- 4
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 72
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 mieweb/ui
-
P5.3: Web-grounded agent entry point — llms.txt + published agent knowledge on ui.mieweb.orgĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
MIEUI R&D TicketĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 8/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
polarsource/polar#15580 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accepted bug via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
pingdotgg/t3code#20931 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug/1-unconfirmed kind/bug
Độ 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
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ranxianglei/billion-context#3583 ·
Maintainer thường phản hồi trong vòng 1 ngày