feat: add comment options for custom coloring for internal, external, resolved#1766
feat: add comment options for custom coloring for internal, external, resolved#1766mattConnHarbour wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ab84ecc34
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // Read custom highlight colors from editor options, with defaults | ||
| const highlightColors = editor.options.commentsHighlightColors || {}; | ||
| const externalColor = highlightColors.external || '#B1124B'; | ||
| const internalColor = highlightColors.internal || '#078383'; | ||
| const resolvedColor = highlightColors.resolved || '#808080'; |
There was a problem hiding this comment.
Validate custom highlight colors before use
Custom colors are now accepted verbatim here, but getHighlightColor later appends an alpha suffix ('22'/'44') via string concatenation. That only produces valid CSS when the base color is a 6‑digit hex value; if a caller supplies a common CSS color like rgb(255,0,0) or #RRGGBBAA, the concatenation yields an invalid color string (e.g. rgb(255,0,0)22), so highlights won’t render. This only affects configurations that use non‑6‑digit hex strings; consider validating/normalizing to hex or converting to rgba(...) before appending alpha.
Useful? React with 👍 / 👎.
|
@harbournick closing this since we now have #1798 merged |
No description provided.