-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Make title bar icons more visible, match brand colors #5582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dc669ab
d2e61ef
34bdb1f
78d767d
a1d8ff1
9bc7fb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "kilo-code": patch | ||
| --- | ||
|
|
||
| Use brand-colored Kilo Code icons throughout the extension for better visibility |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,21 @@ | ||||||
| import React from "react" | ||||||
| import React, { useState, useEffect } from "react" | ||||||
|
|
||||||
| const getIsLightThemeFromEditor = () => | ||||||
| document.body.classList.contains("vscode-light") || document.body.classList.contains("vscode-high-contrast-light") | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: Potential
Suggested change
|
||||||
|
|
||||||
| export const KiloLogo = () => { | ||||||
| const [isLightTheme, setIsLightTheme] = useState(getIsLightThemeFromEditor) | ||||||
|
|
||||||
| useEffect(() => { | ||||||
| const observer = new MutationObserver(() => { | ||||||
| setIsLightTheme(getIsLightThemeFromEditor()) | ||||||
| }) | ||||||
| observer.observe(document.body, { attributes: true, attributeFilter: ["class"] }) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: If
Suggested change
|
||||||
| return () => observer.disconnect() | ||||||
| }, []) | ||||||
|
|
||||||
| const fillColor = isLightTheme ? "#1a1a18" : "#f8f674" | ||||||
|
|
||||||
| return ( | ||||||
| <svg | ||||||
| id="Layer_2" | ||||||
|
|
@@ -14,7 +29,7 @@ export const KiloLogo = () => { | |||||
| <path | ||||||
| id="Logo_Outline_-_White" | ||||||
| data-name="Logo Outline - White" | ||||||
| fill="currentColor" | ||||||
| fill={fillColor} | ||||||
| d="M0,0v100h100V0H0ZM92.5925926,92.5925926H7.4074074V7.4074074h85.1851852v85.1851852ZM61.1111044,71.9096084h9.2592593v7.4074074h-11.6402116l-5.026455-5.026455v-11.6402116h7.4074074v9.2592593ZM77.7777711,71.9096084h-7.4074074v-9.2592593h-9.2592593v-7.4074074h11.6402116l5.026455,5.026455v11.6402116ZM46.2962963,61.1114207h-7.4074074v-7.4074074h7.4074074v7.4074074ZM22.2222222,53.7040133h7.4074074v16.6666667h16.6666667v7.4074074h-19.047619l-5.026455-5.026455v-19.047619ZM77.7777711,38.8888889v7.4074074h-24.0740741v-7.4074074h8.2781918v-9.2592593h-8.2781918v-7.4074074h10.6591442l5.026455,5.026455v11.6402116h8.3884749ZM29.6296296,30.5555556h9.2592593l7.4074074,7.4074074v8.3333333h-7.4074074v-8.3333333h-9.2592593v8.3333333h-7.4074074v-24.0740741h7.4074074v8.3333333ZM46.2962963,30.5555556h-7.4074074v-8.3333333h7.4074074v8.3333333Z" | ||||||
| /> | ||||||
| </g> | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WARNING: Chat logo may not update on VS Code theme switch
The light/dark choice is computed during render. If the user changes theme while the webview remains open, this component may not re-render, leaving the icon stuck. Consider subscribing to theme changes (e.g., observing
document.bodyclass changes like the Agent Manager logo does).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs the same logic as in KiloLogo i think? But cant we just use KiloLogo component here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markijbema - there must be some other listener, as this one updates automatically as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.