[Bug] Difficulty Badge ignores its Accent Color field
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Describe the bug
The Difficulty Badge template has an Accent Color field, but changing it does nothing. src/templates/tutorial/difficulty-badge.ts adds commonFields.accentColor to fields and sets a default of #E07A5F, but render never reads params.accentColor. The bar colours come from the fixed difficultyConfig (green, amber, red), and nothing else in the image uses the accent.
To Reproduce
- Go to https://og.codercops.com/create/tutorial?template=tutorial-difficulty-badge and open Customize
- Change Accent Color to anything
- The preview doesn't change
The API is the same: /api/og?template=tutorial-difficulty-badge&accentColor=%232563EB renders the same image as the default.
Expected behavior
Either the accent shows up somewhere in the image, or the template doesn't offer the field.
Actual behavior
The field is there and the image ignores it.
Environment
- Browser: Chrome
- OS: macOS
Additional context
Since the difficulty colours mean something, I'd remove accentColor from fields and defaults rather than recolour the bars, and add a test in tests/templates/ that the template doesn't expose it. If you'd rather keep it, I can use it for the duration pill instead.
- Ngôn ngữ chính
- TypeScript
- Star
- 8
- Fork
- 4
- Merge trung bình
- 8 giờ 47 phút
- Pull request đã merge (30 ngày)
- 157
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 codercops/ogcops
-
[Bug] “Copy Recommended Meta Tags” generates an unusable placeholder image URLCó thể đã có người làm @CreatorguyS đã nhận 2 ngày trước. Đang mởbug enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
codercops/ogcops#378 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Clipboard fallback reports success even when copying failsCó thể đã có người làm @srikar-naidu đã nhận 2 ngày trước. Đang mởbug
codercops/ogcops#384 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Preview checker: entity names like `&constructor;` decode to function sourceCó thể đã có người làm @amitsinha-cell đã nhận 3 ngày trước. Đang mởbug
codercops/ogcops#356 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add the Do and Don't tutorial template (`tutorial-do-dont`)Có thể đã có người làm @Ravindar-Amogh-Gummadavelly đã nhận 3 ngày trước. Đang mởgood first issue templates
codercops/ogcops#355 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
codercops/ogcops#341 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codercops/ogcops
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken links in the docsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🔊 a11y
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
betagouv/mon-entreprise#4726 ·
Maintainer thường phản hồi trong vòng 9 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Deltares/fews-pi-requests#357 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug confirmed js v6
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày