Skip to content

fix(amazonq): update chat color classes #5707

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

Merged
merged 2 commits into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
val warning: Color,
val error: Color,

val cardBackground: Color,

val editorFont: Font,
val editorBackground: Color,
val editorForeground: Color,
Expand All @@ -49,5 +47,5 @@
val editorKeyword: Color,
val editorString: Color,
val editorProperty: Color,

val editorClassName: Color,

Check warning on line 50 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/AmazonQTheme.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/AmazonQTheme.kt#L50

Added line #L50 was not covered by tests
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
FontFamily("--mynah-font-family"),

TextColorDefault("--mynah-color-text-default"),
TextColorAlt("--mynah-color-text-alternate"),

Check warning on line 16 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/CssVariable.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/CssVariable.kt#L16

Added line #L16 was not covered by tests
TextColorStrong("--mynah-color-text-strong"),
TextColorWeak("--mynah-color-text-weak"),
TextColorLink("--mynah-color-text-link"),
Expand All @@ -25,7 +26,7 @@
ColorDeep("--mynah-color-deep"),
ColorDeepReverse("--mynah-color-deep-reverse"),
BorderDefault("--mynah-color-border-default"),
InputBackground("--mynah-color-input-bg"),
InputBackground("--mynah-input-bg"),

Check warning on line 29 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/CssVariable.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/CssVariable.kt#L29

Added line #L29 was not covered by tests

SyntaxBackground("--mynah-color-syntax-bg"),
SyntaxVariable("--mynah-color-syntax-variable"),
Expand All @@ -36,6 +37,9 @@
SyntaxProperty("--mynah-color-syntax-property"),
SyntaxComment("--mynah-color-syntax-comment"),
SyntaxCode("--mynah-color-syntax-code"),
SyntaxKeyword("--mynah-color-syntax-keyword"),
SyntaxString("--mynah-color-syntax-string"),
SyntaxClassName("--mynah-color-syntax-class-name"),

Check warning on line 42 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/CssVariable.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/CssVariable.kt#L40-L42

Added lines #L40 - L42 were not covered by tests
SyntaxCodeFontFamily("--mynah-syntax-code-font-family"),
SyntaxCodeFontSize("--mynah-syntax-code-font-size"),

Expand All @@ -50,10 +54,9 @@
SecondaryButtonBackground("--mynah-color-alternate"),
SecondaryButtonForeground("--mynah-color-alternate-reverse"),

CodeText("--mynah-color-code-text"),

MainBackground("--mynah-color-main"),
MainForeground("--mynah-color-main-reverse"),

CardBackground("--mynah-card-bg"),
CardBackgroundAlt("--mynah-card-bg-alternate"),

Check warning on line 61 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/CssVariable.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/CssVariable.kt#L61

Added line #L61 was not covered by tests
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,17 @@
warning = themeColor("Component.warningFocusColor", default = 0xE2A53A),
error = themeColor("ProgressBar.failedColor", default = 0xD64F4F, darkDefault = 0xE74848),

cardBackground = cardBackground,

editorFont = currentScheme.getFont(EditorFontType.PLAIN),
editorBackground = chatBackground,
editorForeground = text,
editorBackground = currentScheme.defaultBackground,
editorForeground = currentScheme.defaultForeground,

Check warning on line 118 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/EditorThemeAdapter.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/EditorThemeAdapter.kt#L117-L118

Added lines #L117 - L118 were not covered by tests
editorVariable = currentScheme.foregroundColor(DefaultLanguageHighlighterColors.LOCAL_VARIABLE),
editorOperator = currentScheme.foregroundColor(DefaultLanguageHighlighterColors.OPERATION_SIGN),
editorFunction = currentScheme.foregroundColor(DefaultLanguageHighlighterColors.FUNCTION_DECLARATION),
editorComment = currentScheme.foregroundColor(DefaultLanguageHighlighterColors.LINE_COMMENT),
editorKeyword = currentScheme.foregroundColor(DefaultLanguageHighlighterColors.KEYWORD),
editorString = currentScheme.foregroundColor(DefaultLanguageHighlighterColors.STRING),
editorProperty = currentScheme.foregroundColor(DefaultLanguageHighlighterColors.INSTANCE_FIELD),
editorClassName = currentScheme.foregroundColor(DefaultLanguageHighlighterColors.CLASS_NAME),

Check warning on line 126 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/EditorThemeAdapter.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/EditorThemeAdapter.kt#L126

Added line #L126 was not covered by tests
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@
append(CssVariable.FontFamily, theme.font.toCssFontFamily())

append(CssVariable.TextColorDefault, theme.defaultText)
append(CssVariable.TextColorAlt, theme.defaultText)

Check warning on line 38 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/ThemeBrowserAdapter.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/ThemeBrowserAdapter.kt#L38

Added line #L38 was not covered by tests
append(CssVariable.TextColorStrong, theme.textFieldForeground)
append(CssVariable.TextColorInput, theme.textFieldForeground)
append(CssVariable.TextColorLink, theme.linkText)
append(CssVariable.TextColorWeak, theme.inactiveText)

append(CssVariable.Background, theme.background)
append(CssVariable.BackgroundAlt, theme.background)
append(CssVariable.CardBackground, theme.cardBackground)
append(CssVariable.CardBackground, theme.editorBackground)
append(CssVariable.CardBackgroundAlt, theme.editorBackground)

Check warning on line 47 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/ThemeBrowserAdapter.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/ThemeBrowserAdapter.kt#L46-L47

Added lines #L46 - L47 were not covered by tests
append(CssVariable.BorderDefault, theme.border)
append(CssVariable.TabActive, theme.activeTab)

Expand All @@ -63,6 +65,7 @@

append(CssVariable.SyntaxCodeFontFamily, theme.editorFont.toCssFontFamily("monospace"))
append(CssVariable.SyntaxCodeFontSize, theme.editorFont.toCssSize())
append(CssVariable.SyntaxCode, theme.editorForeground)

Check warning on line 68 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/ThemeBrowserAdapter.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/ThemeBrowserAdapter.kt#L68

Added line #L68 was not covered by tests
append(CssVariable.SyntaxBackground, theme.editorBackground)
append(CssVariable.SyntaxVariable, theme.editorVariable)
append(CssVariable.SyntaxOperator, theme.editorOperator)
Expand All @@ -71,7 +74,9 @@
append(CssVariable.SyntaxAttributeValue, theme.editorKeyword)
append(CssVariable.SyntaxAttribute, theme.editorString)
append(CssVariable.SyntaxProperty, theme.editorProperty)
append(CssVariable.SyntaxCode, theme.editorForeground)
append(CssVariable.SyntaxKeyword, theme.editorKeyword)
append(CssVariable.SyntaxString, theme.editorString)
append(CssVariable.SyntaxClassName, theme.editorClassName)

Check warning on line 79 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/ThemeBrowserAdapter.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/theme/ThemeBrowserAdapter.kt#L77-L79

Added lines #L77 - L79 were not covered by tests

append(CssVariable.MainBackground, theme.buttonBackground)
append(CssVariable.MainForeground, theme.buttonForeground)
Expand Down
Loading