[Bug] Difficulty Badge ignores its Accent Color field
維護者通常 1 天內回覆
評估
這個 Issue 還沒有評估資料。
描述
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.
- 主要語言
- TypeScript
- 星號
- 8
- 分支
- 4
- 平均合併
- 8 小時 44 分鐘
- 30 天內合併 PR
- 158
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
codercops/ogcops 的其他 Issue
-
[Bug] “Copy Recommended Meta Tags” generates an unusable placeholder image URL可能已有人在做 @CreatorguyS 於 3 天前認領。 未關閉bug enhancement
難度 2/5 1-3 小時 新手友好度 72/100
codercops/ogcops#378 · 4 則留言 ·
維護者通常 1 天內回覆
-
[Bug] Clipboard fallback reports success even when copying fails可能已有人在做 @srikar-naidu 於 3 天前認領。 未關閉bug
codercops/ogcops#384 · 3 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Preview checker: entity names like `&constructor;` decode to function source可能已有人在做 @amitsinha-cell 於 3 天前認領。 未關閉bug
codercops/ogcops#356 · 2 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Add the Do and Don't tutorial template (`tutorial-do-dont`)可能已有人在做 @Ravindar-Amogh-Gummadavelly 於 3 天前認領。 未關閉good first issue templates
codercops/ogcops#355 · 2 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
enhancement
難度 5/5 一週以上 新手友好度 30/100
codercops/ogcops#341 · 2 則留言 ·
維護者通常 1 天內回覆
相似的 Issue
-
Phone app shows Unknown for a remote machine whose key changed可能已有人在做 @janicduplessis 今天認領。 未關閉area: mobile priority: P3 type: bug
難度 1/5 1 小時以內 新手友好度 78/100
appandflow/stim#5006 · 1 則留言 ·
維護者通常 1 天內回覆
-
Area - Local to Cloud Bug
難度 2/5 1-3 小時 新手友好度 66/100
microsoft/vscode-mssql#23209 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
code-yeongyu/senpi#5713 · 1 則留言 ·
維護者通常 1 天內回覆
-
A-linter
難度 2/5 1-3 小時 新手友好度 73/100
oxc-project/oxc#28783 ·
維護者通常 1 天內回覆
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難度 1/5 1 小時以內 新手友好度 84/100
lingdojo/kana-dojo#33553 · 1 則留言 · 5 個 reaction ·
維護者通常 1 天內回覆